Module: Mesa Branch: outputswritten64 Commit: a468b3af69eeeb5b8463ee6f49a82bffbee11a1b URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a468b3af69eeeb5b8463ee6f49a82bffbee11a1b
Author: Ian Romanick <[email protected]> Date: Wed Oct 28 15:24:01 2009 -0700 Fix assertions that VS outpus will fit in bitfields. --- src/mesa/main/context.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index ea1ee22..4711b78 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -599,9 +599,11 @@ _mesa_init_constants(GLcontext *ctx) ASSERT(MAX_NV_VERTEX_PROGRAM_INPUTS <= VERT_ATTRIB_MAX); ASSERT(MAX_NV_VERTEX_PROGRAM_OUTPUTS <= VERT_RESULT_MAX); - /* check that we don't exceed various 32-bit bitfields */ - ASSERT(VERT_RESULT_MAX <= 32); - ASSERT(FRAG_ATTRIB_MAX <= 32); + /* check that we don't exceed the size of various bitfields */ + ASSERT(VERT_RESULT_MAX <= + (8 * sizeof(ctx->VertexProgram._Current->Base.OutputsWritten))); + ASSERT(FRAG_ATTRIB_MAX <= + (8 * sizeof(ctx->FragmentProgram._Current->Base.InputsRead))); } _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
