From c6d74a4992474b530fac2d66c27117e172a5c15c Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 6 Jun 2013 11:24:07 -0700 Subject: [PATCH] i965/fs: Dump IR when fatally not compiling due to bad register spilling. 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 be55533f378..33d4dcef4f5 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp @@ -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."); -- 2.30.2