[Piglit] [PATCH 4/4] glsl-es-1.00: Verify that the default precision can be set multiple times in one scope

Ian Romanick idr at freedesktop.org
Fri Aug 9 15:40:09 PDT 2013


From: Ian Romanick <ian.d.romanick at intel.com>

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 .../default-precision-multiple-occurances.frag     | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-multiple-occurances.frag

diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-multiple-occurances.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-multiple-occurances.frag
new file mode 100644
index 0000000..aad8ae6
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-multiple-occurances.frag
@@ -0,0 +1,23 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+// [end config]
+//
+// Section 4.5.3 (Default Precision Qualifiers) of the GLSL ES 1.00 spec says:
+//
+//     "Multiple precision statements for the same basic type can appear
+//     inside the same scope, with later statements overriding earlier
+//     statements within that scope."
+
+#version 100
+
+precision mediump float;
+
+float f()
+{
+	float x;
+	return 0.;
+}
+
+precision lowp float;
+float y;
-- 
1.8.1.4



More information about the Piglit mailing list