[Piglit] [PATCH] glsl: Compile test precision qualifiers on structure members

Ian Romanick idr at freedesktop.org
Fri Aug 30 12:53:54 PDT 2013


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

Section 4.1.8 (Structures) of both the GLSL ES 1.00 spec and GLSL 1.30
specs says:

    "Member declarators may contain precision qualifiers, but may not
    contain any other qualifiers."

However, at some point this stopped working in Mesa.  These tests
current fail on Mesa master and 9.2, but they both pass on the 9.1
branch.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68753
Cc: Aras Pranckevicius <aras at unity3d.com>
---
 .../precision-qualifiers/precision-struct-member.frag   | 17 +++++++++++++++++
 .../precision-qualifiers/precision-struct-member.frag   | 17 +++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 100644 tests/spec/glsl-1.30/compiler/precision-qualifiers/precision-struct-member.frag
 create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-struct-member.frag

diff --git a/tests/spec/glsl-1.30/compiler/precision-qualifiers/precision-struct-member.frag b/tests/spec/glsl-1.30/compiler/precision-qualifiers/precision-struct-member.frag
new file mode 100644
index 0000000..ad8b6b1
--- /dev/null
+++ b/tests/spec/glsl-1.30/compiler/precision-qualifiers/precision-struct-member.frag
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.30
+// [end config]
+//
+// Section 4.1.8 (Structures) of the GLSL 1.30 spec says:
+//
+//     "Member declarators may contain precision qualifiers, but may not
+//     contain any other qualifiers."
+
+#version 130
+
+struct s {
+	lowp float a;
+};
+
+void main() { gl_FragColor = vec4(0); }
diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-struct-member.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-struct-member.frag
new file mode 100644
index 0000000..e82859e
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-struct-member.frag
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+// [end config]
+//
+// Section 4.1.8 (Structures) of the GLSL ES 1.00 spec says:
+//
+//     "Member declarators may contain precision qualifiers, but may not
+//     contain any other qualifiers."
+
+#version 100
+
+struct s {
+	lowp float a;
+};
+
+void main() { gl_FragColor = vec4(0); }
-- 
1.8.1.4



More information about the Piglit mailing list