mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
radeonsi: add use_aco field for struct si_shader
We are going to use aco for monolithic ps first. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22573>
This commit is contained in:
parent
ad33ff4de2
commit
326b027b25
2 changed files with 15 additions and 0 deletions
|
|
@ -2224,6 +2224,16 @@ void si_update_shader_binary_info(struct si_shader *shader, nir_shader *nir)
|
|||
shader->info.uses_vmem_sampler_or_bvh |= info.uses_vmem_sampler_or_bvh;
|
||||
}
|
||||
|
||||
static void si_determine_use_aco(struct si_shader *shader)
|
||||
{
|
||||
const struct si_shader_selector *sel = shader->selector;
|
||||
|
||||
if (!(sel->screen->debug_flags & DBG(USE_ACO)))
|
||||
return;
|
||||
|
||||
shader->use_aco = false;
|
||||
}
|
||||
|
||||
/* Generate code for the hardware VS shader stage to go with a geometry shader */
|
||||
static struct si_shader *
|
||||
si_nir_generate_gs_copy_shader(struct si_screen *sscreen,
|
||||
|
|
@ -2363,6 +2373,8 @@ bool si_compile_shader(struct si_screen *sscreen, struct ac_llvm_compiler *compi
|
|||
bool ret = true;
|
||||
struct si_shader_selector *sel = shader->selector;
|
||||
|
||||
si_determine_use_aco(shader);
|
||||
|
||||
/* We need this info only when legacy GS. */
|
||||
struct si_gs_output_info legacy_gs_output_info;
|
||||
if (sel->stage == MESA_SHADER_GEOMETRY && !shader->key.ge.as_ngg) {
|
||||
|
|
|
|||
|
|
@ -877,6 +877,9 @@ struct si_shader {
|
|||
bool is_gs_copy_shader;
|
||||
uint8_t wave_size;
|
||||
|
||||
/* Use ACO for compilation. */
|
||||
bool use_aco;
|
||||
|
||||
/* The following data is all that's needed for binary shaders. */
|
||||
struct si_shader_binary binary;
|
||||
struct ac_shader_config config;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue