v3d: disable GLSL loop unrolling again
authorIago Toral Quiroga <itoral@igalia.com>
Mon, 10 May 2021 07:30:54 +0000 (09:30 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 11 May 2021 09:31:31 +0000 (09:31 +0000)
We had re-enabled this because of some test regressions:

KHR-GLES31.core.geometry_shader.limits.max_input_components and
ext_transform_feedback-max-varyings failed to register allocate,
but now that we support indirect indexing on vertex shader outputs natively
this is no longer an issue.

Piglit's max-samplers tests failed. These tests use indirect indexing
on samplers which is not supported and fail to link with this error message:
"Failed to link: error: sampler arrays indexed with non-constant expressions
is forbidden in GLSL  110". This is expected. The reason these were passing
before is that loop unrolling was able to turn indirect indexing into
direct indexing. We add them to the expected fail list.

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

src/broadcom/ci/piglit-v3d-rpi4-fails.txt
src/gallium/drivers/v3d/v3d_screen.c

index 2c3afca..c92380e 100644 (file)
@@ -41,6 +41,8 @@ spec@!opengl 1.1@windowoverlap,Fail
 spec@!opengl 1.4@gl-1.4-polygon-offset,Fail
 spec@!opengl 2.0@gl-2.0-edgeflag,Fail
 spec@!opengl 2.0@gl-2.0-edgeflag-immediate,Fail
+spec@!opengl 2.0@max-samplers, Fail
+spec@!opengl 2.0@max-samplers border, Fail
 spec@!opengl 2.1@pbo,Fail
 spec@!opengl 2.1@polygon-stipple-fs,Fail
 spec@!opengl es 3.0@gles-3.0-transform-feedback-uniform-buffer-object,Fail
index c319241..97b7de0 100644 (file)
@@ -423,15 +423,8 @@ 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:
-                /* 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;
+                /* We use NIR's loop unrolling */
+                return 0;
         case PIPE_SHADER_CAP_LOWER_IF_THRESHOLD:
         case PIPE_SHADER_CAP_TGSI_SKIP_MERGE_REGISTERS:
                 return 0;