summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2019-02-01 21:16:54 +1100
committerTimothy Arceri <[email protected]>2019-02-01 22:25:30 +1100
commita53d68d3185f1eee4eccc5ddc8d8519c62df3686 (patch)
tree2e5d9b27f6b404b2dab910e888ecfb02acbaff0e /src/gallium/drivers/radeonsi
parent574186f0e8a336da9535131f1abcf3b49b1a6c14 (diff)
ac/radv/radeonsi: add ac_get_num_physical_sgprs() helper
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index a2ed899b58f..efae02ee91c 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -5380,10 +5380,9 @@ static void si_calculate_max_simd_waves(struct si_shader *shader)
/* Compute the per-SIMD wave counts. */
if (conf->num_sgprs) {
- if (sscreen->info.chip_class >= VI)
- max_simd_waves = MIN2(max_simd_waves, 800 / conf->num_sgprs);
- else
- max_simd_waves = MIN2(max_simd_waves, 512 / conf->num_sgprs);
+ max_simd_waves =
+ MIN2(max_simd_waves,
+ ac_get_num_physical_sgprs(sscreen->info.chip_class) / conf->num_sgprs);
}
if (conf->num_vgprs)