[Piglit] [PATCH] arb_program_interface_query: add linker test for querying varyings

Tapani Pälli tapani.palli at intel.com
Fri Sep 25 00:09:29 PDT 2015


This fails with current Mesa due to a bug in commit:
	4639cea2921669527eb43dcb49724c05afb27e8e

Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
 .../linker/query-varyings.shader_test              | 33 ++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 tests/spec/arb_program_interface_query/linker/query-varyings.shader_test

diff --git a/tests/spec/arb_program_interface_query/linker/query-varyings.shader_test b/tests/spec/arb_program_interface_query/linker/query-varyings.shader_test
new file mode 100644
index 0000000..01acee5
--- /dev/null
+++ b/tests/spec/arb_program_interface_query/linker/query-varyings.shader_test
@@ -0,0 +1,33 @@
+# Tests that we can succesfully query properties of varyings
+# that have interface GL_PROGRAM_INPUT in fragment stage.
+#
+# This tests that possible optimization for packing variables
+# does not loose information about individual variables.
+#
+[require]
+GLSL >= 1.10
+GL_ARB_program_interface_query
+
+[vertex shader]
+#version 110
+varying float r, g, b;
+void main()
+{
+	r = 1.0;
+	g = 0.0;
+	b = 1.0;
+	gl_Position = vec4(0.0);
+}
+
+[fragment shader]
+#version 110
+varying float r, g, b;
+void main()
+{
+	gl_FragColor = vec4(r, g, b, 1.0);
+}
+
+[test]
+verify program_interface_query GL_PROGRAM_INPUT r GL_ARRAY_SIZE 1
+verify program_interface_query GL_PROGRAM_INPUT g GL_TYPE GL_FLOAT
+verify program_interface_query GL_PROGRAM_INPUT b GL_REFERENCED_BY_FRAGMENT_SHADER 1
-- 
2.4.3



More information about the Piglit mailing list