Fixes:
3175b63a0dfa290 "mesa: don't allocate matrices with malloc"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4295
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>
#include "tnl/t_pipeline.h"
#include "intel_tris.h"
#include "util/ralloc.h"
+#include "util/u_memory.h"
/***************************************
* Mesa's Driver Functions
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;
mesaVis, driContextPriv,
sharedContextPrivate, &functions,
error)) {
- ralloc_free(i830);
+ align_free(i830);
return false;
}
#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"
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;
mesaVis, driContextPriv,
sharedContextPrivate, &functions,
error)) {
- ralloc_free(i915);
+ align_free(i915);
return false;
}
#include "utils.h"
#include "util/debug.h"
#include "util/ralloc.h"
+#include "util/u_memory.h"
int INTEL_DEBUG = (0);
/* free the Mesa context */
_mesa_free_context_data(&intel->ctx, true);
- ralloc_free(intel);
+ align_free(intel);
driContextPriv->driverPrivate = NULL;
}
}