This will let me hang cached compiler structs off of the context
without having to worry about cleaning them up at destroy time.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
#include "tnl/t_pipeline.h"
#include "intel_span.h"
#include "intel_tris.h"
#include "tnl/t_pipeline.h"
#include "intel_span.h"
#include "intel_tris.h"
+#include "../glsl/ralloc.h"
/***************************************
* Mesa's Driver Functions
/***************************************
* Mesa's Driver Functions
void *sharedContextPrivate)
{
struct dd_function_table functions;
void *sharedContextPrivate)
{
struct dd_function_table functions;
- struct i830_context *i830 = CALLOC_STRUCT(i830_context);
+ struct i830_context *i830 = rzalloc(NULL, struct i830_context);
struct intel_context *intel = &i830->intel;
struct gl_context *ctx = &intel->ctx;
if (!i830)
struct intel_context *intel = &i830->intel;
struct gl_context *ctx = &intel->ctx;
if (!i830)
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
#include "tnl/tnl.h"
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
#include "tnl/tnl.h"
+#include "../glsl/ralloc.h"
#include "i915_reg.h"
#include "i915_program.h"
#include "i915_reg.h"
#include "i915_program.h"
void *sharedContextPrivate)
{
struct dd_function_table functions;
void *sharedContextPrivate)
{
struct dd_function_table functions;
- struct i915_context *i915 =
- (struct i915_context *) CALLOC_STRUCT(i915_context);
+ struct i915_context *i915 = rzalloc(NULL, struct i915_context);
struct intel_context *intel = &i915->intel;
struct gl_context *ctx = &intel->ctx;
struct intel_context *intel = &i915->intel;
struct gl_context *ctx = &intel->ctx;
#include "brw_state.h"
#include "intel_span.h"
#include "tnl/t_pipeline.h"
#include "brw_state.h"
#include "intel_span.h"
#include "tnl/t_pipeline.h"
+#include "../glsl/ralloc.h"
/***************************************
* Mesa's Driver Functions
/***************************************
* Mesa's Driver Functions
void *sharedContextPrivate)
{
struct dd_function_table functions;
void *sharedContextPrivate)
{
struct dd_function_table functions;
- struct brw_context *brw = (struct brw_context *) CALLOC_STRUCT(brw_context);
+ struct brw_context *brw = rzalloc(NULL, struct brw_context);
struct intel_context *intel = &brw->intel;
struct gl_context *ctx = &intel->ctx;
unsigned i;
struct intel_context *intel = &brw->intel;
struct gl_context *ctx = &intel->ctx;
unsigned i;
#include "drirenderbuffer.h"
#include "utils.h"
#include "drirenderbuffer.h"
#include "utils.h"
+#include "../glsl/ralloc.h"
#ifndef INTEL_DEBUG
int INTEL_DEBUG = (0);
#ifndef INTEL_DEBUG
int INTEL_DEBUG = (0);
_math_matrix_dtr(&intel->ViewportMatrix);
_math_matrix_dtr(&intel->ViewportMatrix);
driContextPriv->driverPrivate = NULL;
}
}
driContextPriv->driverPrivate = NULL;
}
}