[Mesa-dev] [PATCH 1/2] i965/fs: Dump IR when fatally not compiling due to bad register spilling.

Eric Anholt eric at anholt.net
Fri Jun 7 12:00:39 PDT 2013


It should never happen, but it does, and at this point, you're going to
_mesa_problem() and abort() (unless it's just in precompile).  Give the
developer something to look at.
---
 src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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 acd9846..cf74bf4 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
@@ -459,7 +459,8 @@ fs_visitor::assign_regs()
       int reg = choose_spill_reg(g);
 
       if (reg == -1) {
-	 fail("no register to spill\n");
+         fail("no register to spill:\n");
+         dump_instructions();
       } else if (dispatch_width == 16) {
 	 fail("Failure to register allocate.  Reduce number of live scalar "
               "values to avoid this.");
-- 
1.8.3.rc0



More information about the mesa-dev mailing list