[Mesa-dev] [PATCH 2/8] i965/vec4: if register allocation fails, don't try to schedule.

Paul Berry stereotype441 at gmail.com
Thu Oct 17 17:14:05 CEST 2013


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.
---
 src/mesa/drivers/dri/i965/brw_vec4.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index d774e6f..89f1978 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();
-- 
1.8.4.1



More information about the mesa-dev mailing list