Mesa (master): radv: optimize idiv_const for small bitsizes

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


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

Author: Daniel Schürmann <daniel at schuermann.dev>
Date:   Mon Jan 11 19:05:52 2021 +0100

radv: optimize idiv_const for small bitsizes

No fossil-db changes.

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 2da4df8d8a5..dfd697d5f9a 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -3331,7 +3331,7 @@ VkResult radv_create_shaders(struct radv_pipeline *pipeline,
 
 			/* TODO: Implement nir_op_uadd_sat with LLVM. */
 			if (!radv_use_llvm_for_stage(device, i))
-				nir_opt_idiv_const(nir[i], 32);
+				nir_opt_idiv_const(nir[i], 8);
 			nir_lower_idiv(nir[i], nir_lower_idiv_precise);
 
 			/* optimize the lowered ALU operations */



More information about the mesa-commit mailing list