[Mesa-dev] [PATCH 2/2] radv: make use of nir_remove_dead_barriers()
Timothy Arceri
tarceri at itsqueeze.com
Wed Nov 14 05:30:39 UTC 2018
---
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 33076cc2bd..577d17e614 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -1843,6 +1843,12 @@ radv_link_shaders(struct radv_pipeline *pipeline, nir_shader **shaders)
radv_optimize_nir(ordered_shaders[i - 1], false, false);
}
}
+
+ /* We call this after linking opts as unused tcs outputs may have
+ * been removed leaving useless barriers in the shader.
+ */
+ if (shaders[MESA_SHADER_TESS_CTRL])
+ nir_remove_dead_barriers(shaders[MESA_SHADER_TESS_CTRL]);
}
--
2.19.1
More information about the mesa-dev
mailing list