[Mesa-dev] [PATCH] mesa: expand the fragprog_inputs_read bitfield in ffvertex_prog.c

Brian Paul brianp at vmware.com
Wed Nov 7 07:33:18 PST 2012


The glean glsl1 test was failing an assertion because FRAG_ATTRIB_FACE
(and FRAG_ATTRIB_PNTC) doesn't fit in a 12-bit field.

In the failing case we're using a fragment shader with fixed-function
vertex processing.
---
 src/mesa/main/ffvertex_prog.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c
index 4cdec21..1b4f653 100644
--- a/src/mesa/main/ffvertex_prog.c
+++ b/src/mesa/main/ffvertex_prog.c
@@ -66,7 +66,7 @@ struct state_key {
    unsigned point_attenuated:1;
    unsigned point_array:1;
    unsigned texture_enabled_global:1;
-   unsigned fragprog_inputs_read:12;
+   unsigned fragprog_inputs_read:14;
 
    GLbitfield64 varying_vp_inputs;
 
@@ -160,8 +160,8 @@ static void make_state_key( struct gl_context *ctx, struct state_key *key )
 
    key->need_eye_coords = ctx->_NeedEyeCoords;
 
-   /* Make sure fp->Base.InputsRead fits in a 12-bit field */
-   assert(fp->Base.InputsRead < (1 << 12));
+   /* Make sure fp->Base.InputsRead fits in a 14-bit field */
+   assert(fp->Base.InputsRead < (1 << 14));
    key->fragprog_inputs_read = fp->Base.InputsRead;
    key->varying_vp_inputs = ctx->varying_vp_inputs;
 
-- 
1.7.3.4



More information about the mesa-dev mailing list