[Piglit] [PATCH 5/5] arb_enhanced_layouts: invalid compile time constant types

Timothy Arceri timothy.arceri at collabora.com
Sun Nov 1 17:54:41 PST 2015


---
 .../invalid-types/bool.vert                        | 23 ++++++++++++++++++++++
 .../invalid-types/float.vert                       | 23 ++++++++++++++++++++++
 .../invalid-types/vec2.vert                        | 23 ++++++++++++++++++++++
 .../invalid-types/vec3.vert                        | 23 ++++++++++++++++++++++
 .../invalid-types/vec4.vert                        | 23 ++++++++++++++++++++++
 5 files changed, 115 insertions(+)
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/compiler-time-constants/invalid-types/bool.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/compiler-time-constants/invalid-types/float.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/compiler-time-constants/invalid-types/vec2.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/compiler-time-constants/invalid-types/vec3.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/compiler-time-constants/invalid-types/vec4.vert

diff --git a/tests/spec/arb_enhanced_layouts/compiler/compiler-time-constants/invalid-types/bool.vert b/tests/spec/arb_enhanced_layouts/compiler/compiler-time-constants/invalid-types/bool.vert
new file mode 100644
index 0000000..2eb8761
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/compiler-time-constants/invalid-types/bool.vert
@@ -0,0 +1,23 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.10
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_explicit_attrib_location
+// [end config]
+//
+// Tests that only integral constant expression can be used.
+//
+// Section 4.3.3 (Constant Expressions) from the GLSL 4.50 spec:
+// "An integral constant expression is a constant expression that evaluates to
+//  a scalar signed or unsigned integer."
+
+#version 110
+#extension GL_ARB_explicit_attrib_location: require
+#extension GL_ARB_enhanced_layouts: require
+
+const bool start = false;
+layout(location = start) in vec4 b;
+
+void main()
+{
+	gl_Position = b;
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/compiler-time-constants/invalid-types/float.vert b/tests/spec/arb_enhanced_layouts/compiler/compiler-time-constants/invalid-types/float.vert
new file mode 100644
index 0000000..ddc0102
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/compiler-time-constants/invalid-types/float.vert
@@ -0,0 +1,23 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.10
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_explicit_attrib_location
+// [end config]
+//
+// Tests that only integral constant expression can be used.
+//
+// Section 4.3.3 (Constant Expressions) from the GLSL 4.50 spec:
+// "An integral constant expression is a constant expression that evaluates to
+//  a scalar signed or unsigned integer."
+
+#version 110
+#extension GL_ARB_explicit_attrib_location: require
+#extension GL_ARB_enhanced_layouts: require
+
+const float start = 1.0;
+layout(location = start) in vec4 b;
+
+void main()
+{
+	gl_Position = b;
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/compiler-time-constants/invalid-types/vec2.vert b/tests/spec/arb_enhanced_layouts/compiler/compiler-time-constants/invalid-types/vec2.vert
new file mode 100644
index 0000000..14e8151
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/compiler-time-constants/invalid-types/vec2.vert
@@ -0,0 +1,23 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.10
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_explicit_attrib_location
+// [end config]
+//
+// Tests that only integral constant expression can be used.
+//
+// Section 4.3.3 (Constant Expressions) from the GLSL 4.50 spec:
+// "An integral constant expression is a constant expression that evaluates to
+//  a scalar signed or unsigned integer."
+
+#version 110
+#extension GL_ARB_explicit_attrib_location: require
+#extension GL_ARB_enhanced_layouts: require
+
+const vec2 start = vec2(1.0);
+layout(location = start) in vec4 b;
+
+void main()
+{
+	gl_Position = b;
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/compiler-time-constants/invalid-types/vec3.vert b/tests/spec/arb_enhanced_layouts/compiler/compiler-time-constants/invalid-types/vec3.vert
new file mode 100644
index 0000000..d32ee02
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/compiler-time-constants/invalid-types/vec3.vert
@@ -0,0 +1,23 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.10
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_explicit_attrib_location
+// [end config]
+//
+// Tests that only integral constant expression can be used.
+//
+// Section 4.3.3 (Constant Expressions) from the GLSL 4.50 spec:
+// "An integral constant expression is a constant expression that evaluates to
+//  a scalar signed or unsigned integer."
+
+#version 110
+#extension GL_ARB_explicit_attrib_location: require
+#extension GL_ARB_enhanced_layouts: require
+
+const vec3 start = vec3(1.0);
+layout(location = start) in vec4 b;
+
+void main()
+{
+	gl_Position = b;
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/compiler-time-constants/invalid-types/vec4.vert b/tests/spec/arb_enhanced_layouts/compiler/compiler-time-constants/invalid-types/vec4.vert
new file mode 100644
index 0000000..8677bf6
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/compiler-time-constants/invalid-types/vec4.vert
@@ -0,0 +1,23 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.10
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_explicit_attrib_location
+// [end config]
+//
+// Tests that only integral constant expression can be used.
+//
+// Section 4.3.3 (Constant Expressions) from the GLSL 4.50 spec:
+// "An integral constant expression is a constant expression that evaluates to
+//  a scalar signed or unsigned integer."
+
+#version 110
+#extension GL_ARB_explicit_attrib_location: require
+#extension GL_ARB_enhanced_layouts: require
+
+const vec4 start = vec4(1.0);
+layout(location = start) in vec4 b;
+
+void main()
+{
+	gl_Position = b;
+}
-- 
2.4.3



More information about the Piglit mailing list