This lets us call dump_instructions() after register allocation without failing an assertion.
This interacts trivially with my previous patch. Signed-off-by: Connor Abbott <connor.abb...@intel.com> --- src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 2233621..d626271 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp @@ -64,6 +64,8 @@ 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->virtual_grf_count = this->grf_used; } } @@ -523,6 +525,8 @@ fs_visitor::assign_regs(bool allow_spilling) } } + this->virtual_grf_count = this->grf_used; + ralloc_free(g); return true; -- 1.9.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev