diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2004-03-29 16:34:01 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2004-03-29 16:34:01 +0000 |
commit | 388c45596052823b9b3dbc132c5e801a3408acf8 (patch) | |
tree | 4688fa6296675cb457a1b130368663723e358a4b /src/mesa/swrast/s_nvfragprog.c | |
parent | eeb5eeb2a62627d2a547f6739105c1418caf6d9d (diff) |
fix array indexing for UP4B and UP4UB
Diffstat (limited to 'src/mesa/swrast/s_nvfragprog.c')
-rw-r--r-- | src/mesa/swrast/s_nvfragprog.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/swrast/s_nvfragprog.c b/src/mesa/swrast/s_nvfragprog.c index 127cc4f0b4..c262618dda 100644 --- a/src/mesa/swrast/s_nvfragprog.c +++ b/src/mesa/swrast/s_nvfragprog.c @@ -1215,9 +1215,9 @@ execute_program( GLcontext *ctx, const GLuint *rawBits = (const GLuint *) a; fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); result[0] = (((rawBits[0] >> 0) & 0xff) - 128) / 127.0F; - result[0] = (((rawBits[0] >> 8) & 0xff) - 128) / 127.0F; - result[0] = (((rawBits[0] >> 16) & 0xff) - 128) / 127.0F; - result[0] = (((rawBits[0] >> 24) & 0xff) - 128) / 127.0F; + result[1] = (((rawBits[0] >> 8) & 0xff) - 128) / 127.0F; + result[2] = (((rawBits[0] >> 16) & 0xff) - 128) / 127.0F; + result[3] = (((rawBits[0] >> 24) & 0xff) - 128) / 127.0F; store_vector4( inst, machine, result ); } break; @@ -1227,9 +1227,9 @@ execute_program( GLcontext *ctx, const GLuint *rawBits = (const GLuint *) a; fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); result[0] = ((rawBits[0] >> 0) & 0xff) / 255.0F; - result[0] = ((rawBits[0] >> 8) & 0xff) / 255.0F; - result[0] = ((rawBits[0] >> 16) & 0xff) / 255.0F; - result[0] = ((rawBits[0] >> 24) & 0xff) / 255.0F; + result[1] = ((rawBits[0] >> 8) & 0xff) / 255.0F; + result[2] = ((rawBits[0] >> 16) & 0xff) / 255.0F; + result[3] = ((rawBits[0] >> 24) & 0xff) / 255.0F; store_vector4( inst, machine, result ); } break; |