svga: if svga_update_state() fails, skip the draw call
authorBrian Paul <brianp@vmware.com>
Wed, 21 Feb 2018 20:57:39 +0000 (13:57 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 2 Mar 2018 19:23:50 +0000 (12:23 -0700)
commit72df3a7a3957a13c4a667ffb2295ced7b91e5620
treeb87847da62764c6a6eecbf4a8f494de7573b9217
parent0a7deaa0d6d14fcc21cad08d9acae688ed7c9fcb
svga: if svga_update_state() fails, skip the draw call

If svga_update_state() fails, we flush the command buffer and retry.
If it fails again, it likely means we were unable to translate a shader
for some reason (uses too many resources, for example).  In that case,
let's just skip the draw call.  The alternative, just disabling the
shader stage in question, would certainly lead to bad rendering anyway,
and probably device errors.

Fixes failed assertion running Piglit glsl-1.50/execution/
variable-indexing/gs-output-array-vec4-index-wr.shader_test since it
uses too many GS output registers (though the test still fails).
VMware bug 2063492.

v2: also call pipe_debug_message() so apps or apitrace can be notified
when this issue occurs.
v3: use svga_update_state_retry().

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
src/gallium/drivers/svga/svga_pipe_draw.c