summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_pipeline.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-10-18 13:48:41 +1100
committerTimothy Arceri <[email protected]>2017-12-04 09:10:30 +1100
commitaecb9bec87f1b8bf47c86f49c8ac2109ef73041f (patch)
treea860cb7e2049974ed85f07cd675a96d18102230c /src/amd/vulkan/radv_pipeline.c
parent1c9c42d16b4c8ab896537c32e3b2df237be69323 (diff)
radv: enable nir component packing
SaschaWillems Vulkan demo tessellation: ~4000fps -> ~4600fps Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_pipeline.c')
-rw-r--r--src/amd/vulkan/radv_pipeline.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index fcbb5804f5e..6490b048630 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -1828,6 +1828,7 @@ 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];
@@ -1858,6 +1859,11 @@ 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]) {