v3d: re-enable GLSL loop unrolling
authorIago Toral Quiroga <itoral@igalia.com>
Fri, 7 May 2021 10:32:40 +0000 (12:32 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 7 May 2021 12:34:36 +0000 (12:34 +0000)
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@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10684>

src/gallium/drivers/v3d/v3d_screen.c

index a6d497f..546cdf8 100644 (file)
@@ -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;