Mesa (master): radv: don't lower_pack() after load-store-vectorization

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 12 16:23:58 UTC 2021


Module: Mesa
Branch: master
Commit: e92bd57008fa0d8948a00361bf4262fd72b5998a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e92bd57008fa0d8948a00361bf4262fd72b5998a

Author: Daniel Schürmann <daniel at schuermann.dev>
Date:   Fri Jan  8 22:05:26 2021 +0100

radv: don't lower_pack() after load-store-vectorization

Totals from 7 (0.01% of 139391) affected shaders:
CodeSize: 282900 -> 283324 (+0.15%); split: -0.01%, +0.16%
Instrs: 45287 -> 45338 (+0.11%); split: -0.01%, +0.12%
Cycles: 11496332 -> 11510396 (+0.12%); split: -0.00%, +0.12%
VMEM: 2355 -> 2335 (-0.85%)
Copies: 15506 -> 15561 (+0.35%)

A bit of noise in some parallel-rdp shaders.

Reviewed-by: Rhys Perry <pendingchaos02 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8425>

---

 src/amd/vulkan/radv_pipeline.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 0e5ea1981dd..fbdd9c9b971 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -3291,7 +3291,7 @@ VkResult radv_create_shaders(struct radv_pipeline *pipeline,
 			NIR_PASS_V(nir[i], nir_lower_memory_model);
 
 			bool lower_to_scalar = false;
-			bool lower_pack = false;
+
 			nir_load_store_vectorize_options vectorize_opts = {
 				.modes = nir_var_mem_ssbo | nir_var_mem_ubo |
 					 nir_var_mem_push_const | nir_var_mem_shared |
@@ -3309,7 +3309,6 @@ VkResult radv_create_shaders(struct radv_pipeline *pipeline,
 
 			if (nir_opt_load_store_vectorize(nir[i], &vectorize_opts)) {
 				lower_to_scalar = true;
-				lower_pack = true;
 			}
 
 			/* do this again since information such as outputs_read can be out-of-date */
@@ -3321,8 +3320,6 @@ VkResult radv_create_shaders(struct radv_pipeline *pipeline,
 
 			if (lower_to_scalar)
 				nir_lower_alu_to_scalar(nir[i], NULL, NULL);
-			if (lower_pack)
-				nir_lower_pack(nir[i]);
 
 			/* lower ALU operations */
 			/* TODO: Some 64-bit tests crash inside LLVM. */



More information about the mesa-commit mailing list