diff options
author | Connor Abbott <cwabbott0@gmail.com> | 2014-08-08 16:25:34 -0700 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2014-08-10 15:00:53 -0700 |
commit | b6df68ba5611bfd5b797301f32da0b9a33fc5849 (patch) | |
tree | 93d1ecca50b62600facd5fdf7af127a0bcd57b28 /src/mesa | |
parent | 58007aec4193e3bdb38cafcfb2188dcbd8f18def (diff) | |
download | external_mesa3d-b6df68ba5611bfd5b797301f32da0b9a33fc5849.zip external_mesa3d-b6df68ba5611bfd5b797301f32da0b9a33fc5849.tar.gz external_mesa3d-b6df68ba5611bfd5b797301f32da0b9a33fc5849.tar.bz2 |
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@gmail.com>
Signed-off-by: Connor Abbott <connor.abbott@intel.com>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 4 |
1 files changed, 4 insertions, 0 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 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; |