llvmpipe: Double number of SSBOs
authorGert Wollny <gert.wollny@collabora.com>
Wed, 10 Aug 2022 08:27:33 +0000 (10:27 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 10 Aug 2022 12:21:35 +0000 (12:21 +0000)
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 <gert.wollny@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17979>

src/gallium/auxiliary/gallivm/lp_bld_limits.h

index dabd671..7c1d66a 100644 (file)
@@ -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)