[Piglit] [PATCH 1/2] arb_separate_shader_objects: test linking of anon structs.
Dave Airlie
airlied at gmail.com
Tue May 17 02:07:40 UTC 2016
From: Dave Airlie <airlied at redhat.com>
I'm not 100% sure this an SSO test, but I just designed it from some UE4
failures we were seeing.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
.../execution/anon-structs.shader_test | 32 ++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 tests/spec/arb_separate_shader_objects/execution/anon-structs.shader_test
diff --git a/tests/spec/arb_separate_shader_objects/execution/anon-structs.shader_test b/tests/spec/arb_separate_shader_objects/execution/anon-structs.shader_test
new file mode 100644
index 0000000..3589cc3
--- /dev/null
+++ b/tests/spec/arb_separate_shader_objects/execution/anon-structs.shader_test
@@ -0,0 +1,32 @@
+# pass an anon struct from one stage to another
+[require]
+GLSL >= 3.30
+GL_ARB_separate_shader_objects
+
+[vertex shader]
+#version 330
+#extension GL_ARB_separate_shader_objects: require
+
+layout(location=1) out struct { vec4 Data; } mycolor;
+in vec4 piglit_vertex;
+
+void main()
+{
+ gl_Position = piglit_vertex;
+ mycolor.Data = vec4(0.0, 1.0, 0.0, 1.0);
+}
+
+[fragment shader]
+#version 330
+#extension GL_ARB_separate_shader_objects: require
+
+layout(location = 1) in struct { vec4 Data; } mycolor;
+
+void main()
+{
+ gl_FragColor = vec4(mycolor.Data);
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
--
2.5.5
More information about the Piglit
mailing list