summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/rhi/qshader/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui/rhi/qshader/data')
-rw-r--r--tests/auto/gui/rhi/qshader/data/README15
-rw-r--r--tests/auto/gui/rhi/qshader/data/color_all_v1.vert.qsb (renamed from tests/auto/gui/rhi/qshader/data/color.vert.qsb)bin1847 -> 1847 bytes
-rw-r--r--tests/auto/gui/rhi/qshader/data/color_spirv_v1.vert.qsb (renamed from tests/auto/gui/rhi/qshader/data/color_simple.vert.qsb)bin813 -> 813 bytes
-rw-r--r--tests/auto/gui/rhi/qshader/data/texture.frag16
-rw-r--r--tests/auto/gui/rhi/qshader/data/texture_all_v2.frag.qsbbin0 -> 1691 bytes
-rw-r--r--tests/auto/gui/rhi/qshader/data/texture_all_v3.frag.qsbbin0 -> 1432 bytes
6 files changed, 31 insertions, 0 deletions
diff --git a/tests/auto/gui/rhi/qshader/data/README b/tests/auto/gui/rhi/qshader/data/README
new file mode 100644
index 0000000000..3d89f2a0c5
--- /dev/null
+++ b/tests/auto/gui/rhi/qshader/data/README
@@ -0,0 +1,15 @@
+Warning: Do NOT regenerate the .qsb files without proper planning and understanding
+the following.
+
+Among other things, we are also testing backwards compatibility for QShader
+deserialization.
+
+.qsb files with _v1 in the name were produced with an older qtshadertools
+and have a QSB_VERSION of 1.
+
+Files with _v2 are generated with a newer qsb, those have QSB_VERSION 2.
+The difference is the support for nativeResourceBindingMap() which is only
+present in v2.
+
+Files with _v3 come from an even newer qsb, and have QSB_VERSION 3. The
+difference to 2 is the use of CBOR instead of binary JSON for QShaderDescription.
diff --git a/tests/auto/gui/rhi/qshader/data/color.vert.qsb b/tests/auto/gui/rhi/qshader/data/color_all_v1.vert.qsb
index 7d02d823d2..7d02d823d2 100644
--- a/tests/auto/gui/rhi/qshader/data/color.vert.qsb
+++ b/tests/auto/gui/rhi/qshader/data/color_all_v1.vert.qsb
Binary files differ
diff --git a/tests/auto/gui/rhi/qshader/data/color_simple.vert.qsb b/tests/auto/gui/rhi/qshader/data/color_spirv_v1.vert.qsb
index c82ba7e8e7..c82ba7e8e7 100644
--- a/tests/auto/gui/rhi/qshader/data/color_simple.vert.qsb
+++ b/tests/auto/gui/rhi/qshader/data/color_spirv_v1.vert.qsb
Binary files differ
diff --git a/tests/auto/gui/rhi/qshader/data/texture.frag b/tests/auto/gui/rhi/qshader/data/texture.frag
new file mode 100644
index 0000000000..bd22f817e0
--- /dev/null
+++ b/tests/auto/gui/rhi/qshader/data/texture.frag
@@ -0,0 +1,16 @@
+#version 440
+
+layout(location = 0) in vec2 qt_TexCoord;
+layout(location = 0) out vec4 fragColor;
+
+layout(std140, binding = 0) uniform buf {
+ mat4 qt_Matrix;
+ float opacity;
+} ubuf;
+
+layout(binding = 1) uniform sampler2D qt_Texture;
+
+void main()
+{
+ fragColor = texture(qt_Texture, qt_TexCoord) * ubuf.opacity;
+}
diff --git a/tests/auto/gui/rhi/qshader/data/texture_all_v2.frag.qsb b/tests/auto/gui/rhi/qshader/data/texture_all_v2.frag.qsb
new file mode 100644
index 0000000000..79f5486945
--- /dev/null
+++ b/tests/auto/gui/rhi/qshader/data/texture_all_v2.frag.qsb
Binary files differ
diff --git a/tests/auto/gui/rhi/qshader/data/texture_all_v3.frag.qsb b/tests/auto/gui/rhi/qshader/data/texture_all_v3.frag.qsb
new file mode 100644
index 0000000000..b6e49aa03d
--- /dev/null
+++ b/tests/auto/gui/rhi/qshader/data/texture_all_v3.frag.qsb
Binary files differ