ir_to_mesa: Let check_resources halt compilation
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 11 Oct 2011 23:27:41 +0000 (16:27 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 28 Oct 2011 20:28:55 +0000 (13:28 -0700)
commit276000472abbc34d86fcb628bc3a1990e9581af3
treeea58c8b163a8a51d98b7b29b9064e5c284d629d2
parent6da9b21f716d97fc9ef4797abb6368b0a5f92a14
ir_to_mesa: Let check_resources halt compilation

Previously check_resources could fail, but we'd still try to optimize
the shader, do device-specific code generation, etc.  In some cases,
this could explode (especially in the device-specific code
generation).  I haven't found that I could trigger this with the
current code.  When too many samplers were used with the new uniform
handling code, I observed several crashes deep down in the driver.

NOTE: This is candidate for the 7.11 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41609
Cc: Eric Anholt <eric@anholt.net>
Reviewed-and-tested-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/program/ir_to_mesa.cpp