Mesa (master): i965/fs: Delete is_last_send(); just check inst->eot.

Kenneth Graunke kwg at kemper.freedesktop.org
Fri Feb 6 08:06:27 UTC 2015


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

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Wed Feb  4 21:17:55 2015 -0800

i965/fs: Delete is_last_send(); just check inst->eot.

This helper function basically just checks inst->eot, but also asserts
that only opcodes we expect to terminate threads have EOT set.  As far
as I'm aware, we've never had such a bug.

Removing it means that we don't have to extend the list for new opcodes.
Cherryview and Skylake introduce an optimization where sampler messages
can have EOT set; scalar GS/HS/DS will likely introduce new opcodes as
well.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Ben Widawsky <ben at bwidawsk.net>

---

 src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp |   15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
index eba2fdd..8a14ce4 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
@@ -523,19 +523,6 @@ fs_visitor::setup_mrf_hack_interference(struct ra_graph *g, int first_mrf_node)
    }
 }
 
-static bool
-is_last_send(fs_inst *inst)
-{
-   switch (inst->opcode) {
-   case SHADER_OPCODE_URB_WRITE_SIMD8:
-   case FS_OPCODE_FB_WRITE:
-      return inst->eot;
-   default:
-      assert(!inst->eot);
-      return false;
-   }
-}
-
 bool
 fs_visitor::assign_regs(bool allow_spilling)
 {
@@ -608,7 +595,7 @@ fs_visitor::assign_regs(bool allow_spilling)
           * We could just do "something high".  Instead, we just pick the
           * highest register that works.
           */
-         if (is_last_send(inst)) {
+         if (inst->eot) {
             int size = virtual_grf_sizes[inst->src[0].reg];
             int reg = screen->wm_reg_sets[rsi].class_to_ra_reg_range[size] - 1;
             ra_set_node_reg(g, inst->src[0].reg, reg);




More information about the mesa-commit mailing list