From 8ba718fb7db7514e627f704d7c244511937efc36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 8 Jan 2025 15:16:02 -0500 Subject: [PATCH] radeonsi/gfx12: use ACO for streamout because it's faster Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_shader_info.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader_info.c b/src/gallium/drivers/radeonsi/si_shader_info.c index 31b03bf1028..9725de1e818 100644 --- a/src/gallium/drivers/radeonsi/si_shader_info.c +++ b/src/gallium/drivers/radeonsi/si_shader_info.c @@ -9,6 +9,7 @@ #include "util/mesa-sha1.h" #include "sid.h" #include "nir.h" +#include "nir_xfb_info.h" #include "aco_interface.h" #include "ac_nir.h" @@ -539,8 +540,11 @@ void si_nir_scan_shader(struct si_screen *sscreen, struct nir_shader *nir, } nir->info.use_aco_amd = aco_is_gpu_supported(&sscreen->info) && - (sscreen->use_aco || nir->info.use_aco_amd || force_use_aco) && - sscreen->info.has_image_opcodes; + sscreen->info.has_image_opcodes && + (sscreen->use_aco || nir->info.use_aco_amd || force_use_aco || + /* Use ACO for streamout on gfx12 because it's faster. */ + (sscreen->info.gfx_level >= GFX12 && nir->xfb_info && + nir->xfb_info->output_count)); if (nir->info.stage == MESA_SHADER_FRAGMENT) { /* post_depth_coverage implies early_fragment_tests */