aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/ffvertex_prog.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/ffvertex_prog.c')
-rw-r--r--mesalib/src/mesa/main/ffvertex_prog.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/ffvertex_prog.c b/mesalib/src/mesa/main/ffvertex_prog.c
index efdca015e..4cdec2166 100644
--- a/mesalib/src/mesa/main/ffvertex_prog.c
+++ b/mesalib/src/mesa/main/ffvertex_prog.c
@@ -160,6 +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));
key->fragprog_inputs_read = fp->Base.InputsRead;
key->varying_vp_inputs = ctx->varying_vp_inputs;