Mesa (master): intel: Fallback field is a bitmask, use GLbitfield
Brian Paul
brianp at kemper.freedesktop.org
Fri Oct 23 00:41:58 UTC 2009
Module: Mesa
Branch: master
Commit: ea659f891740fab1943eca219ffbdd5ed3d1906c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ea659f891740fab1943eca219ffbdd5ed3d1906c
Author: Brian Paul <brianp at vmware.com>
Date: Thu Oct 22 16:33:36 2009 -0600
intel: Fallback field is a bitmask, use GLbitfield
---
src/mesa/drivers/dri/i915/intel_tris.c | 8 ++++++--
src/mesa/drivers/dri/intel/intel_context.c | 2 +-
src/mesa/drivers/dri/intel/intel_context.h | 9 +++++++--
3 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index a905455..bc6b292 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -1194,12 +1194,16 @@ getFallbackString(GLuint bit)
+/**
+ * Enable/disable a fallback flag.
+ * \param bit one of INTEL_FALLBACK_x flags.
+ */
void
-intelFallback(struct intel_context *intel, GLuint bit, GLboolean mode)
+intelFallback(struct intel_context *intel, GLbitfield bit, GLboolean mode)
{
GLcontext *ctx = &intel->ctx;
TNLcontext *tnl = TNL_CONTEXT(ctx);
- GLuint oldfallback = intel->Fallback;
+ const GLbitfield oldfallback = intel->Fallback;
if (mode) {
intel->Fallback |= bit;
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index c49f06e..d24af46 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -839,7 +839,7 @@ intelDestroyContext(__DRIcontextPrivate * driContextPriv)
_vbo_DestroyContext(&intel->ctx);
_swrast_DestroyContext(&intel->ctx);
- intel->Fallback = 0; /* don't call _swrast_Flush later */
+ intel->Fallback = 0x0; /* don't call _swrast_Flush later */
intel_batchbuffer_free(intel->batch);
intel->batch = NULL;
diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h
index 03e7cf3..a9db8f6 100644
--- a/src/mesa/drivers/dri/intel/intel_context.h
+++ b/src/mesa/drivers/dri/intel/intel_context.h
@@ -61,6 +61,10 @@ typedef void (*intel_line_func) (struct intel_context *, intelVertex *,
intelVertex *);
typedef void (*intel_point_func) (struct intel_context *, intelVertex *);
+/**
+ * Bits for intel->Fallback field
+ */
+/*@{*/
#define INTEL_FALLBACK_DRAW_BUFFER 0x1
#define INTEL_FALLBACK_READ_BUFFER 0x2
#define INTEL_FALLBACK_DEPTH_BUFFER 0x4
@@ -68,8 +72,9 @@ typedef void (*intel_point_func) (struct intel_context *, intelVertex *);
#define INTEL_FALLBACK_USER 0x10
#define INTEL_FALLBACK_RENDERMODE 0x20
#define INTEL_FALLBACK_TEXTURE 0x40
+/*@}*/
-extern void intelFallback(struct intel_context *intel, GLuint bit,
+extern void intelFallback(struct intel_context *intel, GLbitfield bit,
GLboolean mode);
#define FALLBACK( intel, bit, mode ) intelFallback( intel, bit, mode )
@@ -171,7 +176,7 @@ struct intel_context
struct dri_metaops meta;
GLint refcount;
- GLuint Fallback;
+ GLbitfield Fallback; /**< mask of INTEL_FALLBACK_x bits */
GLuint NewGLState;
dri_bufmgr *bufmgr;
More information about the mesa-commit
mailing list