summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_context.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-01-29 16:05:39 -0700
committerBrian Paul <brianp@vmware.com>2009-01-30 16:03:32 -0700
commit2d5b86be25a7ccb729e746aa5e1bdd537d76df68 (patch)
tree88380b58a36d3b3596da08703d180ac6678ace50 /src/mesa/swrast/s_context.h
parent81ca8b93f212d1946c70660041ce97d98f352608 (diff)
swrast: replace RENDER_START/FINISH macros with inline functions
Diffstat (limited to 'src/mesa/swrast/s_context.h')
-rw-r--r--src/mesa/swrast/s_context.h35
1 files changed, 22 insertions, 13 deletions
diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h
index 46a5fa24f8..cdd6fa5048 100644
--- a/src/mesa/swrast/s_context.h
+++ b/src/mesa/swrast/s_context.h
@@ -253,19 +253,28 @@ CONST_SWRAST_CONTEXT(const GLcontext *ctx)
}
-#define RENDER_START(SWctx, GLctx) \
- do { \
- if ((SWctx)->Driver.SpanRenderStart) { \
- (*(SWctx)->Driver.SpanRenderStart)(GLctx); \
- } \
- } while (0)
-
-#define RENDER_FINISH(SWctx, GLctx) \
- do { \
- if ((SWctx)->Driver.SpanRenderFinish) { \
- (*(SWctx)->Driver.SpanRenderFinish)(GLctx); \
- } \
- } while (0)
+/**
+ * Called prior to framebuffer reading/writing.
+ * For drivers that rely on swrast for fallback rendering, this is the
+ * driver's opportunity to map renderbuffers and textures.
+ */
+static INLINE void
+swrast_render_start(GLcontext *ctx)
+{
+ SWcontext *swrast = SWRAST_CONTEXT(ctx);
+ if (swrast->Driver.SpanRenderStart)
+ swrast->Driver.SpanRenderStart(ctx);
+}
+
+
+/** Called after framebuffer reading/writing */
+static INLINE void
+swrast_render_finish(GLcontext *ctx)
+{
+ SWcontext *swrast = SWRAST_CONTEXT(ctx);
+ if (swrast->Driver.SpanRenderFinish)
+ swrast->Driver.SpanRenderFinish(ctx);
+}