llvmpipe: fix incorrect array indexing when saving blend color
authorBrian Paul <brianp@vmware.com>
Fri, 4 Dec 2009 00:00:22 +0000 (17:00 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 4 Dec 2009 00:00:22 +0000 (17:00 -0700)
src/gallium/drivers/llvmpipe/lp_setup.c

index 36bd0ad4ddc8192daf6e57bae394852da57cbeb6..8ef764eb80a6450893cbd7720a1f674e0cee8e4f 100644 (file)
@@ -543,7 +543,7 @@ lp_setup_update_shader_state( struct setup_context *setup )
       for (i = 0; i < 4; ++i) {
          uint8_t c = float_to_ubyte(setup->blend_color.current.color[i]);
          for (j = 0; j < 16; ++j)
-            stored[i*4 + j] = c;
+            stored[i*16 + j] = c;
       }
 
       setup->blend_color.stored = stored;