aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-08-05 20:16:21 -0700
committerEric Anholt <[email protected]>2011-08-16 13:04:42 -0700
commitcda28bca0d789c328d19bf90afd35a5ff74cfb77 (patch)
treec4cf5a08346dd9f70d4f352c8604873ae91ea8e9 /src
parent2b7632aeaa5f8b4ab3da7d33a3c71c71023a072a (diff)
i965/vs: Apply the gen6 math workaround for math1 instructions.
Fixes glsl-vs-masked-cos.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 4237373c13d..7e0535b5c02 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -122,14 +122,12 @@ vec4_visitor::emit_math1_gen6(enum opcode opcode, dst_reg dst, src_reg src)
{
/* The gen6 math instruction ignores the source modifiers --
* swizzle, abs, negate, and at least some parts of the register
- * region description. Move the source to the corresponding slots
- * of the destination generally work.
+ * region description.
*/
- src_reg expanded = src_reg(this, glsl_type::float_type);
- emit(BRW_OPCODE_MOV, dst, src);
- src = expanded;
+ src_reg temp_src = src_reg(this, glsl_type::vec4_type);
+ emit(BRW_OPCODE_MOV, dst_reg(temp_src), src);
- emit(opcode, dst, src);
+ emit(opcode, dst, temp_src);
}
void