ARB prog parser: Set NumAttributes based on the number of attribs read
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 29 Jul 2009 16:47:14 +0000 (09:47 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 29 Jul 2009 16:47:14 +0000 (09:47 -0700)
src/mesa/shader/program_parse.tab.c
src/mesa/shader/program_parse.y

index dbe2fa229c10aa570f95c708b6702f47eb0e173d..5b807ce853b435c49b49e9a487a2b4daaffdfc25 100644 (file)
@@ -5135,6 +5135,7 @@ _mesa_parse_arb_program(GLcontext *ctx, GLenum target, const GLubyte *str,
    state->prog->NumInstructions++;
 
    state->prog->NumParameters = state->prog->Parameters->NumParameters;
+   state->prog->NumAttributes = _mesa_bitcount(state->prog->InputsRead);
 
    /*
     * Initialize native counts to logical counts.  The device driver may
index 6c50491ffc2e111d7865b1f4d24b7ddd76304d36..c7e36096e0bd11e0f534337205aa33cd0ccb9b12 100644 (file)
@@ -2280,6 +2280,7 @@ _mesa_parse_arb_program(GLcontext *ctx, GLenum target, const GLubyte *str,
    state->prog->NumInstructions++;
 
    state->prog->NumParameters = state->prog->Parameters->NumParameters;
+   state->prog->NumAttributes = _mesa_bitcount(state->prog->InputsRead);
 
    /*
     * Initialize native counts to logical counts.  The device driver may