summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915/i915_context.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2011-05-05 19:01:25 -0700
committerEric Anholt <eric@anholt.net>2011-07-11 09:27:26 -0700
commit35d5d5df72a2747262e00e521e650c8974d6c64d (patch)
tree879becf2abe302aa00be031b9c0f158431c31e89 /src/mesa/drivers/dri/i915/i915_context.c
parentbe8551220cc32736165e081bafb2fa0a45a39993 (diff)
downloadexternal_mesa3d-35d5d5df72a2747262e00e521e650c8974d6c64d.zip
external_mesa3d-35d5d5df72a2747262e00e521e650c8974d6c64d.tar.gz
external_mesa3d-35d5d5df72a2747262e00e521e650c8974d6c64d.tar.bz2
intel: Make our context structure be a ralloc context.
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>
Diffstat (limited to 'src/mesa/drivers/dri/i915/i915_context.c')
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c
index f02f2d7..11bee14 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -36,6 +36,7 @@
#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"
@@ -97,8 +98,7 @@ i915CreateContext(int api,
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;