summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2015-07-31 14:36:30 +0200
committerIago Toral Quiroga <[email protected]>2015-08-07 08:12:50 +0200
commitf246aa6bcab57f85a143cbfe7e9de24237921249 (patch)
tree4daa4e73c30c79b69a8453afa88214f4962e40a9 /src/mesa/drivers
parent42d283a0cc928a9e3ecddf1a90f9417ef1a34392 (diff)
i965/vec4: do not predicate scratch writes for BRW_OPCODE_SEL instructions
The dst is always written, in this case the predicate is only used to select the value to write, so if we are spilling the dst we always want to write whatever value we selected to scratch. Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index c5c0d2c73e0..ba352be3ad5 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -3482,7 +3482,8 @@ vec4_visitor::emit_scratch_write(bblock_t *block, vec4_instruction *inst,
dst_reg dst = dst_reg(brw_writemask(brw_vec8_grf(0, 0),
inst->dst.writemask));
vec4_instruction *write = SCRATCH_WRITE(dst, temp, index);
- write->predicate = inst->predicate;
+ if (inst->opcode != BRW_OPCODE_SEL)
+ write->predicate = inst->predicate;
write->ir = inst->ir;
write->annotation = inst->annotation;
inst->insert_after(block, write);