From 0ca0d2d4507ca3f9ce31f8a35fe4e3f44008451e Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Wed, 10 Aug 2022 10:27:33 +0200 Subject: [PATCH] llvmpipe: Double number of SSBOs llvmpipe doesn't define atomics, and therefore, gallium uses half of the available SSBOs as atomic buffers. When virgl runs with llvmpipe as GLES host we also report no atomic buffers to the guest so as to lower atomics to SSBOs to work around ARB_shader_counter_ops not being available on GLES. With the current value of 16 SSBOs in llvmpipe, only eight SSBOs and eight atomic shader buffers are reported and with virglrenderer not reporting atomics these numbers will be reduced to four, being below the required minimum for ARB_compute_shaders. By doubling the number of available SSBOs in llvmpipe, this limitation is worked around and using llvmpipe as GLES host for virgl in the CI allows testing ARB_compute_shaders and ARB_shader_counter_ops properly. Signed-off-by: Gert Wollny Reviewed-by: Dave Airlie Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_limits.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_limits.h b/src/gallium/auxiliary/gallivm/lp_bld_limits.h index dabd671aaf9..7c1d66ad19c 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_limits.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_limits.h @@ -55,7 +55,7 @@ #define LP_MAX_TGSI_CONST_BUFFER_SIZE (LP_MAX_TGSI_CONSTS * sizeof(float[4])) -#define LP_MAX_TGSI_SHADER_BUFFERS 16 +#define LP_MAX_TGSI_SHADER_BUFFERS 32 #define LP_MAX_TGSI_SHADER_BUFFER_SIZE (1 << 27)