radeonsi: fix a u_blitter crash after a shader with FBFETCH
authorMarek Olšák <marek.olsak@amd.com>
Fri, 11 Jan 2019 20:11:30 +0000 (15:11 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 22 Jan 2019 16:59:27 +0000 (11:59 -0500)
This fixes an assertion failure with GL CTS when cts-runner is used.
(not a specific test)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108877
Cc: 18.3 <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/radeonsi/si_state_shaders.c

index 2adae673808b9afced1e73e1ef764a6697b3854a..007175d3bbea59184de683d8a287e7c5b28fff98 100644 (file)
@@ -1657,7 +1657,7 @@ static inline void si_shader_selector_key(struct pipe_context *ctx,
                key->part.ps.epilog.alpha_func = si_get_alpha_test_func(sctx);
 
                /* ps_uses_fbfetch is true only if the color buffer is bound. */
-               if (sctx->ps_uses_fbfetch) {
+               if (sctx->ps_uses_fbfetch && !sctx->blitter->running) {
                        struct pipe_surface *cb0 = sctx->framebuffer.state.cbufs[0];
                        struct pipe_resource *tex = cb0->texture;