diff options
author | Marek Olšák <[email protected]> | 2018-08-02 16:37:17 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-08-29 15:31:42 -0400 |
commit | 5914f5bd4a2566d39dc14f4dc907900210923a37 (patch) | |
tree | 9dad05d5d36d5f6e37b18d999ab8b281241abbe1 /src/gallium/drivers/radeonsi | |
parent | c5442c116563b1a35f0dbaa8d92c9c5c68391d79 (diff) |
radeonsi: let internal compute dispatches tune WAVES_PER_SH
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_compute.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c index c5d3d5fcf02..e0c6902fec4 100644 --- a/src/gallium/drivers/radeonsi/si_compute.c +++ b/src/gallium/drivers/radeonsi/si_compute.c @@ -784,6 +784,14 @@ static void si_emit_dispatch_packets(struct si_context *sctx, */ if (num_cu_per_se % 4 && waves_per_threadgroup == 1) compute_resource_limits |= S_00B854_FORCE_SIMD_DIST(1); + + compute_resource_limits |= S_00B854_WAVES_PER_SH(sctx->cs_max_waves_per_sh); + } else { + /* SI */ + if (sctx->cs_max_waves_per_sh) { + unsigned limit_div16 = DIV_ROUND_UP(sctx->cs_max_waves_per_sh, 16); + compute_resource_limits |= S_00B854_WAVES_PER_SH_SI(limit_div16); + } } radeon_set_sh_reg(cs, R_00B854_COMPUTE_RESOURCE_LIMITS, diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index 100d0166f62..fe06064b388 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -825,6 +825,7 @@ struct si_context { /* shader information */ struct si_vertex_elements *vertex_elements; unsigned sprite_coord_enable; + unsigned cs_max_waves_per_sh; bool flatshade; bool do_update_shaders; |