aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorTimur Kristóf <[email protected]>2020-02-12 15:33:02 +0100
committerMarge Bot <[email protected]>2020-03-11 08:34:10 +0000
commit90167112736c603f9f839506e4aa69fe3b8c848d (patch)
treecaecfbd62b4e7ae2395ff851d32eda9976cc48f3 /src/amd
parent89ff5b1e514e5473a3fa2700517904caf0bfdfa2 (diff)
aco: Setup correct HW stages when tessellation is used.
Signed-off-by: Timur Kristóf <[email protected]> Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/compiler/aco_instruction_selection_setup.cpp12
-rw-r--r--src/amd/compiler/aco_ir.h2
2 files changed, 13 insertions, 1 deletions
diff --git a/src/amd/compiler/aco_instruction_selection_setup.cpp b/src/amd/compiler/aco_instruction_selection_setup.cpp
index 9005c707586..5d6fd1b9f53 100644
--- a/src/amd/compiler/aco_instruction_selection_setup.cpp
+++ b/src/amd/compiler/aco_instruction_selection_setup.cpp
@@ -1038,6 +1038,18 @@ setup_isel_context(Program* program,
program->stage |= hw_vs;
else if (program->stage == (sw_vs | sw_gs) && gfx9_plus && !ngg)
program->stage |= hw_gs;
+ else if (program->stage == sw_vs && args->shader_info->vs.as_ls)
+ program->stage |= hw_ls; /* GFX6-8: VS is a Local Shader, when tessellation is used */
+ else if (program->stage == sw_tcs)
+ program->stage |= hw_hs; /* GFX6-8: TCS is a Hull Shader */
+ else if (program->stage == (sw_vs | sw_tcs))
+ program->stage |= hw_hs; /* GFX9-10: VS+TCS merged into a Hull Shader */
+ else if (program->stage == sw_tes && !args->shader_info->tes.as_es && !ngg)
+ program->stage |= hw_vs; /* GFX6-9: TES without GS uses the HW VS stage (and GFX10/legacy) */
+ else if (program->stage == sw_tes && args->shader_info->tes.as_es && !ngg)
+ program->stage |= hw_es; /* GFX6-8: TES is an Export Shader */
+ else if (program->stage == (sw_tes | sw_gs) && gfx9_plus && !ngg)
+ program->stage |= hw_gs; /* GFX9: TES+GS merged into a GS (and GFX10/legacy) */
else
unreachable("Shader stage not implemented");
diff --git a/src/amd/compiler/aco_ir.h b/src/amd/compiler/aco_ir.h
index 889c594634d..2d5e59c3e2b 100644
--- a/src/amd/compiler/aco_ir.h
+++ b/src/amd/compiler/aco_ir.h
@@ -1142,7 +1142,7 @@ static constexpr Stage tess_eval_geometry_gs = sw_tes | sw_gs | hw_gs;
static constexpr Stage vertex_ls = sw_vs | hw_ls; /* vertex before tesselation control */
static constexpr Stage vertex_es = sw_vs | hw_es; /* vertex before geometry */
static constexpr Stage tess_control_hs = sw_tcs | hw_hs;
-static constexpr Stage tess_eval_es = sw_tes | hw_gs; /* tesselation evaluation before geometry */
+static constexpr Stage tess_eval_es = sw_tes | hw_es; /* tesselation evaluation before geometry */
static constexpr Stage geometry_gs = sw_gs | hw_gs;
class Program final {