intel/fs/ra: Initialize grf_used with first_non_payload_grf
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 8 May 2019 01:11:08 +0000 (20:11 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Tue, 14 May 2019 17:30:22 +0000 (12:30 -0500)
There's no reason why we need to use the calculated payload_node_count
value which is just first_non_payload_grf aligned up.  The grf_used
value will be aligned up to 16 anyway (which is a much bigger alignment)
before being handed off to hardware.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/compiler/brw_fs_reg_allocate.cpp

index 35903c4030e77c9132f4e11b2234c830192af701..2debd36f2318eb6719d27e7ca85f9fccb4f16b86 100644 (file)
@@ -749,7 +749,7 @@ fs_visitor::assign_regs(bool allow_spilling, bool spill_all)
     * regs in the register classes back down to real hardware reg
     * numbers.
     */
-   this->grf_used = payload_node_count;
+   this->grf_used = this->first_non_payload_grf;
    for (unsigned i = 0; i < this->alloc.count; i++) {
       int reg = ra_get_node_reg(g, i);