i965/eu: Set execution size explicitly for memory fence send message.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 26 Apr 2016 02:20:12 +0000 (19:20 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Sat, 28 May 2016 06:28:59 +0000 (23:28 -0700)
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.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/brw_eu_emit.c

index cbd7e1ace48ae9a870c484bf7f28d7f94ea0f1b7..9dba818b1b30ab7b46be70cce957656d28e3ff27 100644 (file)
@@ -3261,6 +3261,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.
     */
@@ -3287,12 +3292,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