r600/compute: only mark buffer/image state dirty for fragment shaders
authorDave Airlie <airlied@redhat.com>
Mon, 5 Feb 2018 00:14:19 +0000 (10:14 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 6 Feb 2018 20:08:12 +0000 (06:08 +1000)
The compute emission path always emits this currently, and emitting
it on the fragment path breaks the blitter.

This fixes gpu hangs in KHR-GL45.compute_shader.resource-texture

Reviewed-by: Roland Scheidegger <sorland@vmware.com>
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/evergreen_state.c

index 90f05c06d3fe19d63d2b46c4d7e8ae4264eea8c6..eb8eb376c2f9b73e00c96e0ffede29969c75a95a 100644 (file)
@@ -4060,7 +4060,8 @@ static void evergreen_set_shader_buffers(struct pipe_context *ctx,
                r600_mark_atom_dirty(rctx, &rctx->cb_misc_state.atom);
        }
 
-       r600_mark_atom_dirty(rctx, &istate->atom);
+       if (shader == PIPE_SHADER_FRAGMENT)
+               r600_mark_atom_dirty(rctx, &istate->atom);
 }
 
 static void evergreen_set_shader_images(struct pipe_context *ctx,
@@ -4236,7 +4237,8 @@ static void evergreen_set_shader_images(struct pipe_context *ctx,
                r600_mark_atom_dirty(rctx, &rctx->cb_misc_state.atom);
        }
 
-       r600_mark_atom_dirty(rctx, &istate->atom);
+       if (shader == PIPE_SHADER_FRAGMENT)
+               r600_mark_atom_dirty(rctx, &istate->atom);
 }
 
 static void evergreen_get_pipe_constant_buffer(struct r600_context *rctx,