mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 00:28:51 +02:00
nouveau_vieux: use align_calloc for the context to fix m32 crashes
Fixes:3175b63a0d"mesa: don't allocate matrices with malloc" Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9220> (cherry picked from commitf827b29234)
This commit is contained in:
parent
79b1d162a1
commit
f6cad121fd
4 changed files with 7 additions and 7 deletions
|
|
@ -760,7 +760,7 @@
|
|||
"description": "nouveau_vieux: use align_calloc for the context to fix m32 crashes",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "3175b63a0dfa290430f9f7eb651387788933a02b"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ nv04_context_destroy(struct gl_context *ctx)
|
|||
nouveau_object_del(&nctx->hw.surf3d);
|
||||
|
||||
nouveau_context_deinit(ctx);
|
||||
free(ctx);
|
||||
align_free(ctx);
|
||||
}
|
||||
|
||||
static struct gl_context *
|
||||
|
|
@ -147,7 +147,7 @@ nv04_context_create(struct nouveau_screen *screen, gl_api api,
|
|||
struct gl_context *ctx;
|
||||
int ret;
|
||||
|
||||
nctx = CALLOC_STRUCT(nv04_context);
|
||||
nctx = align_calloc(sizeof(struct nv04_context), 16);
|
||||
if (!nctx)
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ nv10_context_destroy(struct gl_context *ctx)
|
|||
nouveau_object_del(&nctx->hw.eng3d);
|
||||
|
||||
nouveau_context_deinit(ctx);
|
||||
free(ctx);
|
||||
align_free(ctx);
|
||||
}
|
||||
|
||||
static struct gl_context *
|
||||
|
|
@ -437,7 +437,7 @@ nv10_context_create(struct nouveau_screen *screen, gl_api api,
|
|||
unsigned celsius_class;
|
||||
int ret;
|
||||
|
||||
nctx = CALLOC_STRUCT(nouveau_context);
|
||||
nctx = align_calloc(sizeof(struct nouveau_context), 16);
|
||||
if (!nctx)
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -435,7 +435,7 @@ nv20_context_destroy(struct gl_context *ctx)
|
|||
nouveau_object_del(&nctx->hw.eng3d);
|
||||
|
||||
nouveau_context_deinit(ctx);
|
||||
free(ctx);
|
||||
align_free(ctx);
|
||||
}
|
||||
|
||||
static struct gl_context *
|
||||
|
|
@ -448,7 +448,7 @@ nv20_context_create(struct nouveau_screen *screen, gl_api api,
|
|||
unsigned kelvin_class;
|
||||
int ret;
|
||||
|
||||
nctx = CALLOC_STRUCT(nouveau_context);
|
||||
nctx = align_calloc(sizeof(struct nouveau_context), 16);
|
||||
if (!nctx)
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue