radeonsi: skip drawing if PS fails to compile or upload
authorMarek Olšák <marek.olsak@amd.com>
Thu, 10 Sep 2015 16:33:10 +0000 (18:33 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 24 Sep 2015 17:51:43 +0000 (19:51 +0200)
Cc: 11.0 <mesa-stable@lists.freedesktop.org>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeonsi/si_state_shaders.c

index aabd499c629af83aff0519d22bd539e09e1e09a8..b006f524b818463a36618df9e3fb86f6d7b9edbf 100644 (file)
@@ -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) ||