[Mesa-dev] [PATCH 14/21] i965/eu: Set execution size explicitly for memory fence send message.

Francisco Jerez currojerez at riseup.net
Tue May 24 07:18:51 UTC 2016


We don't want to emit a 32-wide send message in 32-wide programs.  The
memory fence message should have the same effect regardless of the
execution size (as long as it's valid) so just set it to one.
---
 src/mesa/drivers/dri/i965/brw_eu_emit.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
index 4732e57..3ae136d 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
@@ -3260,6 +3260,11 @@ brw_memory_fence(struct brw_codegen *p,
    const bool commit_enable = devinfo->gen == 7 && !devinfo->is_haswell;
    struct brw_inst *insn;
 
+   brw_push_insn_state(p);
+   brw_set_default_mask_control(p, BRW_MASK_DISABLE);
+   brw_set_default_exec_size(p, BRW_EXECUTE_1);
+   dst = vec1(dst);
+
    /* Set dst as destination for dependency tracking, the MEMORY_FENCE
     * message doesn't write anything back.
     */
@@ -3286,12 +3291,10 @@ brw_memory_fence(struct brw_codegen *p,
        * cache messages will be properly ordered with respect to past data and
        * render cache messages.
        */
-      brw_push_insn_state(p);
-      brw_set_default_compression_control(p, BRW_COMPRESSION_NONE);
-      brw_set_default_mask_control(p, BRW_MASK_DISABLE);
       brw_MOV(p, dst, offset(dst, 1));
-      brw_pop_insn_state(p);
    }
+
+   brw_pop_insn_state(p);
 }
 
 void
-- 
2.7.3



More information about the mesa-dev mailing list