diff options
author | Brian <brian@yutani.localnet.net> | 2007-05-03 12:33:25 -0600 |
---|---|---|
committer | Brian <brian@yutani.localnet.net> | 2007-05-03 12:33:25 -0600 |
commit | c6443eb1a38946437fe38123f600ed9944a9bb70 (patch) | |
tree | b4af1ba0cae6acc04fe2b17e65b99f036411c418 /src/mesa | |
parent | 121533defb48abddbf796aed62c1282cfa5234f9 (diff) |
fix some matrix/state token indexing bugs (see bug 10848)
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_vertprog.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c index 52fd1de449..e8917980ba 100644 --- a/src/mesa/drivers/dri/r300/r300_vertprog.c +++ b/src/mesa/drivers/dri/r300/r300_vertprog.c @@ -883,10 +883,11 @@ static void position_invariant(struct gl_program *prog) gl_state_index tokens[STATE_LENGTH] = { STATE_MVP_MATRIX, 0, 0, 0, 0 }; + /* tokens[4] = matrix modifier */ #ifdef PREFER_DP4 - tokens[5] = STATE_MATRIX; + tokens[4] = 0; /* not transposed or inverted */ #else - tokens[5] = STATE_MATRIX_TRANSPOSE; + tokens[4] = STATE_MATRIX_TRANSPOSE; #endif paramList = prog->Parameters; @@ -895,7 +896,7 @@ static void position_invariant(struct gl_program *prog) for (i=0; i < 4; i++) { GLint idx; - tokens[3] = tokens[4] = i; + tokens[2] = tokens[3] = i; /* matrix row[i]..row[i] */ idx = _mesa_add_state_reference(paramList, tokens); #ifdef PREFER_DP4 vpi[i].Opcode = OPCODE_DP4; |