summaryrefslogtreecommitdiff
path: root/src/mesa/tnl
diff options
context:
space:
mode:
authorMathias Fröhlich <Mathias.Froehlich@web.de>2011-12-22 20:12:20 +0100
committerMathias Fröhlich <Mathias.Froehlich@web.de>2011-12-28 07:35:24 +0100
commitccbf192f597186f6a4a04ed14391dba82ffee18b (patch)
tree544ce5562a6bdec22324ae89be8354c348f3cebf /src/mesa/tnl
parent45cd15bfae2f6c66c9e4356fb8dd7cad1829f659 (diff)
mesa: Convert to use GLbitfield64 directly.
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de> Reviewed-by: Brian Paul <brianp@vmare.com>
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_context.c20
-rw-r--r--src/mesa/tnl/t_context.h14
2 files changed, 10 insertions, 24 deletions
diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c
index a6da8cafe5a..1ded44ccffb 100644
--- a/src/mesa/tnl/t_context.c
+++ b/src/mesa/tnl/t_context.c
@@ -121,20 +121,19 @@ _tnl_InvalidateState( struct gl_context *ctx, GLuint new_state )
/* Calculate tnl->render_inputs. This bitmask indicates which vertex
* attributes need to be emitted to the rasterizer.
*/
- RENDERINPUTS_ZERO( tnl->render_inputs_bitset );
- RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_POS );
+ tnl->render_inputs_bitset = BITFIELD64_BIT(_TNL_ATTRIB_POS);
if (!fp || (fp->Base.InputsRead & FRAG_BIT_COL0)) {
- RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_COLOR0 );
+ tnl->render_inputs_bitset |= BITFIELD64_BIT(_TNL_ATTRIB_COLOR0);
}
if (_mesa_need_secondary_color(ctx))
- RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_COLOR1 );
+ tnl->render_inputs_bitset |= BITFIELD64_BIT(_TNL_ATTRIB_COLOR1);
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
if (ctx->Texture._EnabledCoordUnits & (1 << i) ||
(fp && fp->Base.InputsRead & FRAG_BIT_TEX(i))) {
- RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_TEX(i) );
+ tnl->render_inputs_bitset |= BITFIELD64_BIT(_TNL_ATTRIB_TEX(i));
}
}
@@ -142,27 +141,26 @@ _tnl_InvalidateState( struct gl_context *ctx, GLuint new_state )
|| (fp != NULL && (fp->Base.InputsRead & FRAG_BIT_FOGC) != 0)) {
/* Either fixed-function fog or a fragment program needs fog coord.
*/
- RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_FOG );
+ tnl->render_inputs_bitset |= BITFIELD64_BIT(_TNL_ATTRIB_FOG);
}
if (ctx->Polygon.FrontMode != GL_FILL ||
ctx->Polygon.BackMode != GL_FILL)
- RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_EDGEFLAG );
+ tnl->render_inputs_bitset |= BITFIELD64_BIT(_TNL_ATTRIB_EDGEFLAG);
if (ctx->RenderMode == GL_FEEDBACK)
- RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_TEX0 );
+ tnl->render_inputs_bitset |= BITFIELD64_BIT(_TNL_ATTRIB_TEX0);
if (ctx->Point._Attenuated ||
(ctx->VertexProgram._Enabled && ctx->VertexProgram.PointSizeEnabled))
- RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_POINTSIZE );
+ tnl->render_inputs_bitset |= BITFIELD64_BIT(_TNL_ATTRIB_POINTSIZE);
/* check for varying vars which are written by the vertex program */
if (vp) {
GLuint i;
for (i = 0; i < MAX_VARYING; i++) {
if (vp->Base.OutputsWritten & BITFIELD64_BIT(VERT_RESULT_VAR0 + i)) {
- RENDERINPUTS_SET(tnl->render_inputs_bitset,
- _TNL_ATTRIB_GENERIC(i));
+ tnl->render_inputs_bitset |= BITFIELD64_BIT(_TNL_ATTRIB_GENERIC(i));
}
}
}
diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h
index 3b7d4468055..c5a902082b8 100644
--- a/src/mesa/tnl/t_context.h
+++ b/src/mesa/tnl/t_context.h
@@ -483,18 +483,6 @@ struct tnl_device_driver
};
-#define DECLARE_RENDERINPUTS(name) GLbitfield64 name
-#define RENDERINPUTS_COPY(x, y) do { (x) = (y); } while (0)
-#define RENDERINPUTS_EQUAL(x, y) ((x) == (y))
-#define RENDERINPUTS_ZERO(x) do { (x) = 0; } while (0)
-#define RENDERINPUTS_ONES(x) do { (x) = ~(GLbitfield64)0; } while (0)
-#define RENDERINPUTS_TEST(x, b) (((x) & BITFIELD64_BIT(b)) != 0)
-#define RENDERINPUTS_SET(x, b) ((x) |= BITFIELD64_BIT(b))
-#define RENDERINPUTS_CLEAR(x, b) ((x) &= ~BITFIELD64_BIT(b))
-#define RENDERINPUTS_TEST_RANGE(x, b, e) \
- (((x) & BITFIELD64_RANGE((b), (e) - (b) + 1)) != 0)
-
-
/**
* Context state for T&L context.
*/
@@ -520,7 +508,7 @@ typedef struct
GLboolean AllowPixelFog;
GLboolean _DoVertexFog; /* eval fog function at each vertex? */
- DECLARE_RENDERINPUTS(render_inputs_bitset);
+ GLbitfield64 render_inputs_bitset;
GLvector4f tmp_inputs[VERT_ATTRIB_MAX];