Mesa (master): i965/fs: set virtual_grf_count in assign_regs()
Matt Turner
mattst88 at kemper.freedesktop.org
Sun Aug 10 22:00:12 UTC 2014
Module: Mesa
Branch: master
Commit: b6df68ba5611bfd5b797301f32da0b9a33fc5849
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b6df68ba5611bfd5b797301f32da0b9a33fc5849
Author: Connor Abbott <cwabbott0 at gmail.com>
Date: Fri Aug 8 16:25:34 2014 -0700
i965/fs: set virtual_grf_count in assign_regs()
This lets us call dump_instructions() after register allocation without
failing an assertion.
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Signed-off-by: Connor Abbott <connor.abbott at 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;
More information about the mesa-commit
mailing list