i965/fs: Dump IR when fatally not compiling due to bad register spilling.
authorEric Anholt <eric@anholt.net>
Thu, 6 Jun 2013 18:24:07 +0000 (11:24 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 26 Jun 2013 08:07:11 +0000 (01:07 -0700)
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

index be55533f378ca11426843b0e9b6129817ce445cb..33d4dcef4f5a104fa741062ef5f5675f641c47ca 100644 (file)
@@ -458,7 +458,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.");