[Piglit] [PATCH 2/7] arb_enhanced_layouts: add basic component qualifier tests for doubles

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


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

---
 .../component-layout/double-component-1.vert       | 21 +++++++++++++++++++++
 .../component-layout/double-component-3.vert       | 21 +++++++++++++++++++++
 .../compiler/component-layout/dvec2.vert           | 22 ++++++++++++++++++++++
 .../compiler/component-layout/dvec3.vert           | 20 ++++++++++++++++++++
 .../compiler/component-layout/dvec4.vert           | 20 ++++++++++++++++++++
 5 files changed, 104 insertions(+)
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/component-layout/double-component-1.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/component-layout/double-component-3.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec2.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec3.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec4.vert

diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/double-component-1.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/double-component-1.vert
new file mode 100644
index 0000000..c8da165
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/double-component-1.vert
@@ -0,0 +1,21 @@
+// [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:
+//
+//   "It is a compile-time error to use component 1 or 3 as the beginning of a
+//   double or dvec2."
+
+#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 = 1) out double b;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/double-component-3.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/double-component-3.vert
new file mode 100644
index 0000000..d054cd2
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/double-component-3.vert
@@ -0,0 +1,21 @@
+// [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:
+//
+//   "It is a compile-time error to use component 1 or 3 as the beginning of a
+//   double or dvec2."
+
+#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 dvec2 b;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec2.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec2.vert
new file mode 100644
index 0000000..090aac0
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec2.vert
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: pass
+// 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 scalar double will consume two of these components, and a dvec2 will
+//   consume all four components available within a location. A dvec3 or dvec4
+//   can only be declared without specifying a component."
+
+#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 = 0) out dvec2 b;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec3.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec3.vert
new file mode 100644
index 0000000..1927658
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec3.vert
@@ -0,0 +1,20 @@
+// [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 dvec3 or dvec4 can only be declared without specifying a component."
+
+#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 = 1) out dvec3 b;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec4.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec4.vert
new file mode 100644
index 0000000..3558417
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec4.vert
@@ -0,0 +1,20 @@
+// [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 dvec3 or dvec4 can only be declared without specifying a component."
+
+#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 = 1) out dvec4 b;
+
+void main()
+{
+}
-- 
2.4.3



More information about the Piglit mailing list