diff options
author | Marek Olšák <[email protected]> | 2015-09-10 18:32:22 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-09-24 19:51:43 +0200 |
commit | 237d7cccce15b91590afa90020ff71324217fdb9 (patch) | |
tree | 5e2f9af1c69fd78f444ff5efbfcf34f5e97b2598 /src/gallium | |
parent | 9b6d9dd7d8d2779e2bd08787c26f51512b84f6d2 (diff) |
radeonsi: skip drawing if VS, TCS, TES, GS fail to compile or upload
Cc: 11.0 <[email protected]>
Acked-by: Christian König <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_shaders.c | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index 43d2e88d102..aabd499c629 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -1402,6 +1402,7 @@ bool si_update_shaders(struct si_context *sctx) { struct pipe_context *ctx = (struct pipe_context*)sctx; struct si_state_rasterizer *rs = sctx->queued.named.rasterizer; + int r; /* Update stages before GS. */ if (sctx->tes_shader) { @@ -1412,11 +1413,15 @@ bool si_update_shaders(struct si_context *sctx) } /* VS as LS */ - si_shader_select(ctx, sctx->vs_shader); + r = si_shader_select(ctx, sctx->vs_shader); + if (r) + return false; si_pm4_bind_state(sctx, ls, sctx->vs_shader->current->pm4); if (sctx->tcs_shader) { - si_shader_select(ctx, sctx->tcs_shader); + r = si_shader_select(ctx, sctx->tcs_shader); + if (r) + return false; si_pm4_bind_state(sctx, hs, sctx->tcs_shader->current->pm4); } else { if (!sctx->fixed_func_tcs_shader) { @@ -1425,12 +1430,17 @@ bool si_update_shaders(struct si_context *sctx) return false; } - si_shader_select(ctx, sctx->fixed_func_tcs_shader); + r = si_shader_select(ctx, sctx->fixed_func_tcs_shader); + if (r) + return false; si_pm4_bind_state(sctx, hs, sctx->fixed_func_tcs_shader->current->pm4); } - si_shader_select(ctx, sctx->tes_shader); + r = si_shader_select(ctx, sctx->tes_shader); + if (r) + return false; + if (sctx->gs_shader) { /* TES as ES */ si_pm4_bind_state(sctx, es, sctx->tes_shader->current->pm4); @@ -1441,18 +1451,24 @@ bool si_update_shaders(struct si_context *sctx) } } else if (sctx->gs_shader) { /* VS as ES */ - si_shader_select(ctx, sctx->vs_shader); + r = si_shader_select(ctx, sctx->vs_shader); + if (r) + return false; si_pm4_bind_state(sctx, es, sctx->vs_shader->current->pm4); } else { /* VS as VS */ - si_shader_select(ctx, sctx->vs_shader); + r = si_shader_select(ctx, sctx->vs_shader); + if (r) + return false; si_pm4_bind_state(sctx, vs, sctx->vs_shader->current->pm4); si_update_so(sctx, sctx->vs_shader); } /* Update GS. */ if (sctx->gs_shader) { - si_shader_select(ctx, sctx->gs_shader); + r = si_shader_select(ctx, sctx->gs_shader); + if (r) + return false; si_pm4_bind_state(sctx, gs, sctx->gs_shader->current->pm4); si_pm4_bind_state(sctx, vs, sctx->gs_shader->current->gs_copy_shader->pm4); si_update_so(sctx, sctx->gs_shader); |