From 4e058f6c4803be5d9d676338d6aee2775b88b87c Mon Sep 17 00:00:00 2001
From: Brian Paul <brianp@vmware.com>
Date: Thu, 3 Dec 2009 17:00:22 -0700
Subject: llvmpipe: fix incorrect array indexing when saving blend color

---
 src/gallium/drivers/llvmpipe/lp_setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src')

diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c
index 36bd0ad4ddc..8ef764eb80a 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup.c
@@ -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;
-- 
cgit v1.2.3