From 0f1cbcd6a7874da0ee36ebcec91b0a15cd643bfe Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Fri, 6 May 2022 11:17:38 +1000 Subject: [PATCH] gallivm: disable GLSL IR loop unrolling in LLVMPIPE The NIR unroller is already enabled so just allow it to do its job. We add a new failure here because llvmpipe fails to handle a shader that is no longer unrolled. Previously GLSL IR could unroll the loop because it only had a single break. However once lower_returns passes over the shader it ends up with more than 2 breaks making it no longer possible to unroll. This is a disadvantage of doing the unrolling in NIR however in practice we don't see shaders in the wild with multiple returns inside loops. Being unable to handle this loop is an existing bug with llvmpipe exposed by the loop no longer being unrolled. Reviewed-by: Emma Anholt Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_limits.h | 3 +-- src/gallium/drivers/llvmpipe/ci/llvmpipe-fails.txt | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_limits.h b/src/gallium/auxiliary/gallivm/lp_bld_limits.h index b5034b24dce..e2a440e81c6 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_limits.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_limits.h @@ -157,9 +157,8 @@ gallivm_get_shader_param(enum pipe_shader_cap param) case PIPE_SHADER_CAP_LDEXP_SUPPORTED: case PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTERS: case PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTER_BUFFERS: - return 0; case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT: - return 32; + return 0; case PIPE_SHADER_CAP_MAX_SHADER_BUFFERS: return LP_MAX_TGSI_SHADER_BUFFERS; case PIPE_SHADER_CAP_MAX_SHADER_IMAGES: diff --git a/src/gallium/drivers/llvmpipe/ci/llvmpipe-fails.txt b/src/gallium/drivers/llvmpipe/ci/llvmpipe-fails.txt index 0fc1358595f..ede196e7e80 100644 --- a/src/gallium/drivers/llvmpipe/ci/llvmpipe-fails.txt +++ b/src/gallium/drivers/llvmpipe/ci/llvmpipe-fails.txt @@ -94,6 +94,7 @@ spec@!opengl 1.1@read-front samples=2,Fail spec@!opengl 1.1@read-front samples=4,Fail spec@!opengl 3.0@clearbuffer-depth-cs-probe,Fail spec@!opengl 3.2@layered-rendering@clear-color-mismatched-layer-count,Fail +spec@arb_enhanced_layouts@execution@component-layout@vs-fs-array-dvec3,Fail spec@arb_pipeline_statistics_query@arb_pipeline_statistics_query-frag,Fail spec@arb_post_depth_coverage@arb_post_depth_coverage-multisampling,Fail