diff options
author | Eric Anholt <[email protected]> | 2011-08-11 16:27:41 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2011-08-16 13:04:43 -0700 |
commit | 54e66a0a6327b55f15a7c641ec68da505ff19a35 (patch) | |
tree | 851a412efff3aff1f461777ee09314ea3461add7 /src | |
parent | 7642c1de6b65b7dfd9e39904291cc9737cd54b56 (diff) |
i965/vs: Fix abs/negate handling on attributes.
Fixes glsl-vs-neg-attribute and glsl-vs-abs-attribute.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_emit.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp index 9ef6ab6de90..6b0ae42e0e0 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp @@ -65,9 +65,16 @@ vec4_visitor::setup_attributes(int payload_reg) continue; int grf = attribute_map[inst->src[i].reg + inst->src[i].reg_offset]; + + struct brw_reg reg = brw_vec8_grf(grf, 0); + reg.dw1.bits.swizzle = inst->src[i].swizzle; + if (inst->src[i].abs) + reg = brw_abs(reg); + if (inst->src[i].negate) + reg = negate(reg); + inst->src[i].file = HW_REG; - inst->src[i].fixed_hw_reg = brw_vec8_grf(grf, 0); - inst->src[i].fixed_hw_reg.dw1.bits.swizzle = inst->src[i].swizzle; + inst->src[i].fixed_hw_reg = reg; } } |