[Piglit] [PATCH 3/4] glsl-es-3.00: Verify that use of undefined macros is an error
Ian Romanick
idr at freedesktop.org
Sat Nov 17 17:08:52 PST 2012
From: Ian Romanick <ian.d.romanick at intel.com>
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
.../spec/glsl-es-3.00/compiler/undefined-macro.vert | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 tests/spec/glsl-es-3.00/compiler/undefined-macro.vert
diff --git a/tests/spec/glsl-es-3.00/compiler/undefined-macro.vert b/tests/spec/glsl-es-3.00/compiler/undefined-macro.vert
new file mode 100644
index 0000000..cf570a2
--- /dev/null
+++ b/tests/spec/glsl-es-3.00/compiler/undefined-macro.vert
@@ -0,0 +1,21 @@
+#version 300 es
+
+/* [config]
+ * expect_result: fail
+ * glsl_version: 3.00
+ * [end config]
+ *
+ * Page 11 (page 17 of the PDF) of the OpenGL ES Shading Language 3.00 spec
+ * says:
+ *
+ * "Undefined identifiers not consumed by the defined operator do not
+ * default to '0'. Use of such identifiers causes an error."
+ */
+
+#if FOO
+#endif
+
+void main()
+{
+ gl_Position = vec4(0.);
+}
--
1.7.11.7
More information about the Piglit
mailing list