[Mesa-dev] [PATCH 9/9] radv: enable nir component packing
Timothy Arceri
tarceri at itsqueeze.com
Mon Oct 30 04:11:18 UTC 2017
SaschaWillems Vulkan demo tessellation:
~4000fps -> ~4600fps
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
---
src/amd/vulkan/radv_pipeline.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 322cd7951b2..ec7c2393fc9 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -1815,6 +1815,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];
@@ -1845,6 +1846,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]) {
--
2.13.6
More information about the mesa-dev
mailing list