summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
diff options
context:
space:
mode:
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r--src/amd/vulkan/radv_pipeline.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 0d1958fc935..88646fda2fa 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -1524,6 +1524,9 @@ radv_link_shaders(struct radv_pipeline *pipeline, nir_shader **shaders)
bool progress = nir_remove_unused_varyings(ordered_shaders[i],
ordered_shaders[i - 1]);
+ nir_compact_varyings(ordered_shaders[i],
+ ordered_shaders[i - 1], true);
+
if (progress) {
if (nir_lower_global_vars_to_local(ordered_shaders[i])) {
radv_lower_indirect_derefs(ordered_shaders[i],
@@ -1722,7 +1725,6 @@ void radv_create_shaders(struct radv_pipeline *pipeline,
last = i;
}
- int prev = -1;
for (unsigned i = 0; i < MESA_SHADER_STAGES; ++i) {
const VkPipelineShaderStageCreateInfo *stage = pStages[i];
@@ -1753,11 +1755,6 @@ void radv_create_shaders(struct radv_pipeline *pipeline,
nir_lower_io_to_scalar_early(nir[i], mask);
radv_optimize_nir(nir[i]);
}
-
- if (prev != -1) {
- nir_compact_varyings(nir[prev], nir[i], true);
- }
- prev = i;
}
if (nir[MESA_SHADER_TESS_CTRL]) {