[Mesa-dev] [PATCH 17/21] r600/compute: add support for emitting compute image/buffer atoms

Dave Airlie airlied at gmail.com
Wed Nov 29 04:36:26 UTC 2017


From: Dave Airlie <airlied at redhat.com>

---
 src/gallium/drivers/r600/evergreen_compute.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c
index b8e1c20..c9e649e 100644
--- a/src/gallium/drivers/r600/evergreen_compute.c
+++ b/src/gallium/drivers/r600/evergreen_compute.c
@@ -709,6 +709,8 @@ static void compute_emit_cs(struct r600_context *rctx,
 		rctx->b.dma.flush(rctx, RADEON_FLUSH_ASYNC, NULL);
 	}
 
+	r600_update_compressed_resource_state(rctx, true);
+
 	r600_need_cs_space(rctx, 0, true);
 	if (rctx->cs_shader_state.shader->ir_type == PIPE_SHADER_IR_TGSI) {
 		r600_shader_select(&rctx->b.b, rctx->cs_shader_state.shader->sel, &compute_dirty);
@@ -771,7 +773,13 @@ static void compute_emit_cs(struct r600_context *rctx,
 	/* Emit sampler view (texture resource) state */
 	r600_emit_atom(rctx, &rctx->samplers[PIPE_SHADER_COMPUTE].views.atom);
 
-	/* Emit compute shader state */
+	/* Emit images state */
+	r600_emit_atom(rctx, &rctx->compute_images.atom);
+
+	/* Emit buffers state */
+	r600_emit_atom(rctx, &rctx->compute_buffers.atom);
+
+	/* Emit shader state */
 	r600_emit_atom(rctx, &rctx->cs_shader_state.atom);
 
 	/* Emit dispatch state and dispatch packet */
-- 
2.9.5



More information about the mesa-dev mailing list