[Piglit] [PATCH 2/2] arb_enhanced_layouts: tests compiler error if align qualifier not a power of 2
Timothy Arceri
timothy.arceri at collabora.com
Tue Jan 12 01:27:18 PST 2016
---
.../ssbo-block-align-not-power-of-two.vert | 26 ++++++++++++++++++++++
.../ssbo-member-align-not-power-of-two.vert | 26 ++++++++++++++++++++++
.../ubo-block-align-not-power-of-two.vert | 24 ++++++++++++++++++++
.../align-layout/ubo-block-align-zero.vert | 24 ++++++++++++++++++++
.../ubo-member-align-not-power-of-two.vert | 24 ++++++++++++++++++++
.../align-layout/ubo-member-align-zero.vert | 24 ++++++++++++++++++++
6 files changed, 148 insertions(+)
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-block-align-not-power-of-two.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-member-align-not-power-of-two.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-block-align-not-power-of-two.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-block-align-zero.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-member-align-not-power-of-two.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-member-align-zero.vert
diff --git a/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-block-align-not-power-of-two.vert b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-block-align-not-power-of-two.vert
new file mode 100644
index 0000000..56995dc
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-block-align-not-power-of-two.vert
@@ -0,0 +1,26 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_shader_storage_buffer_object
+// check_link: false
+// [end config]
+//
+// From Section 4.4.5 (Uniform and Shader Storage Block Layout Qualifiers) of
+// the OpenGL 4.50 spec:
+//
+// "The specified alignment must be a power of 2, or a compile-time error
+// results."
+//
+
+#version 140
+#extension GL_ARB_enhanced_layouts : enable
+#extension GL_ARB_shader_storage_buffer_object : enable
+
+layout(std140, align = 62) buffer b {
+ vec4 var1;
+ vec4 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-member-align-not-power-of-two.vert b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-member-align-not-power-of-two.vert
new file mode 100644
index 0000000..1a52ad3
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-member-align-not-power-of-two.vert
@@ -0,0 +1,26 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_shader_storage_buffer_object
+// check_link: false
+// [end config]
+//
+// From Section 4.4.5 (Uniform and Shader Storage Block Layout Qualifiers) of
+// the OpenGL 4.50 spec:
+//
+// "The specified alignment must be a power of 2, or a compile-time error
+// results."
+//
+
+#version 140
+#extension GL_ARB_enhanced_layouts : enable
+#extension GL_ARB_shader_storage_buffer_object : enable
+
+layout(std140) buffer b {
+ layout(align = 28) vec4 var1;
+ layout(align = 16) vec4 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-block-align-not-power-of-two.vert b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-block-align-not-power-of-two.vert
new file mode 100644
index 0000000..fc23415
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-block-align-not-power-of-two.vert
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: false
+// [end config]
+//
+// From Section 4.4.5 (Uniform and Shader Storage Block Layout Qualifiers) of
+// the OpenGL 4.50 spec:
+//
+// "The specified alignment must be a power of 2, or a compile-time error
+// results."
+
+#version 140
+#extension GL_ARB_enhanced_layouts : enable
+
+layout(std140, align = 40) uniform block {
+ vec4 var1;
+ vec4 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-block-align-zero.vert b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-block-align-zero.vert
new file mode 100644
index 0000000..308e390
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-block-align-zero.vert
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: false
+// [end config]
+//
+// From Section 4.4.5 (Uniform and Shader Storage Block Layout Qualifiers) of
+// the OpenGL 4.50 spec:
+//
+// "The specified alignment must be a power of 2, or a compile-time error
+// results."
+
+#version 140
+#extension GL_ARB_enhanced_layouts : enable
+
+layout(std140, align = 0) uniform block {
+ vec4 var1;
+ vec4 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-member-align-not-power-of-two.vert b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-member-align-not-power-of-two.vert
new file mode 100644
index 0000000..7943a24
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-member-align-not-power-of-two.vert
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: false
+// [end config]
+//
+// From Section 4.4.5 (Uniform and Shader Storage Block Layout Qualifiers) of
+// the OpenGL 4.50 spec:
+//
+// "The specified alignment must be a power of 2, or a compile-time error
+// results."
+
+#version 140
+#extension GL_ARB_enhanced_layouts : enable
+
+layout(std140) uniform block {
+ layout(align = 32) vec4 var1;
+ layout(align = 20) vec4 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-member-align-zero.vert b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-member-align-zero.vert
new file mode 100644
index 0000000..e7b18f9
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-member-align-zero.vert
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: false
+// [end config]
+//
+// From Section 4.4.5 (Uniform and Shader Storage Block Layout Qualifiers) of
+// the OpenGL 4.50 spec:
+//
+// "The specified alignment must be a power of 2, or a compile-time error
+// results."
+
+#version 140
+#extension GL_ARB_enhanced_layouts : enable
+
+layout(std140) uniform block {
+ layout(align = 0) vec4 var1;
+ layout(align = 20) vec4 var2;
+};
+
+void main()
+{
+}
--
2.4.3
More information about the Piglit
mailing list