summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_draw.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2016-11-07 09:05:59 -0800
committerEric Anholt <[email protected]>2016-11-09 15:33:56 -0800
commit4d019bd703e7c20d56d5b858577607115b4926a3 (patch)
treecf8f52d1267a6f472247e010d707a1ef86467830 /src/gallium/drivers/vc4/vc4_draw.c
parentaaee3daa90578fb711cc89186a65bc3d2c68022f (diff)
vc4: Don't abort when a shader compile fails.
It's much better to just skip the draw call entirely. Getting this information out of register allocation will also be useful for implementing threaded fragment shaders, which will need to retry non-threaded if RA fails. Cc: <[email protected]>
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_draw.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_draw.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_draw.c b/src/gallium/drivers/vc4/vc4_draw.c
index 61c58424cdf..c5afc0cdae1 100644
--- a/src/gallium/drivers/vc4/vc4_draw.c
+++ b/src/gallium/drivers/vc4/vc4_draw.c
@@ -307,7 +307,10 @@ vc4_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
}
vc4_start_draw(vc4);
- vc4_update_compiled_shaders(vc4, info->mode);
+ if (!vc4_update_compiled_shaders(vc4, info->mode)) {
+ debug_warn_once("shader compile failed, skipping draw call.\n");
+ return;
+ }
vc4_emit_state(pctx);