[Mesa-dev] [PATCH 04/10] mesa: Make gl_array_object::_Enabled 64 bits.
Mathias Fröhlich
Mathias.Froehlich at gmx.net
Fri Nov 11 09:09:16 PST 2011
---
src/mesa/main/context.c | 2 +-
src/mesa/main/enable.c | 2 +-
src/mesa/main/mtypes.h | 54 +++++++++++++++++++++++-----------------------
src/mesa/main/varray.c | 2 +-
4 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 08dfe0c..19e43d1 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -673,7 +673,7 @@ static void
check_context_limits(struct gl_context *ctx)
{
GLuint i;
- GLbitfield bits;
+ GLbitfield64 bits;
/* check that we don't exceed the size of various bitfields */
assert(VERT_RESULT_MAX <=
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index e9b7fa0..f45589f 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -54,7 +54,7 @@ static void
client_state(struct gl_context *ctx, GLenum cap, GLboolean state)
{
struct gl_array_object *arrayObj = ctx->Array.ArrayObj;
- GLuint flag;
+ GLbitfield64 flag;
GLboolean *var;
switch (cap) {
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 19a8e5d..3859344 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -185,36 +185,36 @@ typedef enum
* These are used in bitfields in many places.
*/
/*@{*/
-#define VERT_BIT_POS (1 << VERT_ATTRIB_POS)
-#define VERT_BIT_WEIGHT (1 << VERT_ATTRIB_WEIGHT)
-#define VERT_BIT_NORMAL (1 << VERT_ATTRIB_NORMAL)
-#define VERT_BIT_COLOR0 (1 << VERT_ATTRIB_COLOR0)
-#define VERT_BIT_COLOR1 (1 << VERT_ATTRIB_COLOR1)
-#define VERT_BIT_FOG (1 << VERT_ATTRIB_FOG)
-#define VERT_BIT_COLOR_INDEX (1 << VERT_ATTRIB_COLOR_INDEX)
-#define VERT_BIT_POINT_SIZE (1 << VERT_ATTRIB_POINT_SIZE)
-#define VERT_BIT_EDGEFLAG (1 << VERT_ATTRIB_EDGEFLAG)
-#define VERT_BIT_TEX0 (1 << VERT_ATTRIB_TEX0)
-#define VERT_BIT_TEX1 (1 << VERT_ATTRIB_TEX1)
-#define VERT_BIT_TEX2 (1 << VERT_ATTRIB_TEX2)
-#define VERT_BIT_TEX3 (1 << VERT_ATTRIB_TEX3)
-#define VERT_BIT_TEX4 (1 << VERT_ATTRIB_TEX4)
-#define VERT_BIT_TEX5 (1 << VERT_ATTRIB_TEX5)
-#define VERT_BIT_TEX6 (1 << VERT_ATTRIB_TEX6)
-#define VERT_BIT_TEX7 (1 << VERT_ATTRIB_TEX7)
-#define VERT_BIT_GENERIC0 (1 << VERT_ATTRIB_GENERIC0)
-
-#define VERT_BIT(i) (1 << (i))
-#define VERT_BIT_ALL 0xffffffff
+#define VERT_BIT_POS BITFIELD64_BIT(VERT_ATTRIB_POS)
+#define VERT_BIT_WEIGHT BITFIELD64_BIT(VERT_ATTRIB_WEIGHT)
+#define VERT_BIT_NORMAL BITFIELD64_BIT(VERT_ATTRIB_NORMAL)
+#define VERT_BIT_COLOR0 BITFIELD64_BIT(VERT_ATTRIB_COLOR0)
+#define VERT_BIT_COLOR1 BITFIELD64_BIT(VERT_ATTRIB_COLOR1)
+#define VERT_BIT_FOG BITFIELD64_BIT(VERT_ATTRIB_FOG)
+#define VERT_BIT_COLOR_INDEX BITFIELD64_BIT(VERT_ATTRIB_COLOR_INDEX)
+#define VERT_BIT_POINT_SIZE BITFIELD64_BIT(VERT_ATTRIB_POINT_SIZE)
+#define VERT_BIT_EDGEFLAG BITFIELD64_BIT(VERT_ATTRIB_EDGEFLAG)
+#define VERT_BIT_TEX0 BITFIELD64_BIT(VERT_ATTRIB_TEX0)
+#define VERT_BIT_TEX1 BITFIELD64_BIT(VERT_ATTRIB_TEX1)
+#define VERT_BIT_TEX2 BITFIELD64_BIT(VERT_ATTRIB_TEX2)
+#define VERT_BIT_TEX3 BITFIELD64_BIT(VERT_ATTRIB_TEX3)
+#define VERT_BIT_TEX4 BITFIELD64_BIT(VERT_ATTRIB_TEX4)
+#define VERT_BIT_TEX5 BITFIELD64_BIT(VERT_ATTRIB_TEX5)
+#define VERT_BIT_TEX6 BITFIELD64_BIT(VERT_ATTRIB_TEX6)
+#define VERT_BIT_TEX7 BITFIELD64_BIT(VERT_ATTRIB_TEX7)
+#define VERT_BIT_GENERIC0 BITFIELD64_BIT(VERT_ATTRIB_GENERIC0)
+
+#define VERT_BIT(i) BITFIELD64_BIT(i)
+#define VERT_BIT_ALL ((GLbitfield64)0xffffffff)
#define VERT_BIT_FF(i) VERT_BIT(i)
-#define VERT_BIT_FF_ALL (0xffff)
+#define VERT_BIT_FF_ALL ((GLbitfield64)0xffff)
#define VERT_BIT_TEX(i) VERT_BIT(VERT_ATTRIB_TEX(i))
-#define VERT_BIT_TEX_ALL (0xff << VERT_ATTRIB_TEX(0))
+#define VERT_BIT_TEX_ALL ((GLbitfield64)0xff << VERT_ATTRIB_TEX(0))
#define VERT_BIT_GENERIC_NV(i) VERT_BIT(VERT_ATTRIB_GENERIC_NV(i))
-#define VERT_BIT_GENERIC_NV_ALL (0xffff << (VERT_ATTRIB_GENERIC_NV(0)))
+#define VERT_BIT_GENERIC_NV_ALL ((GLbitfield64)0xffff <<
(VERT_ATTRIB_GENERIC_NV(0)))
#define VERT_BIT_GENERIC(i) VERT_BIT(VERT_ATTRIB_GENERIC(i))
-#define VERT_BIT_GENERIC_ALL (0xffff << (VERT_ATTRIB_GENERIC(0)))
+#define VERT_BIT_GENERIC_ALL ((GLbitfield64)0xffff <<
(VERT_ATTRIB_GENERIC(0)))
/*@}*/
@@ -1649,7 +1649,7 @@ struct gl_array_object
struct gl_client_array VertexAttrib[MAX_VERTEX_GENERIC_ATTRIBS];
/** Mask of VERT_BIT_* values indicating which arrays are enabled */
- GLbitfield _Enabled;
+ GLbitfield64 _Enabled;
/**
* Min of all enabled arrays' _MaxElement. When arrays reside inside VBOs
@@ -1681,7 +1681,7 @@ struct gl_array_attrib
GLboolean PrimitiveRestart;
GLuint RestartIndex;
- GLbitfield NewState; /**< mask of VERT_BIT_* values */
+ GLbitfield64 NewState; /**< mask of VERT_BIT_* values */
GLboolean RebindArrays; /**< whether the VBO module should rebind arrays
*/
/* GL_ARB_vertex_buffer_object */
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index b85ab49..da88eae 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -124,7 +124,7 @@ static void
update_array(struct gl_context *ctx,
const char *func,
struct gl_client_array *array,
- GLbitfield dirtyBit, GLbitfield legalTypesMask,
+ GLbitfield64 dirtyBit, GLbitfield legalTypesMask,
GLint sizeMin, GLint sizeMax,
GLint size, GLenum type, GLsizei stride,
GLboolean normalized, GLboolean integer,
--
1.7.4.4
More information about the mesa-dev
mailing list