Skip to content

v3d: loop unrolling and refactoring of compile strategies

Iago Toral requested to merge itoral/mesa:v3dv_loop_unroll into main

This series does a number of things:

  • Enables loop unrolling for Vulkan. This has a notable performance impact on a bunch of Sascha Willems demos.
  • Enables NIR loop unrolling for GL. The GL driver gets loop unrolling from the GLSL frontend, but NIR can do a bit better and unroll a few more loops for us.
  • Add a compiler strategy fallback to disable loop unrolling. Loop unrolling can increase register pressure and lead to lower thread counts and spills, so this allows us to disable it in that case.
  • Refactors the compile strategy code to try to produce better code with 2 threads. This leads to slight performance improvements in Sponza and UE4 demos.
  • Refactors the compile strategy code to skip strategies that we know won't make progress.
  • Moved the GL compiler options from the compiler to the GL driver.

Merge request reports