From 1f3858509c17ba8a728e39d5355cc43c8e5b6a83 Mon Sep 17 00:00:00 2001 From: Qiang Yu Date: Sat, 5 Aug 2023 17:24:55 +0800 Subject: [PATCH] radeonsi: enable aco compile for part mode standalone vs MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák Signed-off-by: Qiang Yu Part-of: --- src/gallium/drivers/radeonsi/si_shader.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 06c7d06..dabf8d9 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -2396,8 +2396,6 @@ static void si_determine_use_aco(struct si_shader *shader) switch (sel->stage) { case MESA_SHADER_VERTEX: - shader->use_aco = shader->is_monolithic; - break; case MESA_SHADER_TESS_CTRL: case MESA_SHADER_TESS_EVAL: case MESA_SHADER_GEOMETRY: @@ -2896,9 +2894,21 @@ si_get_shader_part(struct si_screen *sscreen, struct si_shader_part **list, result = CALLOC_STRUCT(si_shader_part); result->key = *key; - bool use_aco = - (sscreen->debug_flags & DBG(USE_ACO)) && sscreen->info.has_graphics && - stage == MESA_SHADER_TESS_CTRL && sscreen->info.gfx_level <= GFX8; + bool use_aco = (sscreen->debug_flags & DBG(USE_ACO)) && sscreen->info.has_graphics; + if (use_aco) { + switch (stage) { + case MESA_SHADER_VERTEX: + use_aco = sscreen->info.gfx_level <= GFX8 || + !(key->vs_prolog.as_ls || key->vs_prolog.as_es); + break; + case MESA_SHADER_TESS_CTRL: + use_aco = sscreen->info.gfx_level <= GFX8; + break; + default: + use_aco = false; + break; + } + } bool ok = use_aco ? si_aco_build_shader_part(sscreen, stage, prolog, debug, name, result) : -- 2.7.4