Mesa (master): nir: bump loop unroll limit to 96.

Dave Airlie airlied at kemper.freedesktop.org
Wed Oct 11 00:12:11 UTC 2017


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

Author: Dave Airlie <airlied at redhat.com>
Date:   Wed Oct 11 09:48:21 2017 +1000

nir: bump loop unroll limit to 96.

With the ssao demo from Vulkan demos:
radv/rx480: 440->440fps
anv/haswell: 24->34 fps

The demo does a 0->32 loop across a ubo with 32 members.

Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/compiler/nir/nir_opt_loop_unroll.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/compiler/nir/nir_opt_loop_unroll.c b/src/compiler/nir/nir_opt_loop_unroll.c
index 79d04f978b..dae5bfc902 100644
--- a/src/compiler/nir/nir_opt_loop_unroll.c
+++ b/src/compiler/nir/nir_opt_loop_unroll.c
@@ -33,8 +33,10 @@
  * to give about the same results. Around 5 instructions per node.  But some
  * loops that would unroll with GLSL IR fail to unroll if we set this to 25 so
  * we set it to 26.
+ * This was bumped to 96 because it unrolled more loops with a positive
+ * effect (vulkan ssao demo).
  */
-#define LOOP_UNROLL_LIMIT 26
+#define LOOP_UNROLL_LIMIT 96
 
 /* Prepare this loop for unrolling by first converting to lcssa and then
  * converting the phis from the loops first block and the block that follows




More information about the mesa-commit mailing list