Mesa (master): radeonsi: take compute shader and dispatch indirect memory usage into account

Marek Olšák mareko at kemper.freedesktop.org
Sat Aug 6 12:27:34 UTC 2016


Module: Mesa
Branch: master
Commit: e62caf576e1c521d4d80c359f040a9978596e27d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e62caf576e1c521d4d80c359f040a9978596e27d

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Fri Jul 29 16:33:50 2016 +0200

radeonsi: take compute shader and dispatch indirect memory usage into account

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

---

 src/gallium/drivers/radeonsi/si_compute.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c
index e75f6bd..c3e8a35 100644
--- a/src/gallium/drivers/radeonsi/si_compute.c
+++ b/src/gallium/drivers/radeonsi/si_compute.c
@@ -462,6 +462,12 @@ static void si_launch_grid(
 
 	si_decompress_compute_textures(sctx);
 
+	/* Add buffer sizes for memory checking in need_cs_space. */
+	r600_context_add_resource_size(ctx, &program->shader.bo->b.b);
+	if (info->indirect)
+		r600_context_add_resource_size(ctx, info->indirect);
+	/* TODO: add the scratch buffer */
+
 	si_need_cs_space(sctx);
 
 	if (!sctx->cs_shader_state.initialized)




More information about the mesa-commit mailing list