summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnuj Phogat <anuj.phogat@gmail.com>2014-07-28 15:41:55 -0700
committerEmil Velikov <emil.l.velikov@gmail.com>2014-08-27 13:38:28 +0100
commit0ecb1cfad3876fd9065e1709f709c781cf9bc4a5 (patch)
treebb03e05ee2dcdd58082f58d6544f51c56d7447a8 /src
parent42bd348d218c0bdf399fadeb4bbf4e78c29d63c8 (diff)
i965: Bail on vec4 copy propagation for scratch writes with source modifiers
Fixes Khronos GLES3 CTS test: dynamic_expression_array_access_vertex Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> (cherry picked from commit 7c1ea00eafc882b67784e6cfd8ee46a7c6fc05dc)
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
index ce9b36c63ed..720c59fb22a 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
@@ -273,6 +273,10 @@ vec4_visitor::try_copy_propagation(vec4_instruction *inst, int arg,
if (has_source_modifiers && value.type != inst->src[arg].type)
return false;
+ if (has_source_modifiers &&
+ inst->opcode == SHADER_OPCODE_GEN4_SCRATCH_WRITE)
+ return false;
+
bool is_3src_inst = (inst->opcode == BRW_OPCODE_LRP ||
inst->opcode == BRW_OPCODE_MAD ||
inst->opcode == BRW_OPCODE_BFE ||