diff options
author | Brian Paul <[email protected]> | 2012-09-29 08:47:55 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-10-05 17:13:03 -0600 |
commit | 4c9042d21dca0be75f196f952a687675c140aac2 (patch) | |
tree | cb97b27a31e3c10766a8a1ef9de4d6b4631e1e03 | |
parent | 5a63634a136caa905e7a1fa5da8fe5dc9f26add5 (diff) |
radeon/r200: remove use of gl_context::DriverCtx field
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_context.h | 7 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_common_context.c | 5 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_common_context.h | 5 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_context.h | 7 |
4 files changed, 16 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_context.h b/src/mesa/drivers/dri/r200/r200_context.h index 778934d0fd5..fb25dceb992 100644 --- a/src/mesa/drivers/dri/r200/r200_context.h +++ b/src/mesa/drivers/dri/r200/r200_context.h @@ -623,7 +623,12 @@ struct r200_context { struct ati_fragment_shader *afs_loaded; }; -#define R200_CONTEXT(ctx) ((r200ContextPtr)(ctx->DriverCtx)) + +static inline r200ContextPtr +R200_CONTEXT(struct gl_context *ctx) +{ + return (r200ContextPtr) ctx; +} extern void r200DestroyContext( __DRIcontext *driContextPriv ); diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c index a56d72a6d1d..9fbcf74d7c2 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c @@ -248,11 +248,6 @@ void radeonDestroyContext(__DRIcontext *driContextPriv ) /* free the Mesa context data */ _mesa_free_context_data(&radeon->glCtx); - /* _mesa_destroy_context() might result in calls to functions that - * depend on the DriverCtx, so don't set it to NULL before. - * - * radeon->glCtx->DriverCtx = NULL; - */ /* free the option cache */ driDestroyOptionCache(&radeon->optionCache); diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.h b/src/mesa/drivers/dri/radeon/radeon_common_context.h index 6149fcc48fb..8437f34b5b7 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common_context.h +++ b/src/mesa/drivers/dri/radeon/radeon_common_context.h @@ -499,7 +499,10 @@ struct radeon_context { } vtbl; }; -#define RADEON_CONTEXT(glctx) ((radeonContextPtr)(ctx->DriverCtx)) +static inline radeonContextPtr RADEON_CONTEXT(struct gl_context *ctx) +{ + return (radeonContextPtr) ctx; +} static inline __DRIdrawable* radeon_get_drawable(radeonContextPtr radeon) { diff --git a/src/mesa/drivers/dri/radeon/radeon_context.h b/src/mesa/drivers/dri/radeon/radeon_context.h index cb036cd6570..6ad1d4d48ad 100644 --- a/src/mesa/drivers/dri/radeon/radeon_context.h +++ b/src/mesa/drivers/dri/radeon/radeon_context.h @@ -442,7 +442,12 @@ struct r100_context { }; -#define R100_CONTEXT(ctx) ((r100ContextPtr)(ctx->DriverCtx)) +static inline r100ContextPtr +R100_CONTEXT(struct gl_context *ctx) +{ + return (r100ContextPtr) ctx; +} + #define RADEON_OLD_PACKETS 1 |