summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_context.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-01-29 15:56:19 -0700
committerBrian Paul <brianp@vmware.com>2009-01-30 16:03:32 -0700
commit81ca8b93f212d1946c70660041ce97d98f352608 (patch)
tree95b3adedc0254651c666668b259fe3002d2e6a3f /src/mesa/swrast/s_context.h
parentbd944ef78397fd96dc2b239f542066643b06274a (diff)
swrast: replace macro with inline function
Diffstat (limited to 'src/mesa/swrast/s_context.h')
-rw-r--r--src/mesa/swrast/s_context.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h
index a511d1c9a1..46a5fa24f8 100644
--- a/src/mesa/swrast/s_context.h
+++ b/src/mesa/swrast/s_context.h
@@ -238,7 +238,20 @@ extern void
_swrast_update_texture_samplers(GLcontext *ctx);
-#define SWRAST_CONTEXT(ctx) ((SWcontext *)ctx->swrast_context)
+/** Return SWcontext for the given GLcontext */
+static INLINE SWcontext *
+SWRAST_CONTEXT(GLcontext *ctx)
+{
+ return (SWcontext *) ctx->swrast_context;
+}
+
+/** const version of above */
+static INLINE const SWcontext *
+CONST_SWRAST_CONTEXT(const GLcontext *ctx)
+{
+ return (const SWcontext *) ctx->swrast_context;
+}
+
#define RENDER_START(SWctx, GLctx) \
do { \