[Mesa-dev] [PATCH 6/9] r600/compute: only mark buffer/image state dirty for fragment shaders

Dave Airlie airlied at gmail.com
Mon Feb 5 04:29:05 UTC 2018


From: Dave Airlie <airlied at redhat.com>

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

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/gallium/drivers/r600/evergreen_state.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index 0999cc5de8..11e473d604 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -4062,7 +4062,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,
@@ -4238,7 +4239,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,
-- 
2.14.3



More information about the mesa-dev mailing list