[Piglit] [PATCH 4/7] arb_enhanced_layouts: test component qualifier for overflows

Timothy Arceri t_arceri at yahoo.com.au
Wed Nov 11 14:59:26 PST 2015


From: Timothy Arceri <timothy.arceri at collabora.com>

---
 .../compiler/component-layout/overflow-double.vert | 24 ++++++++++++++++++++++
 .../compiler/component-layout/overflow-dvec2.vert  | 24 ++++++++++++++++++++++
 .../compiler/component-layout/overflow-vec2.vert   | 21 +++++++++++++++++++
 .../compiler/component-layout/overflow-vec3.vert   | 21 +++++++++++++++++++
 .../compiler/component-layout/overflow-vec4.vert   | 21 +++++++++++++++++++
 .../compiler/component-layout/overflow.vert        | 22 ++++++++++++++++++++
 6 files changed, 133 insertions(+)
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow-double.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow-dvec2.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow-vec2.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow-vec3.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow-vec4.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow.vert

diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow-double.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow-double.vert
new file mode 100644
index 0000000..da60aa3
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow-double.vert
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_gpu_shader_fp64 GL_ARB_separate_shader_objects
+// [end config]
+//
+// From Section 4.4.1 (Input Layout Qualifiers) of the GLSL 4.50 spec:
+//
+//   "A variable or block member starting at component N will consume
+//   components N, N+1, N+2, ... up through its size. It is a compile-time
+//   error if this sequence of components gets larger than 3. A scalar double
+//   will consume two of these components, and a dvec2 will consume all four
+//   components available within a location."
+
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_gpu_shader_fp64: require
+#extension GL_ARB_separate_shader_objects: require
+
+layout(location = 0, component = 3) out double b;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow-dvec2.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow-dvec2.vert
new file mode 100644
index 0000000..baa0575
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow-dvec2.vert
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_gpu_shader_fp64 GL_ARB_separate_shader_objects
+// [end config]
+//
+// From Section 4.4.1 (Input Layout Qualifiers) of the GLSL 4.50 spec:
+//
+//   "A variable or block member starting at component N will consume
+//   components N, N+1, N+2, ... up through its size. It is a compile-time
+//   error if this sequence of components gets larger than 3. A scalar double
+//   will consume two of these components, and a dvec2 will consume all four
+//   components available within a location."
+
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_gpu_shader_fp64: require
+#extension GL_ARB_separate_shader_objects: require
+
+layout(location = 0, component = 2) out dvec2 b;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow-vec2.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow-vec2.vert
new file mode 100644
index 0000000..c139a1b
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow-vec2.vert
@@ -0,0 +1,21 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_separate_shader_objects
+// [end config]
+//
+// From Section 4.4.1 (Input Layout Qualifiers) of the GLSL 4.50 spec:
+//
+//   "A variable or block member starting at component N will consume
+//   components N, N+1, N+2, ... up through its size. It is a compile-time
+//   error if this sequence of components gets larger than 3."
+
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_separate_shader_objects: require
+
+layout(location = 0, component = 3) out vec2 b;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow-vec3.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow-vec3.vert
new file mode 100644
index 0000000..dd51850
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow-vec3.vert
@@ -0,0 +1,21 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_separate_shader_objects
+// [end config]
+//
+// From Section 4.4.1 (Input Layout Qualifiers) of the GLSL 4.50 spec:
+//
+//   "A variable or block member starting at component N will consume
+//   components N, N+1, N+2, ... up through its size. It is a compile-time
+//   error if this sequence of components gets larger than 3."
+
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_separate_shader_objects: require
+
+layout(location = 0, component = 2) out vec3 b;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow-vec4.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow-vec4.vert
new file mode 100644
index 0000000..0b47a50
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow-vec4.vert
@@ -0,0 +1,21 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_separate_shader_objects
+// [end config]
+//
+// From Section 4.4.1 (Input Layout Qualifiers) of the GLSL 4.50 spec:
+//
+//   "A variable or block member starting at component N will consume
+//   components N, N+1, N+2, ... up through its size. It is a compile-time
+//   error if this sequence of components gets larger than 3."
+
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_separate_shader_objects: require
+
+layout(location = 0, component = 1) out vec4 b;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow.vert
new file mode 100644
index 0000000..05ae2d2
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/overflow.vert
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_separate_shader_objects
+// [end config]
+//
+// From Section 4.4.1 (Input Layout Qualifiers) of the GLSL 4.50 spec:
+//
+//   "The components within a location are 0, 1, 2, and 3. A variable or
+//   block member starting at component N will consume components N, N+1, N+2
+//   , ... up through its size. It is a compile-time error if this sequence of
+//   components gets larger than 3."
+
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_separate_shader_objects: require
+
+layout(location = 0, component = 4) out float a;
+
+void main()
+{
+}
-- 
2.4.3



More information about the Piglit mailing list