Mesa (main): v3d: re-enable GLSL loop unrolling

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri May 7 12:47:08 UTC 2021


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

Author: Iago Toral Quiroga <itoral at igalia.com>
Date:   Fri May  7 12:32:40 2021 +0200

v3d: re-enable GLSL loop unrolling

Disabling it that made us start to fail register allocation for a
few tests. Re-enable it until we figure out what is causing that.

Fixes: ca9e0871fb294 ('v3d: enable NIR loop unrolling')

Reviewed-by: Juan A. Suarez <jasuarez at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10684>

---

 src/gallium/drivers/v3d/v3d_screen.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c
index a6d497f0ae9..546cdf8e341 100644
--- a/src/gallium/drivers/v3d/v3d_screen.c
+++ b/src/gallium/drivers/v3d/v3d_screen.c
@@ -423,8 +423,15 @@ v3d_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
         case PIPE_SHADER_CAP_SUPPORTED_IRS:
                 return 1 << PIPE_SHADER_IR_NIR;
         case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT:
-                /* Disable GLSL loop unrolling, we'll use NIR's */
-                return 0;
+                /* FIXME: if we disable GLSL loop unrolling in favor of NIR's
+                 * we fail to register allocate some tests, like:
+                 * - KHR-GLES31.core.geometry_shader.limits.max_input_components
+                 * - bin/max-samplers border -auto -fbo
+                 *
+                 * So keep it enabled until we figure out what's going on with
+                 * that.
+                 */
+                return 32;
         case PIPE_SHADER_CAP_LOWER_IF_THRESHOLD:
         case PIPE_SHADER_CAP_TGSI_SKIP_MERGE_REGISTERS:
                 return 0;



More information about the mesa-commit mailing list