diff options
author | Eric Anholt <[email protected]> | 2011-08-09 15:08:47 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2011-08-16 13:04:43 -0700 |
commit | a55fbbc1a2b579aed1e80036367b521ef6928f66 (patch) | |
tree | 4a528efe31693f55f2c172f948571ada2f67b8e8 /src/mesa | |
parent | fea7d34b3545878ce00914f388e1eeebf55f7748 (diff) |
i965/vs: Fix access of attribute arrays.
By leaving out the column index, we were reading an unallocated
attribute on glsl-mat-attribute.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_emit.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp index df9521cd04e..517a3e3c75b 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp @@ -52,8 +52,9 @@ vec4_visitor::setup_attributes(int payload_reg) if (inst->src[i].file != ATTR) continue; + int grf = attribute_map[inst->src[i].reg + inst->src[i].reg_offset]; inst->src[i].file = HW_REG; - inst->src[i].fixed_hw_reg = brw_vec8_grf(attribute_map[inst->src[i].reg], 0); + inst->src[i].fixed_hw_reg = brw_vec8_grf(grf, 0); inst->src[i].fixed_hw_reg.dw1.bits.swizzle = inst->src[i].swizzle; } } |