Mesa (master): intel/compiler: Set "Null Render Target" ex_desc bit on Gen11

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Sep 17 22:16:22 UTC 2019


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

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue Aug 27 11:22:33 2019 -0700

intel/compiler: Set "Null Render Target" ex_desc bit on Gen11

When there are no color regions (i.e. a depth only pass), we can set
the "Null Render Target" bit in the Gen11 RT write extended message
descriptor to indicate that it should behave as if it's writing to a
null render target, without the need for a binding table entry.

This lets drivers avoid setting up that null RT binding table entry,
but more importantly means the HW doesn't actually have to bother
looking up the surface state.

Together with the next patch, this improves performance in Car Chase on
an Icelake 8x8 (locked to 700Mhz) by 0.0445526% +/- 0.0132736% (n=832).

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>

---

 src/intel/compiler/brw_fs.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index 086844ae433..a677c8fd968 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -4494,6 +4494,9 @@ lower_fb_write_logical_send(const fs_builder &bld, fs_inst *inst,
           * in the extended message descriptor, in lieu of using a header.
           */
          ex_desc = inst->target << 12 | src0_alpha_present << 15;
+
+         if (key->nr_color_regions == 0)
+            ex_desc |= 1 << 20; /* Null Render Target */
       }
 
       inst->opcode = SHADER_OPCODE_SEND;




More information about the mesa-commit mailing list