Mesa (main): gallivm: disable GLSL IR loop unrolling in LLVMPIPE

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jun 4 16:47:32 UTC 2022


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

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Fri May  6 11:17:38 2022 +1000

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 <emma at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16366>

---

 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 at read-front samples=2,Fail
 spec@!opengl 1.1 at read-front samples=4,Fail
 spec@!opengl 3.0 at clearbuffer-depth-cs-probe,Fail
 spec@!opengl 3.2 at layered-rendering@clear-color-mismatched-layer-count,Fail
+spec at arb_enhanced_layouts@execution at component-layout@vs-fs-array-dvec3,Fail
 spec at arb_pipeline_statistics_query@arb_pipeline_statistics_query-frag,Fail
 spec at arb_post_depth_coverage@arb_post_depth_coverage-multisampling,Fail
 



More information about the mesa-commit mailing list