summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-09-10 18:33:10 +0200
committerMarek Olšák <[email protected]>2015-09-24 19:51:43 +0200
commit1f99b0be7e4e300c2b1761437f740a604ab036bc (patch)
tree9f5861dc64ccd87431f43828b993d1196d84f9a8
parent237d7cccce15b91590afa90020ff71324217fdb9 (diff)
radeonsi: skip drawing if PS fails to compile or upload
Cc: 11.0 <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index aabd499c629..b006f524b81 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -1487,18 +1487,9 @@ bool si_update_shaders(struct si_context *sctx)
si_update_vgt_shader_config(sctx);
- si_shader_select(ctx, sctx->ps_shader);
-
- if (!sctx->ps_shader->current) {
- struct si_shader_selector *sel;
-
- /* use a dummy shader if compiling the shader (variant) failed */
- si_make_dummy_ps(sctx);
- sel = sctx->dummy_pixel_shader;
- si_shader_select(ctx, sel);
- sctx->ps_shader->current = sel->current;
- }
-
+ r = si_shader_select(ctx, sctx->ps_shader);
+ if (r)
+ return false;
si_pm4_bind_state(sctx, ps, sctx->ps_shader->current->pm4);
if (si_pm4_state_changed(sctx, ps) || si_pm4_state_changed(sctx, vs) ||