summaryrefslogtreecommitdiff
path: root/src/amd/compiler/aco_instruction_selection_setup.cpp
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2023-08-02 08:24:47 +0200
committerMarge Bot <emma+marge@anholt.net>2023-08-02 07:29:50 +0000
commitf433d39935f782f6d9fa4ecf8f084c221075aa63 (patch)
tree81ddfb51b708d8f4048d998bd43d701cbfeb7989 /src/amd/compiler/aco_instruction_selection_setup.cpp
parent572625ea6c16d545233d8d78184728b1a4a1c931 (diff)
aco: add infra for compiling TCS epilogs
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24417>
Diffstat (limited to 'src/amd/compiler/aco_instruction_selection_setup.cpp')
-rw-r--r--src/amd/compiler/aco_instruction_selection_setup.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/amd/compiler/aco_instruction_selection_setup.cpp b/src/amd/compiler/aco_instruction_selection_setup.cpp
index ea4810112ab..cc2089c9787 100644
--- a/src/amd/compiler/aco_instruction_selection_setup.cpp
+++ b/src/amd/compiler/aco_instruction_selection_setup.cpp
@@ -651,7 +651,7 @@ isel_context
setup_isel_context(Program* program, unsigned shader_count, struct nir_shader* const* shaders,
ac_shader_config* config, const struct aco_compiler_options* options,
const struct aco_shader_info* info, const struct ac_shader_args* args,
- bool is_ps_epilog)
+ bool is_ps_epilog, bool is_tcs_epilog)
{
SWStage sw_stage = SWStage::None;
for (unsigned i = 0; i < shader_count; i++) {
@@ -680,6 +680,11 @@ setup_isel_context(Program* program, unsigned shader_count, struct nir_shader* c
sw_stage = SWStage::FS;
}
+ if (is_tcs_epilog) {
+ assert(shader_count == 0 && !shaders);
+ sw_stage = SWStage::TCS;
+ }
+
init_program(program, Stage{info->hw_stage, sw_stage}, info, options->gfx_level, options->family,
options->wgp_mode, config);
@@ -696,7 +701,7 @@ setup_isel_context(Program* program, unsigned shader_count, struct nir_shader* c
ASSERTED bool mesh_shading = ctx.stage.has(SWStage::TS) || ctx.stage.has(SWStage::MS);
assert(!mesh_shading || ctx.program->gfx_level >= GFX10_3);
- if (ctx.stage == tess_control_hs)
+ if (ctx.stage == tess_control_hs && !is_tcs_epilog)
setup_tcs_info(&ctx, shaders[0], NULL);
else if (ctx.stage == vertex_tess_control_hs)
setup_tcs_info(&ctx, shaders[1], shaders[0]);