[Mesa-dev] [PATCH 2/2] radeonsi: add a performance tweak for 4 SE parts

Marek Olšák maraeo at gmail.com
Fri Jun 3 15:14:21 UTC 2016


From: Marek Olšák <marek.olsak at amd.com>

Ported from Vulkan.
---
 src/gallium/drivers/radeonsi/si_state_draw.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c
index c2d9a2f..f43d56e 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.c
+++ b/src/gallium/drivers/radeonsi/si_state_draw.c
@@ -307,6 +307,17 @@ static unsigned si_get_ia_multi_vgt_param(struct si_context *sctx,
 		    (info->indirect || info->instance_count > 1))
 			wd_switch_on_eop = true;
 
+		/* Performance recommendation for 4 SE Gfx7-8 parts if
+		 * instances are smaller than a primgroup. Ignore the fact
+		 * primgroup_size is a primitive count, not vertex count.
+		 * Don't do anything for indirect draws.
+		 */
+		if (sctx->b.chip_class <= VI &&
+		    sctx->b.screen->info.max_se >= 4 &&
+		    !info->indirect &&
+		    info->instance_count > 1 && info->count < primgroup_size)
+			wd_switch_on_eop = true;
+
 		/* Required on CIK and later. */
 		if (sctx->b.screen->info.max_se > 2 && !wd_switch_on_eop)
 			ia_switch_on_eoi = true;
-- 
2.7.4



More information about the mesa-dev mailing list