summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c b/src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c
index 805d9fd4b2..01328c1c48 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c
+++ b/src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c
@@ -1353,7 +1353,7 @@ emit_declaration(
LLVMValueRef input = bld->base.undef;
if( mask & (1 << chan) ) {
- LLVMValueRef index = LLVMConstInt(LLVMInt32Type(), attrib*NUM_CHANNELS + chan, 0);
+ LLVMValueRef index = LLVMConstInt(LLVMInt32Type(), (1 + attrib)*NUM_CHANNELS + chan, 0);
LLVMValueRef a0;
LLVMValueRef dadx;
LLVMValueRef dady;