alloc is about virtual registers, and grf_used is the number of actual
hardware registers used.  alloc's information is not terribly useful
after register allocation, but there's no real use in conflating them.

I plan to generate two CFGs from a single fs_visitor invocation, each
representing a different dispatch mode for basically the same shader.
This involves running register allocation twice, which means we can't
destroy the virtual register information.  (It's fine if we generate
extra VGRFs during RA due to spilling - the extra copy of the CFG
simply won't refer to them, so they'll be discarded in the 2nd RA.)
---
 src/intel/compiler/brw_fs_reg_allocate.cpp | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/intel/compiler/brw_fs_reg_allocate.cpp 
b/src/intel/compiler/brw_fs_reg_allocate.cpp
index ec8e116cb38..7c5ff2ed59c 100644
--- a/src/intel/compiler/brw_fs_reg_allocate.cpp
+++ b/src/intel/compiler/brw_fs_reg_allocate.cpp
@@ -66,8 +66,6 @@ fs_visitor::assign_regs_trivial()
    if (this->grf_used >= max_grf) {
       fail("Ran out of regs on trivial allocator (%d/%d)\n",
           this->grf_used, max_grf);
-   } else {
-      this->alloc.count = this->grf_used;
    }
 
 }
@@ -702,8 +700,6 @@ fs_visitor::assign_regs(bool allow_spilling, bool spill_all)
       }
    }
 
-   this->alloc.count = this->grf_used;
-
    ralloc_free(g);
 
    return true;
-- 
2.16.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to