i965/vec4: if register allocation fails, don't try to schedule.
authorPaul Berry <stereotype441@gmail.com>
Wed, 16 Oct 2013 20:13:20 +0000 (13:13 -0700)
committerPaul Berry <stereotype441@gmail.com>
Fri, 25 Oct 2013 05:00:40 +0000 (22:00 -0700)
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 <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_vec4.cpp

index 589de48f33ae7af03fa2df1b9b0984fa2735fd4e..9cbbae0212a208630470f873b367c72977a12b9a 100644 (file)
@@ -1520,7 +1520,7 @@ vec4_visitor::run()
 
    while (!reg_allocate()) {
       if (failed)
-         break;
+         return false;
    }
 
    opt_schedule_instructions();