summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_context.h
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2001-07-13 20:07:37 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2001-07-13 20:07:37 +0000
commitf431a3fb4dc1bf860203d79e54657e3a62bc50df (patch)
tree51a598faf5e8b971b2bd7cf85702e021426f54c6 /src/mesa/swrast/s_context.h
parentbc07a99cc3faeb1aa48700065b34baa76c201e7d (diff)
assorted changes for supporting GLfloat color channels (not done)
Diffstat (limited to 'src/mesa/swrast/s_context.h')
-rw-r--r--src/mesa/swrast/s_context.h26
1 files changed, 20 insertions, 6 deletions
diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h
index 03f6961001..5aad31683b 100644
--- a/src/mesa/swrast/s_context.h
+++ b/src/mesa/swrast/s_context.h
@@ -1,4 +1,4 @@
-/* $Id: s_context.h,v 1.10 2001/05/17 09:32:17 keithw Exp $ */
+/* $Id: s_context.h,v 1.11 2001/07/13 20:07:37 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -167,25 +167,39 @@ typedef struct
} SWcontext;
-void
+extern void
_swrast_validate_derived( GLcontext *ctx );
#define SWRAST_CONTEXT(ctx) ((SWcontext *)ctx->swrast_context)
#define RENDER_START(SWctx, GLctx) \
- do { \
+ do { \
if ((SWctx)->Driver.SpanRenderStart) { \
(*(SWctx)->Driver.SpanRenderStart)(GLctx); \
- } \
+ } \
} while (0)
#define RENDER_FINISH(SWctx, GLctx) \
- do { \
+ do { \
if ((SWctx)->Driver.SpanRenderFinish) { \
(*(SWctx)->Driver.SpanRenderFinish)(GLctx); \
- } \
+ } \
} while (0)
+
+/*
+ * XXX these macros are just bandages for now in order to make
+ * CHAN_BITS==32 compile cleanly.
+ * These should probably go elsewhere at some point.
+ */
+#if CHAN_TYPE == GL_FLOAT
+#define ChanToFixed(X) FloatToFixed(X)
+#define FixedToChan(X) FixedToFloat(X)
+#else
+#define ChanToFixed(X) IntToFixed(X)
+#define FixedToChan(X) FixedToInt(X)
+#endif
+
#endif