diff --git a/.pick_status.json b/.pick_status.json index 888d3ef0bb1..79ee88fa174 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -778,7 +778,7 @@ "description": "i915: 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" }, diff --git a/src/mesa/drivers/dri/i915/i830_context.c b/src/mesa/drivers/dri/i915/i830_context.c index e8ce5adfd51..cea893fc4fc 100644 --- a/src/mesa/drivers/dri/i915/i830_context.c +++ b/src/mesa/drivers/dri/i915/i830_context.c @@ -36,6 +36,7 @@ #include "tnl/t_pipeline.h" #include "intel_tris.h" #include "util/ralloc.h" +#include "util/u_memory.h" /*************************************** * Mesa's Driver Functions @@ -61,7 +62,7 @@ i830CreateContext(int api, void *sharedContextPrivate) { struct dd_function_table functions; - struct i830_context *i830 = rzalloc(NULL, struct i830_context); + struct i830_context *i830 = align_calloc(sizeof(struct i830_context), 16); struct intel_context *intel = &i830->intel; struct gl_context *ctx = &intel->ctx; @@ -78,7 +79,7 @@ i830CreateContext(int api, mesaVis, driContextPriv, sharedContextPrivate, &functions, error)) { - ralloc_free(i830); + align_free(i830); return false; } diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c index 394a6180f58..aa17f9c3f08 100644 --- a/src/mesa/drivers/dri/i915/i915_context.c +++ b/src/mesa/drivers/dri/i915/i915_context.c @@ -37,6 +37,7 @@ #include "tnl/t_context.h" #include "tnl/t_pipeline.h" #include "tnl/t_vertex.h" +#include "util/u_memory.h" #include "swrast/swrast.h" #include "swrast_setup/swrast_setup.h" @@ -164,7 +165,7 @@ i915CreateContext(int api, void *sharedContextPrivate) { struct dd_function_table functions; - struct i915_context *i915 = rzalloc(NULL, struct i915_context); + struct i915_context *i915 = align_calloc(sizeof(struct i915_context), 16); struct intel_context *intel = &i915->intel; struct gl_context *ctx = &intel->ctx; @@ -181,7 +182,7 @@ i915CreateContext(int api, mesaVis, driContextPriv, sharedContextPrivate, &functions, error)) { - ralloc_free(i915); + align_free(i915); return false; } diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c index cacc4e9cbc8..7355e03edb2 100644 --- a/src/mesa/drivers/dri/i915/intel_context.c +++ b/src/mesa/drivers/dri/i915/intel_context.c @@ -57,6 +57,7 @@ #include "utils.h" #include "util/debug.h" #include "util/ralloc.h" +#include "util/u_memory.h" int INTEL_DEBUG = (0); @@ -600,7 +601,7 @@ intelDestroyContext(__DRIcontext * driContextPriv) /* free the Mesa context */ _mesa_free_context_data(&intel->ctx, true); - ralloc_free(intel); + align_free(intel); driContextPriv->driverPrivate = NULL; } }