[Mesa-dev] [PATCH 2/2] i965: Bail on FS copy propagation for scratch writes with source modifiers

Anuj Phogat anuj.phogat at gmail.com
Mon Jul 28 20:47:03 PDT 2014


Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
---
I don't have a test case though it might be useful to also include 
the check for FS_OPCODE_FB_WRITE here?

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

diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
index 0716202..6d83194 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
@@ -311,6 +311,10 @@ fs_visitor::try_copy_propagate(fs_inst *inst, int arg, acp_entry *entry)
        !inst->can_do_source_mods(brw))
       return false;
 
+   if (has_source_modifiers &&
+       inst->opcode == SHADER_OPCODE_GEN4_SCRATCH_WRITE)
+      return false;
+
    /* Bail if the result of composing both strides would exceed the
     * hardware limit.
     */
-- 
1.9.3



More information about the mesa-dev mailing list