From 370495abd1a8580ac0c2f6fa7fbc102d90a2a59e Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Mon, 10 May 2021 09:30:54 +0200 Subject: [PATCH] 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 Part-of: --- 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@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 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;