From ed55bc4af2bd63f751400c444e8258e49023a76e Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 29 Sep 2020 19:18:14 +0200 Subject: [PATCH] radv/llvm: assign driver locations for VS, TCS, TES and GS correctly RADV/LLVM doesn't use assigned IO locations (yet). Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- src/amd/vulkan/radv_pipeline.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index d67d9eba545..32b85114e3c 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -2327,6 +2327,18 @@ radv_set_driver_locations(struct radv_pipeline *pipeline, nir_shader **shaders, nir_foreach_shader_out_variable(var, shaders[last_vtg_stage]) { var->data.driver_location = var->data.location; } + + /* TODO: Switch RADV/LLVM to the assigned IO locations. */ + for (unsigned i = MESA_SHADER_VERTEX; i <= MESA_SHADER_GEOMETRY; i++) { + if (!shaders[i] || + !radv_use_llvm_for_stage(pipeline->device, i)) + continue; + + nir_foreach_shader_in_variable(var, shaders[i]) + var->data.driver_location = var->data.location; + nir_foreach_shader_out_variable(var, shaders[i]) + var->data.driver_location = var->data.location; + } } static uint32_t