[Piglit] [PATCH 1/2] glsl-1.50: test gs interaction with fixed function fragment shader

Timothy Arceri tarceri at itsqueeze.com
Mon Jun 18 02:46:05 UTC 2018


---
 .../compatibility/gs-ff-frag.shader_test      | 42 ++++++++++++++++++
 .../compatibility/vs-gs-ff-frag.shader_test   | 43 +++++++++++++++++++
 2 files changed, 85 insertions(+)
 create mode 100644 tests/spec/glsl-1.50/execution/compatibility/gs-ff-frag.shader_test
 create mode 100644 tests/spec/glsl-1.50/execution/compatibility/vs-gs-ff-frag.shader_test

diff --git a/tests/spec/glsl-1.50/execution/compatibility/gs-ff-frag.shader_test b/tests/spec/glsl-1.50/execution/compatibility/gs-ff-frag.shader_test
new file mode 100644
index 000000000..6adbea828
--- /dev/null
+++ b/tests/spec/glsl-1.50/execution/compatibility/gs-ff-frag.shader_test
@@ -0,0 +1,42 @@
+[require]
+GL COMPAT >= 3.2
+GLSL >= 1.50
+
+[vertex shader]
+#version 150 compatibility
+
+void main()
+{
+   gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+}
+
+[geometry shader]
+#version 150 compatibility
+
+layout(triangles) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+varying float v;
+
+void main()
+{
+	for (int i = 0; i < 3; i++) {
+		gl_Position = gl_in[i].gl_Position;
+		gl_FrontColor = vec4(0.0, 1.0, 0.5, 1.0);
+
+		/* Verify that a geometry shader that writes a
+		 * non-fixed-function varying is compatible with
+		 * fixed-function fragment processing.
+		 */
+		v = 0.0;
+
+		EmitVertex();
+	}
+}
+
+[test]
+clear color 0.0 0.0 0.0 0.0
+clear
+ortho
+draw rect 10 10 10 10
+probe rgb 15 15 0.0 1.0 0.5
diff --git a/tests/spec/glsl-1.50/execution/compatibility/vs-gs-ff-frag.shader_test b/tests/spec/glsl-1.50/execution/compatibility/vs-gs-ff-frag.shader_test
new file mode 100644
index 000000000..4622d6303
--- /dev/null
+++ b/tests/spec/glsl-1.50/execution/compatibility/vs-gs-ff-frag.shader_test
@@ -0,0 +1,43 @@
+[require]
+GL COMPAT >= 3.2
+GLSL >= 1.50
+
+[vertex shader]
+#version 150 compatibility
+
+void main()
+{
+   gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+   gl_FrontColor = vec4(0.0, 1.0, 0.0, 1.0);
+}
+
+[geometry shader]
+#version 150 compatibility
+
+layout(triangles) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+varying float v;
+
+void main()
+{
+	for (int i = 0; i < 3; i++) {
+		gl_Position = gl_in[i].gl_Position;
+		gl_FrontColor = gl_in[i].gl_FrontColor;
+
+		/* Verify that a geometry shader that writes a
+		 * non-fixed-function varying is compatible with
+		 * fixed-function fragment processing.
+		 */
+		v = 0.0;
+
+		EmitVertex();
+	}
+}
+
+[test]
+clear color 0.0 0.0 0.0 0.0
+clear
+ortho
+draw rect 10 10 10 10
+probe rgb 15 15 0.0 1.0 0.0
-- 
2.17.1



More information about the Piglit mailing list