summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/rhi/qrhi/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui/rhi/qrhi/data')
-rw-r--r--tests/auto/gui/rhi/qrhi/data/buildshaders.bat56
-rw-r--r--tests/auto/gui/rhi/qrhi/data/half.vert10
-rw-r--r--tests/auto/gui/rhi/qrhi/data/half.vert.qsbbin0 -> 815 bytes
-rw-r--r--tests/auto/gui/rhi/qrhi/data/multiview.frag10
-rw-r--r--tests/auto/gui/rhi/qrhi/data/multiview.frag.qsbbin0 -> 2425 bytes
-rw-r--r--tests/auto/gui/rhi/qrhi/data/multiview.vert18
-rw-r--r--tests/auto/gui/rhi/qrhi/data/multiview.vert.qsbbin0 -> 3644 bytes
-rw-r--r--tests/auto/gui/rhi/qrhi/data/simpletess.frag10
-rw-r--r--tests/auto/gui/rhi/qrhi/data/simpletess.frag.qsbbin0 -> 591 bytes
-rw-r--r--tests/auto/gui/rhi/qrhi/data/simpletess.tesc22
-rw-r--r--tests/auto/gui/rhi/qrhi/data/simpletess.tesc.qsbbin0 -> 1402 bytes
-rw-r--r--tests/auto/gui/rhi/qrhi/data/simpletess.tese17
-rw-r--r--tests/auto/gui/rhi/qrhi/data/simpletess.tese.qsbbin0 -> 1401 bytes
-rw-r--r--tests/auto/gui/rhi/qrhi/data/simpletess.vert12
-rw-r--r--tests/auto/gui/rhi/qrhi/data/simpletess.vert.qsbbin0 -> 936 bytes
-rw-r--r--tests/auto/gui/rhi/qrhi/data/simpletextured_separate.frag14
-rw-r--r--tests/auto/gui/rhi/qrhi/data/simpletextured_separate.frag.qsbbin0 -> 1258 bytes
-rw-r--r--tests/auto/gui/rhi/qrhi/data/storagebuffer.comp28
-rw-r--r--tests/auto/gui/rhi/qrhi/data/storagebuffer.comp.qsbbin0 -> 1262 bytes
-rw-r--r--tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.comp25
-rw-r--r--tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.comp.qsbbin0 -> 1415 bytes
-rw-r--r--tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.frag33
-rw-r--r--tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.frag.qsbbin0 -> 1259 bytes
-rw-r--r--tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tesc42
-rw-r--r--tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tesc.qsbbin0 -> 2024 bytes
-rw-r--r--tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tese39
-rw-r--r--tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tese.qsbbin0 -> 1854 bytes
-rw-r--r--tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.vert48
-rw-r--r--tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.vert.qsbbin0 -> 2047 bytes
-rw-r--r--tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.frag.qsbbin0 -> 590 bytes
-rw-r--r--tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tesc56
-rw-r--r--tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tesc.qsbbin0 -> 2873 bytes
-rw-r--r--tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tese96
-rw-r--r--tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tese.qsbbin0 -> 4526 bytes
-rw-r--r--tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.vert20
-rw-r--r--tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.vert.qsbbin0 -> 1306 bytes
36 files changed, 519 insertions, 37 deletions
diff --git a/tests/auto/gui/rhi/qrhi/data/buildshaders.bat b/tests/auto/gui/rhi/qrhi/data/buildshaders.bat
index 0102457b8a..fe40459719 100644
--- a/tests/auto/gui/rhi/qrhi/data/buildshaders.bat
+++ b/tests/auto/gui/rhi/qrhi/data/buildshaders.bat
@@ -1,48 +1,30 @@
-:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-::
:: Copyright (C) 2019 The Qt Company Ltd.
-:: Contact: https://www.qt.io/licensing/
-::
-:: This file is part of the QtQuick module of the Qt Toolkit.
-::
-:: $QT_BEGIN_LICENSE:LGPL$
-:: Commercial License Usage
-:: Licensees holding valid commercial Qt licenses may use this file in
-:: accordance with the commercial license agreement provided with the
-:: Software or, alternatively, in accordance with the terms contained in
-:: a written agreement between you and The Qt Company. For licensing terms
-:: and conditions see https://www.qt.io/terms-conditions. For further
-:: information use the contact form at https://www.qt.io/contact-us.
-::
-:: GNU Lesser General Public License Usage
-:: Alternatively, this file may be used under the terms of the GNU Lesser
-:: General Public License version 3 as published by the Free Software
-:: Foundation and appearing in the file LICENSE.LGPL3 included in the
-:: packaging of this file. Please review the following information to
-:: ensure the GNU Lesser General Public License version 3 requirements
-:: will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-::
-:: GNU General Public License Usage
-:: Alternatively, this file may be used under the terms of the GNU
-:: General Public License version 2.0 or (at your option) the GNU General
-:: Public license version 3 or any later version approved by the KDE Free
-:: Qt Foundation. The licenses are as published by the Free Software
-:: Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-:: included in the packaging of this file. Please review the following
-:: information to ensure the GNU General Public License requirements will
-:: be met: https://www.gnu.org/licenses/gpl-2.0.html and
-:: https://www.gnu.org/licenses/gpl-3.0.html.
-::
-:: $QT_END_LICENSE$
-::
-:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:: SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o simple.vert.qsb simple.vert
qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o simple.frag.qsb simple.frag
qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o simpletextured.vert.qsb simpletextured.vert
qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o simpletextured.frag.qsb simpletextured.frag
qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 20 -o simpletextured_array.frag.qsb simpletextured_array.frag
+qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o simpletextured_separate.frag.qsb simpletextured_separate.frag
qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o textured.vert.qsb textured.vert
qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o textured.frag.qsb textured.frag
qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o textured_multiubuf.vert.qsb textured_multiubuf.vert
qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o textured_multiubuf.frag.qsb textured_multiubuf.frag
+qsb --glsl 320es,410 --msl 12 --msltess simpletess.vert -o simpletess.vert.qsb
+qsb --glsl 320es,410 --msl 12 --tess-mode triangles simpletess.tesc -o simpletess.tesc.qsb
+qsb --glsl 320es,410 --msl 12 --tess-vertex-count 3 simpletess.tese -o simpletess.tese.qsb
+qsb --glsl 320es,410 --msl 12 simpletess.frag -o simpletess.frag.qsb
+qsb --glsl 310es,430 --msl 12 --hlsl 50 storagebuffer.comp -o storagebuffer.comp.qsb
+qsb --glsl 320es,430 --msl 12 --msltess storagebuffer_runtime.vert -o storagebuffer_runtime.vert.qsb
+qsb --glsl 320es,430 --msl 12 --tess-mode triangles storagebuffer_runtime.tesc -o storagebuffer_runtime.tesc.qsb
+qsb --glsl 320es,430 --msl 12 --tess-vertex-count 3 storagebuffer_runtime.tese -o storagebuffer_runtime.tese.qsb
+qsb --glsl 320es,430 --msl 12 storagebuffer_runtime.frag -o storagebuffer_runtime.frag.qsb
+qsb --glsl 320es,430 --hlsl 50 -c --msl 12 storagebuffer_runtime.comp -o storagebuffer_runtime.comp.qsb
+qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o half.vert.qsb half.vert
+qsb --glsl 320es,430 --msl 21 --msltess tessinterfaceblocks.vert -o tessinterfaceblocks.vert.qsb
+qsb --glsl 320es,430 --msl 21 --tess-mode triangles tessinterfaceblocks.tesc -o tessinterfaceblocks.tesc.qsb
+qsb --glsl 320es,430 --msl 21 --tess-vertex-count 3 tessinterfaceblocks.tese -o tessinterfaceblocks.tese.qsb
+qsb --glsl 320es,430 --msl 21 simpletess.frag -o tessinterfaceblocks.frag.qsb
+qsb --view-count 2 --glsl "300 es,330" --hlsl 61 -c --msl 12 multiview.vert -o multiview.vert.qsb
+qsb --glsl "300 es,330" --hlsl 61 -c --msl 12 multiview.frag -o multiview.frag.qsb
diff --git a/tests/auto/gui/rhi/qrhi/data/half.vert b/tests/auto/gui/rhi/qrhi/data/half.vert
new file mode 100644
index 0000000000..b503201351
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/half.vert
@@ -0,0 +1,10 @@
+#version 440
+
+layout(location = 0) in vec3 position;
+
+out gl_PerVertex { vec4 gl_Position; };
+
+void main()
+{
+ gl_Position = vec4(position, 1.0);
+}
diff --git a/tests/auto/gui/rhi/qrhi/data/half.vert.qsb b/tests/auto/gui/rhi/qrhi/data/half.vert.qsb
new file mode 100644
index 0000000000..fb8680024a
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/half.vert.qsb
Binary files differ
diff --git a/tests/auto/gui/rhi/qrhi/data/multiview.frag b/tests/auto/gui/rhi/qrhi/data/multiview.frag
new file mode 100644
index 0000000000..375587662f
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/multiview.frag
@@ -0,0 +1,10 @@
+#version 440
+
+layout(location = 0) in vec3 v_color;
+
+layout(location = 0) out vec4 fragColor;
+
+void main()
+{
+ fragColor = vec4(v_color, 1.0);
+}
diff --git a/tests/auto/gui/rhi/qrhi/data/multiview.frag.qsb b/tests/auto/gui/rhi/qrhi/data/multiview.frag.qsb
new file mode 100644
index 0000000000..db8133f12e
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/multiview.frag.qsb
Binary files differ
diff --git a/tests/auto/gui/rhi/qrhi/data/multiview.vert b/tests/auto/gui/rhi/qrhi/data/multiview.vert
new file mode 100644
index 0000000000..b9c9e5a704
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/multiview.vert
@@ -0,0 +1,18 @@
+#version 440
+#extension GL_EXT_multiview : require
+
+layout(location = 0) in vec4 pos;
+layout(location = 1) in vec3 color;
+
+layout(location = 0) out vec3 v_color;
+
+layout(std140, binding = 0) uniform buf
+{
+ mat4 mvp[2];
+};
+
+void main()
+{
+ v_color = color;
+ gl_Position = mvp[gl_ViewIndex] * pos;
+}
diff --git a/tests/auto/gui/rhi/qrhi/data/multiview.vert.qsb b/tests/auto/gui/rhi/qrhi/data/multiview.vert.qsb
new file mode 100644
index 0000000000..cf1f67f58f
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/multiview.vert.qsb
Binary files differ
diff --git a/tests/auto/gui/rhi/qrhi/data/simpletess.frag b/tests/auto/gui/rhi/qrhi/data/simpletess.frag
new file mode 100644
index 0000000000..375587662f
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/simpletess.frag
@@ -0,0 +1,10 @@
+#version 440
+
+layout(location = 0) in vec3 v_color;
+
+layout(location = 0) out vec4 fragColor;
+
+void main()
+{
+ fragColor = vec4(v_color, 1.0);
+}
diff --git a/tests/auto/gui/rhi/qrhi/data/simpletess.frag.qsb b/tests/auto/gui/rhi/qrhi/data/simpletess.frag.qsb
new file mode 100644
index 0000000000..0f42103ac5
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/simpletess.frag.qsb
Binary files differ
diff --git a/tests/auto/gui/rhi/qrhi/data/simpletess.tesc b/tests/auto/gui/rhi/qrhi/data/simpletess.tesc
new file mode 100644
index 0000000000..e192fc77c7
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/simpletess.tesc
@@ -0,0 +1,22 @@
+#version 440
+
+layout(vertices = 3) out;
+
+layout(location = 0) in vec3 inColor[];
+layout(location = 0) out vec3 outColor[];
+layout(location = 1) patch out float a_per_patch_output_variable;
+
+void main()
+{
+ if (gl_InvocationID == 0) {
+ gl_TessLevelOuter[0] = 4.0;
+ gl_TessLevelOuter[1] = 4.0;
+ gl_TessLevelOuter[2] = 4.0;
+
+ gl_TessLevelInner[0] = 4.0;
+ }
+
+ gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
+ outColor[gl_InvocationID] = inColor[gl_InvocationID];
+ a_per_patch_output_variable = 1.0;
+}
diff --git a/tests/auto/gui/rhi/qrhi/data/simpletess.tesc.qsb b/tests/auto/gui/rhi/qrhi/data/simpletess.tesc.qsb
new file mode 100644
index 0000000000..8c98d92c46
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/simpletess.tesc.qsb
Binary files differ
diff --git a/tests/auto/gui/rhi/qrhi/data/simpletess.tese b/tests/auto/gui/rhi/qrhi/data/simpletess.tese
new file mode 100644
index 0000000000..17b348635a
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/simpletess.tese
@@ -0,0 +1,17 @@
+#version 440
+
+layout(triangles, fractional_odd_spacing, ccw) in;
+
+layout(location = 0) in vec3 inColor[];
+layout(location = 0) out vec3 outColor;
+layout(location = 1) patch in float a_per_patch_output_variable;
+
+layout(std140, binding = 0) uniform buf {
+ mat4 mvp;
+};
+
+void main()
+{
+ gl_Position = mvp * ((gl_TessCoord.x * gl_in[0].gl_Position) + (gl_TessCoord.y * gl_in[1].gl_Position) + (gl_TessCoord.z * gl_in[2].gl_Position));
+ outColor = gl_TessCoord.x * inColor[0] + gl_TessCoord.y * inColor[1] + gl_TessCoord.z * inColor[2] * a_per_patch_output_variable;
+}
diff --git a/tests/auto/gui/rhi/qrhi/data/simpletess.tese.qsb b/tests/auto/gui/rhi/qrhi/data/simpletess.tese.qsb
new file mode 100644
index 0000000000..8aa7632717
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/simpletess.tese.qsb
Binary files differ
diff --git a/tests/auto/gui/rhi/qrhi/data/simpletess.vert b/tests/auto/gui/rhi/qrhi/data/simpletess.vert
new file mode 100644
index 0000000000..3838d2f3bb
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/simpletess.vert
@@ -0,0 +1,12 @@
+#version 440
+
+layout(location = 0) in vec3 position;
+layout(location = 1) in vec3 color;
+
+layout(location = 0) out vec3 v_color;
+
+void main()
+{
+ gl_Position = vec4(position, 1.0);
+ v_color = color;
+}
diff --git a/tests/auto/gui/rhi/qrhi/data/simpletess.vert.qsb b/tests/auto/gui/rhi/qrhi/data/simpletess.vert.qsb
new file mode 100644
index 0000000000..ee90983e0b
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/simpletess.vert.qsb
Binary files differ
diff --git a/tests/auto/gui/rhi/qrhi/data/simpletextured_separate.frag b/tests/auto/gui/rhi/qrhi/data/simpletextured_separate.frag
new file mode 100644
index 0000000000..41b0e4f1c2
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/simpletextured_separate.frag
@@ -0,0 +1,14 @@
+#version 440
+
+layout(location = 0) in vec2 uv;
+layout(location = 0) out vec4 fragColor;
+
+layout(binding = 3) uniform texture2D tex;
+layout(binding = 5) uniform sampler samp;
+
+void main()
+{
+ vec4 c = texture(sampler2D(tex, samp), uv);
+ c.rgb *= c.a;
+ fragColor = c;
+}
diff --git a/tests/auto/gui/rhi/qrhi/data/simpletextured_separate.frag.qsb b/tests/auto/gui/rhi/qrhi/data/simpletextured_separate.frag.qsb
new file mode 100644
index 0000000000..c5afe1a8eb
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/simpletextured_separate.frag.qsb
Binary files differ
diff --git a/tests/auto/gui/rhi/qrhi/data/storagebuffer.comp b/tests/auto/gui/rhi/qrhi/data/storagebuffer.comp
new file mode 100644
index 0000000000..ffa0bc7004
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/storagebuffer.comp
@@ -0,0 +1,28 @@
+#version 430
+layout (local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+
+
+layout (binding = 0, std430) readonly buffer toGpu
+{
+ float _float;
+ vec2 _vec2;
+ vec3 _vec3;
+ vec4 _vec4;
+};
+
+layout (binding = 1, std140) buffer fromGpu
+{
+ int _int;
+ ivec2 _ivec2;
+ ivec3 _ivec3;
+ ivec4 _ivec4;
+};
+
+void main()
+{
+ _int = int(_float);
+ _ivec2 = ivec2(_vec2);
+ _ivec3 = ivec3(_vec3);
+ _ivec4 = ivec4(_vec4);
+}
+
diff --git a/tests/auto/gui/rhi/qrhi/data/storagebuffer.comp.qsb b/tests/auto/gui/rhi/qrhi/data/storagebuffer.comp.qsb
new file mode 100644
index 0000000000..b02f541cc5
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/storagebuffer.comp.qsb
Binary files differ
diff --git a/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.comp b/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.comp
new file mode 100644
index 0000000000..d36f5426bc
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.comp
@@ -0,0 +1,25 @@
+#version 430
+
+layout (local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+
+layout (binding = 0, std430) buffer toGpu
+{
+ float _float[];
+};
+
+
+layout (binding = 1, std140) buffer fromGpu
+{
+ int _int[];
+};
+
+void main()
+{
+ int length = min(_float.length(), _int.length());
+
+ for (int i = 0; i < length; ++i)
+ _int[i] = int(_float[i]);
+
+}
+
+
diff --git a/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.comp.qsb b/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.comp.qsb
new file mode 100644
index 0000000000..b4c43ecc9b
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.comp.qsb
Binary files differ
diff --git a/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.frag b/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.frag
new file mode 100644
index 0000000000..2e45a5f62a
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.frag
@@ -0,0 +1,33 @@
+#version 450
+
+layout (location = 0) out vec4 fragColor;
+
+layout (std430, binding = 1) readonly buffer ssboG
+{
+ float g[];
+};
+
+layout (std430, binding = 2) readonly buffer ssboB
+{
+ float b[];
+};
+
+layout (std430, binding = 6) readonly buffer ssboR
+{
+ float r[];
+};
+
+layout (std430, binding = 3) readonly buffer ssbo3
+{
+ vec4 _vec4;
+};
+
+void main()
+{
+
+ // some OpenGL implementations will optimize out the buffer variables if we don't use them
+ // resulting in a .length() of 0.
+ float a = (r[0]+g[0]+b[0])>0?1:1;
+
+ fragColor = a * vec4(r.length(), g.length(), b.length(), 255)/vec4(255);
+}
diff --git a/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.frag.qsb b/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.frag.qsb
new file mode 100644
index 0000000000..53fc9a1906
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.frag.qsb
Binary files differ
diff --git a/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tesc b/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tesc
new file mode 100644
index 0000000000..56060285d2
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tesc
@@ -0,0 +1,42 @@
+#version 450
+
+layout(vertices = 3) out;
+
+
+layout (std430, binding = 7) readonly buffer ssbo7
+{
+ float float7[];
+};
+
+layout (std430, binding = 8) readonly buffer ssbo8
+{
+ float float8[];
+};
+
+layout (std430, binding = 9) readonly buffer ssbo9
+{
+ float float9[];
+};
+
+layout (std430, binding = 10) readonly buffer ssbo10
+{
+ float float10[];
+};
+
+void main()
+{
+
+ // some OpenGL implementations will optimize out the buffer variables if we don't use them
+ // resulting in a .length() of 0
+ float a = float7[0] == 0 && float8[0] == 0 && float9[0] == 0 && float10[0] == 0 ? 1 : 1;
+
+ if (gl_InvocationID == 0) {
+ gl_TessLevelOuter[0] = float7.length() * a;
+ gl_TessLevelOuter[1] = float8.length() * a;
+ gl_TessLevelOuter[2] = float9.length() * a;
+ gl_TessLevelInner[0] = float10.length() * a;
+ }
+
+ gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
+
+}
diff --git a/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tesc.qsb b/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tesc.qsb
new file mode 100644
index 0000000000..e48aa0269c
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tesc.qsb
Binary files differ
diff --git a/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tese b/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tese
new file mode 100644
index 0000000000..a8bec13561
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tese
@@ -0,0 +1,39 @@
+#version 450
+
+layout(triangles, fractional_odd_spacing, ccw) in;
+
+layout (std140, binding = 6) uniform unused0
+{
+ int unused;
+}u0;
+
+layout (binding = 0) uniform u
+{
+ mat4 matrix;
+};
+
+layout (std430, binding = 5) readonly buffer ssbo5
+{
+ float _float[];
+};
+
+layout (std430, binding = 8) readonly buffer ssbo8
+{
+ float float8[];
+};
+
+layout (std430, binding = 1) readonly buffer unused1
+{
+ int unused[];
+}u1;
+
+
+void main()
+{
+ // some OpenGL implementations will optimize out the buffer variables if we don't use them
+ // resulting in a .length() of 0
+ float a = _float[0] == 0 && float8[0] == 1 ? 1 : 1;
+
+ if(_float.length() == 64)
+ gl_Position = a * matrix * ((gl_TessCoord.x * gl_in[0].gl_Position) + (gl_TessCoord.y * gl_in[1].gl_Position) + (gl_TessCoord.z * gl_in[2].gl_Position)) * (float8.length()==2?1:0);
+}
diff --git a/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tese.qsb b/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tese.qsb
new file mode 100644
index 0000000000..23a433b5ae
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tese.qsb
Binary files differ
diff --git a/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.vert b/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.vert
new file mode 100644
index 0000000000..b3ac10efea
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.vert
@@ -0,0 +1,48 @@
+#version 450
+
+layout (location = 0) in vec3 position;
+
+layout (std140, binding = 6) uniform unused0
+{
+ int unused;
+}u0;
+
+layout (binding = 0) uniform u
+{
+ mat4 matrix;
+};
+
+layout (std430, binding = 5) readonly buffer ssbo5
+{
+ float _float[];
+};
+
+layout (std140, binding = 3) readonly buffer ssbo3
+{
+ vec4 _vec4;
+};
+
+layout (std430, binding = 4) readonly buffer ssbo1
+{
+ bool _bool[];
+};
+
+layout (std430, binding = 1) readonly buffer unused1
+{
+ int unused[];
+}u1;
+
+
+void main()
+{
+
+ // some OpenGL implementations will optimize out the buffer variables if we don't use them
+ // resulting in a .length() of 0
+ float a = _float[0] == 0 && _bool[0] ? 1 : 1;
+
+ gl_Position = vec4(0);
+
+ if(_bool.length() == 32)
+ gl_Position = a * matrix * vec4(position*_vec4.xyz, _float.length() == 64 ? 1.0 : 0.0);
+
+}
diff --git a/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.vert.qsb b/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.vert.qsb
new file mode 100644
index 0000000000..8b1cff52fd
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.vert.qsb
Binary files differ
diff --git a/tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.frag.qsb b/tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.frag.qsb
new file mode 100644
index 0000000000..7eda4bed2d
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.frag.qsb
Binary files differ
diff --git a/tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tesc b/tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tesc
new file mode 100644
index 0000000000..92a2dc28fa
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tesc
@@ -0,0 +1,56 @@
+#version 440
+
+layout(vertices = 3) out;
+
+layout(location = 4) in VertOut
+{
+ vec3 v_color;
+ int a;
+ float b;
+}vOut[];
+
+layout(location = 5) out TescOutA {
+ vec3 color;
+ int id;
+}tcOutA[];
+
+layout(location = 10) out TescOutB {
+ vec2 some;
+ int other[3];
+ vec3 variables;
+}tcOutB[];
+
+layout(location = 2) patch out TescOutC {
+ vec3 stuff;
+ float more_stuff;
+}tcOutC;
+
+void main()
+{
+ // tesc builtin outputs
+ gl_TessLevelOuter[0] = 1.0;
+ gl_TessLevelOuter[1] = 2.0;
+ gl_TessLevelOuter[2] = 3.0;
+ gl_TessLevelOuter[3] = 4.0;
+ gl_TessLevelInner[0] = 5.0;
+ gl_TessLevelInner[1] = 6.0;
+
+ gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
+ gl_out[gl_InvocationID].gl_PointSize = 10 + gl_InvocationID;
+ gl_out[gl_InvocationID].gl_ClipDistance[0] = 20.0 + gl_InvocationID;
+ gl_out[gl_InvocationID].gl_ClipDistance[1] = 40.0 + gl_InvocationID;
+ gl_out[gl_InvocationID].gl_ClipDistance[2] = 60.0 + gl_InvocationID;
+ gl_out[gl_InvocationID].gl_ClipDistance[3] = 80.0 + gl_InvocationID;
+ gl_out[gl_InvocationID].gl_ClipDistance[4] = 100.0 + gl_InvocationID;
+
+ // outputs
+ tcOutA[gl_InvocationID].color = vOut[gl_InvocationID].v_color;
+ tcOutA[gl_InvocationID].id = gl_InvocationID + 91;
+ tcOutB[gl_InvocationID].some = vec2(gl_InvocationID, vOut[gl_InvocationID].a);
+ tcOutB[gl_InvocationID].other[0] = gl_PrimitiveID + 10;
+ tcOutB[gl_InvocationID].other[1] = gl_PrimitiveID + 20;
+ tcOutB[gl_InvocationID].other[2] = gl_PrimitiveID + 30;
+ tcOutB[gl_InvocationID].variables = vec3(3.0f, vOut[gl_InvocationID].b, 17.0f);
+ tcOutC.stuff = vec3(1.0, 2.0, 3.0);
+ tcOutC.more_stuff = 4.0;
+}
diff --git a/tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tesc.qsb b/tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tesc.qsb
new file mode 100644
index 0000000000..b503d596c6
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tesc.qsb
Binary files differ
diff --git a/tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tese b/tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tese
new file mode 100644
index 0000000000..05430a5f63
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tese
@@ -0,0 +1,96 @@
+#version 440
+
+layout(triangles, fractional_odd_spacing, ccw) in;
+
+layout(std140, binding = 0) uniform buf {
+ mat4 mvp;
+};
+
+layout(location = 5) in TescOutA {
+ vec3 color;
+ int id;
+}tcOutA[];
+
+layout(location = 10) in TescOutB {
+ vec2 some;
+ int other[3];
+ vec3 variables;
+}tcOutB[];
+
+layout(location = 2) patch in TescOutC {
+ vec3 stuff;
+ float more_stuff;
+}tcOutC;
+
+layout(location = 0) out vec3 outColor;
+
+struct A {
+ vec3 color;
+ int id;
+};
+
+struct B {
+ vec2 some;
+ int other[3];
+ vec3 variables;
+};
+
+struct C {
+ vec3 stuff;
+ float more_stuff;
+};
+
+struct Element {
+ A a[3];
+ B b[3];
+ C c;
+ vec4 tesslevelOuter;
+ vec2 tessLevelInner;
+ float pointSize[3];
+ float clipDistance[3][5];
+ vec3 tessCoord;
+ int patchVerticesIn;
+ int primitiveID;
+};
+
+layout(std430, binding = 1) buffer result {
+ int count;
+ Element elements[];
+};
+
+void main()
+{
+ gl_Position = mvp * ((gl_TessCoord.x * gl_in[0].gl_Position) + (gl_TessCoord.y * gl_in[1].gl_Position) + (gl_TessCoord.z * gl_in[2].gl_Position));
+ outColor = gl_TessCoord.x * tcOutA[0].color + gl_TessCoord.y * tcOutA[1].color + gl_TessCoord.z * tcOutA[2].color;
+
+ count = 1;
+
+ elements[gl_PrimitiveID].c.stuff = tcOutC.stuff;
+ elements[gl_PrimitiveID].c.more_stuff = tcOutC.more_stuff;
+ elements[gl_PrimitiveID].tesslevelOuter = vec4(gl_TessLevelOuter[0], gl_TessLevelOuter[1], gl_TessLevelOuter[2], gl_TessLevelOuter[3]);
+ elements[gl_PrimitiveID].tessLevelInner = vec2(gl_TessLevelInner[0], gl_TessLevelInner[1]);
+
+ for (int i = 0; i < 3; ++i) {
+
+ elements[gl_PrimitiveID].a[i].color = tcOutA[i].color;
+ elements[gl_PrimitiveID].a[i].id = tcOutA[i].id;
+
+ elements[gl_PrimitiveID].b[i].some = tcOutB[i].some;
+ elements[gl_PrimitiveID].b[i].other = tcOutB[i].other;
+ elements[gl_PrimitiveID].b[i].variables = tcOutB[i].variables;
+
+ elements[gl_PrimitiveID].pointSize[i] = gl_in[i].gl_PointSize;
+ elements[gl_PrimitiveID].clipDistance[i][0] = gl_in[i].gl_ClipDistance[0];
+ elements[gl_PrimitiveID].clipDistance[i][1] = gl_in[i].gl_ClipDistance[1];
+ elements[gl_PrimitiveID].clipDistance[i][2] = gl_in[i].gl_ClipDistance[2];
+ elements[gl_PrimitiveID].clipDistance[i][3] = gl_in[i].gl_ClipDistance[3];
+ elements[gl_PrimitiveID].clipDistance[i][4] = gl_in[i].gl_ClipDistance[4];
+
+ }
+
+ elements[gl_PrimitiveID].tessCoord = gl_TessCoord;
+ elements[gl_PrimitiveID].patchVerticesIn = 3;
+ elements[gl_PrimitiveID].primitiveID = gl_PrimitiveID;
+
+}
+
diff --git a/tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tese.qsb b/tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tese.qsb
new file mode 100644
index 0000000000..898bda454a
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tese.qsb
Binary files differ
diff --git a/tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.vert b/tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.vert
new file mode 100644
index 0000000000..7c722bb374
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.vert
@@ -0,0 +1,20 @@
+#version 440
+
+layout(location = 0) in vec3 position;
+layout(location = 1) in vec3 color;
+
+
+layout(location = 4) out VertOut
+{
+ vec3 v_color;
+ int a;
+ float b;
+};
+
+void main()
+{
+ gl_Position = vec4(position, 1.0);
+ v_color = color;
+ a = gl_VertexIndex;
+ b = 13.0f + gl_VertexIndex;
+}
diff --git a/tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.vert.qsb b/tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.vert.qsb
new file mode 100644
index 0000000000..07384d643c
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.vert.qsb
Binary files differ