Mesa (main): radv: determine the ES type (VS or TES) for GS earlier
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Oct 4 11:51:40 UTC 2021
Module: Mesa
Branch: main
Commit: 87c732bfeeaba1a19beb93b0435d2cc7782dd5bd
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=87c732bfeeaba1a19beb93b0435d2cc7782dd5bd
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Thu Sep 30 09:53:18 2021 +0200
radv: determine the ES type (VS or TES) for GS earlier
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13170>
---
src/amd/compiler/aco_instruction_selection_setup.cpp | 5 -----
src/amd/vulkan/radv_nir_to_llvm.c | 7 -------
src/amd/vulkan/radv_pipeline.c | 1 +
3 files changed, 1 insertion(+), 12 deletions(-)
diff --git a/src/amd/compiler/aco_instruction_selection_setup.cpp b/src/amd/compiler/aco_instruction_selection_setup.cpp
index e8bae91ce18..b3aaad3ce1a 100644
--- a/src/amd/compiler/aco_instruction_selection_setup.cpp
+++ b/src/amd/compiler/aco_instruction_selection_setup.cpp
@@ -326,11 +326,6 @@ setup_gs_variables(isel_context* ctx, nir_shader* nir)
ctx->program->config->lds_size =
DIV_ROUND_UP(nir->info.shared_size, ctx->program->dev.lds_encoding_granule);
}
-
- if (ctx->stage.has(SWStage::VS))
- ctx->program->info->gs.es_type = MESA_SHADER_VERTEX;
- else if (ctx->stage.has(SWStage::TES))
- ctx->program->info->gs.es_type = MESA_SHADER_TESS_EVAL;
}
void
diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c
index ade731d91cf..b988dd89c70 100644
--- a/src/amd/vulkan/radv_nir_to_llvm.c
+++ b/src/amd/vulkan/radv_nir_to_llvm.c
@@ -2681,13 +2681,6 @@ radv_compile_nir_shader(struct ac_llvm_compiler *ac_llvm, struct radv_shader_bin
ac_compile_llvm_module(ac_llvm, llvm_module, rbinary, nir[nir_count - 1]->info.stage,
radv_get_shader_name(args->shader_info, nir[nir_count - 1]->info.stage),
args->options);
-
- /* Determine the ES type (VS or TES) for the GS on GFX9. */
- if (args->options->chip_class >= GFX9) {
- if (nir_count == 2 && nir[1]->info.stage == MESA_SHADER_GEOMETRY) {
- args->shader_info->gs.es_type = nir[0]->info.stage;
- }
- }
}
static void
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 13897462f0d..7b4b981155c 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -2952,6 +2952,7 @@ radv_fill_shader_info(struct radv_pipeline *pipeline,
}
infos[MESA_SHADER_GEOMETRY].is_ngg = infos[pre_stage].is_ngg;
infos[MESA_SHADER_GEOMETRY].is_ngg_passthrough = infos[pre_stage].is_ngg_passthrough;
+ infos[MESA_SHADER_GEOMETRY].gs.es_type = pre_stage;
for (int i = 0; i < 2; i++) {
radv_nir_shader_info_pass(pipeline->device, combined_nir[i], pipeline->layout, pipeline_key,
More information about the mesa-commit
mailing list