Mesa (main): v3d: disable GLSL loop unrolling again

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue May 11 09:58:36 UTC 2021


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

Author: Iago Toral Quiroga <itoral at igalia.com>
Date:   Mon May 10 09:30:54 2021 +0200

v3d: disable GLSL loop unrolling again

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 at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10723>

---

 src/broadcom/ci/piglit-v3d-rpi4-fails.txt |  2 ++
 src/gallium/drivers/v3d/v3d_screen.c      | 11 ++---------
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/src/broadcom/ci/piglit-v3d-rpi4-fails.txt b/src/broadcom/ci/piglit-v3d-rpi4-fails.txt
index 2c3afcae530..c92380ec0fe 100644
--- a/src/broadcom/ci/piglit-v3d-rpi4-fails.txt
+++ b/src/broadcom/ci/piglit-v3d-rpi4-fails.txt
@@ -41,6 +41,8 @@ spec@!opengl 1.1 at windowoverlap,Fail
 spec@!opengl 1.4 at gl-1.4-polygon-offset,Fail
 spec@!opengl 2.0 at gl-2.0-edgeflag,Fail
 spec@!opengl 2.0 at gl-2.0-edgeflag-immediate,Fail
+spec@!opengl 2.0 at max-samplers, Fail
+spec@!opengl 2.0 at max-samplers border, Fail
 spec@!opengl 2.1 at pbo,Fail
 spec@!opengl 2.1 at polygon-stipple-fs,Fail
 spec@!opengl es 3.0 at gles-3.0-transform-feedback-uniform-buffer-object,Fail
diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c
index c319241cd9c..97b7de056a0 100644
--- a/src/gallium/drivers/v3d/v3d_screen.c
+++ b/src/gallium/drivers/v3d/v3d_screen.c
@@ -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;



More information about the mesa-commit mailing list