summaryrefslogtreecommitdiff
path: root/src/mesa/shader/programopt.c
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-02-21 11:08:21 -0700
committerBrian <brian@yutani.localnet.net>2007-02-21 11:08:21 -0700
commit6531952b3c979be0dc95704beb3c3b9dad1dc37b (patch)
tree5cbba2be731d30eac5375513dbe374f51571782d /src/mesa/shader/programopt.c
parentc3301d038d404be7c8ecda9d1425617e650e6198 (diff)
adjustments to STATE_ token layout/format so token[1] is always the array index
Diffstat (limited to 'src/mesa/shader/programopt.c')
-rw-r--r--src/mesa/shader/programopt.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/shader/programopt.c b/src/mesa/shader/programopt.c
index a33e6b49ac..ca11a4e547 100644
--- a/src/mesa/shader/programopt.c
+++ b/src/mesa/shader/programopt.c
@@ -57,10 +57,10 @@ _mesa_insert_mvp_code(GLcontext *ctx, struct gl_vertex_program *vprog)
* XXX we should check if these state vars are already declared.
*/
static const GLint mvpState[4][5] = {
- { STATE_MATRIX, STATE_MVP, 0, 0, 0 }, /* state.matrix.mvp.row[0] */
- { STATE_MATRIX, STATE_MVP, 0, 1, 1 }, /* state.matrix.mvp.row[1] */
- { STATE_MATRIX, STATE_MVP, 0, 2, 2 }, /* state.matrix.mvp.row[2] */
- { STATE_MATRIX, STATE_MVP, 0, 3, 3 }, /* state.matrix.mvp.row[3] */
+ { 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] */
+ { STATE_MVP_MATRIX, 0, 3, 3, 0 }, /* state.matrix.mvp.row[3] */
};
GLint mvpRef[4];
@@ -125,8 +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 fogParamsState[] = { STATE_FOG_PARAMS, 0, 0, 0, 0 };
- static const GLint fogColorState[] = { STATE_FOG_COLOR, 0, 0, 0, 0 };
+ static const GLint fogParamsState[]
+ = { STATE_FOG, STATE_FOG_PARAMS, 0, 0, 0 };
+ static const GLint fogColorState[]
+ = { STATE_FOG, STATE_FOG_COLOR, 0, 0, 0 };
struct prog_instruction *newInst, *inst;
const GLuint origLen = fprog->Base.NumInstructions;
const GLuint newLen = origLen + 6;