summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Arceri <tarceri@itsqueeze.com>2024-02-19 11:59:52 +1100
committerMarge Bot <emma+marge@anholt.net>2024-02-21 00:12:46 +0000
commit53e5c99ab9f7c637414c06c74aa5916acdc57208 (patch)
treef8387ab95c994ede9d138513af58e0e9a30b5f7b
parentb9374d2c59e665bf60950af898003ed17bf98370 (diff)
glsl-1.50: test the copy of an entire ifc block
Mesa issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10593 Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/880>
-rw-r--r--tests/spec/glsl-1.50/execution/interface-block-copy-vs-gs-fs.shader_test77
1 files changed, 77 insertions, 0 deletions
diff --git a/tests/spec/glsl-1.50/execution/interface-block-copy-vs-gs-fs.shader_test b/tests/spec/glsl-1.50/execution/interface-block-copy-vs-gs-fs.shader_test
new file mode 100644
index 000000000..1ce537ece
--- /dev/null
+++ b/tests/spec/glsl-1.50/execution/interface-block-copy-vs-gs-fs.shader_test
@@ -0,0 +1,77 @@
+# Test the direct copy of an entire named block
+
+[require]
+GLSL >= 1.50
+
+[vertex shader]
+#version 150
+
+out Data
+{
+ vec3 a;
+ float b;
+} outData;
+
+out vec4 vertex_to_gs;
+
+in vec4 piglit_vertex;
+
+void main()
+{
+ outData.a = vec3(0.0, 0.75, 1.0);
+ outData.b = 0.5;
+
+ vertex_to_gs = piglit_vertex;
+}
+
+[geometry shader]
+#version 150
+
+layout(triangles) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+in vec4 vertex_to_gs[3];
+
+in Data
+{
+ vec3 a;
+ float b;
+} inData[];
+
+out Data
+{
+ vec3 a;
+ float b;
+} outData;
+
+void main()
+{
+ for (int i = 0; i < 3; i++) {
+ gl_Position = vertex_to_gs[i];
+ outData = inData[i];
+ EmitVertex();
+ }
+}
+
+[fragment shader]
+#version 150
+
+out vec4 color;
+
+in Data
+{
+ vec3 a;
+ float b;
+} inData;
+
+void main()
+{
+ color = vec4(inData.b, inData.a);
+}
+
+[test]
+clear color 0.1 0.1 0.1 0.1
+clear
+
+draw rect -1 -1 2 2
+probe all rgb 0.5 0 0.75