i965: Don't use message headers for untyped reads
authorKristian Høgsberg Kristensen <krh@bitplanet.net>
Sat, 17 Oct 2015 04:38:05 +0000 (21:38 -0700)
committerKristian Høgsberg Kristensen <krh@bitplanet.net>
Fri, 23 Oct 2015 16:42:28 +0000 (09:42 -0700)
We always set the mask to 0xffff, which is what it defaults to when no
header is present. Let's drop the header instead.

v2: Only remove header for untyped reads. Typed reads always need the
    header.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Kristian Høgsberg Kristensen <krh@bitplanet.net>
src/mesa/drivers/dri/i965/brw_eu_emit.c
src/mesa/drivers/dri/i965/brw_fs.cpp

index bf2fee9ed4818c933ef08a37dca5eeb187b05e5e..ebd811f967417aaf4994e133a9a1e971322e2667 100644 (file)
@@ -2906,11 +2906,10 @@ brw_untyped_surface_read(struct brw_codegen *p,
    const unsigned sfid = (devinfo->gen >= 8 || devinfo->is_haswell ?
                           HSW_SFID_DATAPORT_DATA_CACHE_1 :
                           GEN7_SFID_DATAPORT_DATA_CACHE);
-   const bool align1 = (brw_inst_access_mode(devinfo, p->current) == BRW_ALIGN_1);
    struct brw_inst *insn = brw_send_indirect_surface_message(
       p, sfid, dst, payload, surface, msg_length,
       brw_surface_payload_size(p, num_channels, true, true),
-      align1);
+      false);
 
    brw_set_dp_untyped_surface_read_message(
       p, insn, num_channels);
index 71da9d9f7b6519cc472bdf92f39eb1b72e0265b1..c8df9407f03417ecd56090c72c35c79cbb097eb5 100644 (file)
@@ -4070,7 +4070,7 @@ fs_visitor::lower_logical_sends()
       case SHADER_OPCODE_UNTYPED_SURFACE_READ_LOGICAL:
          lower_surface_logical_send(ibld, inst,
                                     SHADER_OPCODE_UNTYPED_SURFACE_READ,
-                                    fs_reg(0xffff));
+                                    fs_reg());
          break;
 
       case SHADER_OPCODE_UNTYPED_SURFACE_WRITE_LOGICAL: