summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/programopt.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-02-22 09:29:46 -0700
committerBrian <[email protected]>2007-02-22 09:29:46 -0700
commit776bc9cf55b116e17dddde4d097985b51879c83f (patch)
tree7f2b21fffc33807b0bd8d23636a1fd024f90d822 /src/mesa/shader/programopt.c
parent3f4826a358cab8b6d638fc8eb46aef668a7bcf46 (diff)
Undo some STATE_POINT/FOG changes. Max length of state token array is now 5.
Diffstat (limited to 'src/mesa/shader/programopt.c')
-rw-r--r--src/mesa/shader/programopt.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/shader/programopt.c b/src/mesa/shader/programopt.c
index 05a05cd3697..18da39c2d31 100644
--- a/src/mesa/shader/programopt.c
+++ b/src/mesa/shader/programopt.c
@@ -56,7 +56,7 @@ _mesa_insert_mvp_code(GLcontext *ctx, struct gl_vertex_program *vprog)
* Setup state references for the modelview/projection matrix.
* XXX we should check if these state vars are already declared.
*/
- static const GLint mvpState[4][5] = {
+ static const GLint mvpState[4][STATE_LENGTH] = {
{ STATE_MVP_MATRIX, 0, 0, 0, 0 }, /* state.matrix.mvp.row[0] */
{ STATE_MVP_MATRIX, 0, 1, 1, 0 }, /* state.matrix.mvp.row[1] */
{ STATE_MVP_MATRIX, 0, 2, 2, 0 }, /* state.matrix.mvp.row[2] */
@@ -125,9 +125,10 @@ _mesa_insert_mvp_code(GLcontext *ctx, struct gl_vertex_program *vprog)
void
_mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog)
{
- static const GLint fogPStateOpt[] = { STATE_INTERNAL,
- STATE_FOG_PARAMS_OPTIMIZED, 0, 0, 0 };
- static const GLint fogColorState[] = { STATE_FOG, STATE_FOG_COLOR, 0, 0, 0};
+ static const GLint fogPStateOpt[STATE_LENGTH]
+ = { STATE_INTERNAL, STATE_FOG_PARAMS_OPTIMIZED, 0, 0, 0 };
+ static const GLint fogColorState[STATE_LENGTH]
+ = { STATE_FOG_COLOR, 0, 0, 0, 0};
struct prog_instruction *newInst, *inst;
const GLuint origLen = fprog->Base.NumInstructions;
const GLuint newLen = origLen + 5;