From: Paul Berry Date: Wed, 16 Oct 2013 20:13:20 +0000 (-0700) Subject: i965/vec4: if register allocation fails, don't try to schedule. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=89647cffb31ee1ea42d581b1053b4bb147b3e58a;p=mesa.git i965/vec4: if register allocation fails, don't try to schedule. Otherwise the scheduler would be invoked with prog_data->total_grf == 0, causing havoc. In a future patch, this will allow us to try compiling a geometry shader in DUAL_OBJECT mode with spilling disabled, and then fall back to DUAL_INSTANCED mode if that failed. Reviewed-by: Eric Anholt --- diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 589de48f33a..9cbbae0212a 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -1520,7 +1520,7 @@ vec4_visitor::run() while (!reg_allocate()) { if (failed) - break; + return false; } opt_schedule_instructions();