[Piglit] [PATCH] glsl-es-1.00: constant initializer type mismatch causes an error
Ilia Mirkin
imirkin at alum.mit.edu
Tue Aug 15 18:06:20 UTC 2017
Mesa triggers an assertion due to improper handling of the error state.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101766
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
.../glsl-es-1.00/compiler/const-initializer/bad-type.vert | 12 ++++++++++++
1 file changed, 12 insertions(+)
create mode 100644 tests/spec/glsl-es-1.00/compiler/const-initializer/bad-type.vert
diff --git a/tests/spec/glsl-es-1.00/compiler/const-initializer/bad-type.vert b/tests/spec/glsl-es-1.00/compiler/const-initializer/bad-type.vert
new file mode 100644
index 000000000..fb967e0d6
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/const-initializer/bad-type.vert
@@ -0,0 +1,12 @@
+#version 100
+
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.00
+ * [end config]
+*/
+
+vec2 f() {
+ const float x = 1;
+ return vec2(x, 0.0);
+}
--
2.13.0
More information about the Piglit
mailing list