summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-07-29 16:33:50 +0200
committerMarek Olšák <[email protected]>2016-08-06 13:56:14 +0200
commite62caf576e1c521d4d80c359f040a9978596e27d (patch)
tree237921d47d4626de2ab646f457ab0833e67e7586 /src/gallium
parentc56ecb68e75dedf0ca97dddf80fd1c318ab0986b (diff)
radeonsi: take compute shader and dispatch indirect memory usage into account
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_compute.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c
index e75f6bd2333..c3e8a35ba1d 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)