Mesa (master): i965: Bail on vec4 copy propagation for scratch writes with source modifiers

Anuj Phogat aphogat at kemper.freedesktop.org
Thu Aug 14 18:10:07 UTC 2014


Module: Mesa
Branch: master
Commit: 7c1ea00eafc882b67784e6cfd8ee46a7c6fc05dc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7c1ea00eafc882b67784e6cfd8ee46a7c6fc05dc

Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Mon Jul 28 15:41:55 2014 -0700

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 at lists.freedesktop.org>
Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>

---

 src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp |    4 ++++
 1 file changed, 4 insertions(+)

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 28f162d..37ca661 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 @@ try_copy_propagate(struct brw_context *brw, vec4_instruction *inst,
    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 ||




More information about the mesa-commit mailing list