[Piglit] [PATCH 1/2] arb_enhanced_layouts: test align layout qualifier can only be used with std140 or std430
Timothy Arceri
timothy.arceri at collabora.com
Tue Jan 12 01:27:17 PST 2016
---
.../ssbo-packed-layout-member-align.vert | 26 ++++++++++++++++++++++
.../ssbo-shared-layout-block-align.vert | 26 ++++++++++++++++++++++
.../ssbo-shared-layout-member-align.vert | 26 ++++++++++++++++++++++
.../align-layout/ssbo-std140-block-align.vert | 26 ++++++++++++++++++++++
.../align-layout/ssbo-std140-member-align.vert | 26 ++++++++++++++++++++++
.../align-layout/ssbo-std430-block-align.vert | 26 ++++++++++++++++++++++
.../align-layout/ssbo-std430-member-align.vert | 26 ++++++++++++++++++++++
.../ubo-packed-layout-block-align.vert | 25 +++++++++++++++++++++
.../ubo-packed-layout-member-align.vert | 25 +++++++++++++++++++++
.../ubo-shared-layout-block-align.vert | 25 +++++++++++++++++++++
.../ubo-shared-layout-member-align.vert | 25 +++++++++++++++++++++
.../align-layout/ubo-std140-block-align.vert | 25 +++++++++++++++++++++
.../ubo-std140-member-align-named-block.vert | 25 +++++++++++++++++++++
.../align-layout/ubo-std140-member-align.vert | 25 +++++++++++++++++++++
14 files changed, 357 insertions(+)
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-packed-layout-member-align.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-shared-layout-block-align.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-shared-layout-member-align.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-std140-block-align.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-std140-member-align.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-std430-block-align.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-std430-member-align.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-packed-layout-block-align.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-packed-layout-member-align.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-shared-layout-block-align.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-shared-layout-member-align.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-std140-block-align.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-std140-member-align-named-block.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-std140-member-align.vert
diff --git a/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-packed-layout-member-align.vert b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-packed-layout-member-align.vert
new file mode 100644
index 0000000..59b1231
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-packed-layout-member-align.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]
+//
+// ARB_enhanced_layouts spec says:
+// "The *align* qualifier can only be used on blocks or block members, and
+// only for blocks declared with *std140* or *std430* layouts."
+//
+// Tests for compiler error, when the block is of packed layout.
+//
+
+#version 140
+#extension GL_ARB_enhanced_layouts : enable
+#extension GL_ARB_shader_storage_buffer_object : enable
+
+layout(packed, align = 32) buffer b {
+ vec4 var1;
+ vec4 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-shared-layout-block-align.vert b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-shared-layout-block-align.vert
new file mode 100644
index 0000000..981c2d8
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-shared-layout-block-align.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]
+//
+// ARB_enhanced_layouts spec says:
+// "The *align* qualifier can only be used on blocks or block members, and
+// only for blocks declared with *std140* or *std430* layouts."
+//
+// Tests for compiler error, when the block is of shared layout.
+//
+
+#version 140
+#extension GL_ARB_enhanced_layouts : enable
+#extension GL_ARB_shader_storage_buffer_object : enable
+
+layout(shared, align = 32) buffer b {
+ vec4 var1;
+ vec4 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-shared-layout-member-align.vert b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-shared-layout-member-align.vert
new file mode 100644
index 0000000..39964fb
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-shared-layout-member-align.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]
+//
+// ARB_enhanced_layouts spec says:
+// "The *align* qualifier can only be used on blocks or block members, and
+// only for blocks declared with *std140* or *std430* layouts."
+//
+// Tests for compiler error, when the block is of shared layout.
+//
+
+#version 140
+#extension GL_ARB_enhanced_layouts : enable
+#extension GL_ARB_shader_storage_buffer_object : enable
+
+layout(shared) buffer b {
+ layout(align = 32) vec4 var1;
+ layout(align = 16) vec4 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-std140-block-align.vert b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-std140-block-align.vert
new file mode 100644
index 0000000..4f8dc82
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-std140-block-align.vert
@@ -0,0 +1,26 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_shader_storage_buffer_object
+// check_link: false
+// [end config]
+//
+// ARB_enhanced_layouts spec says:
+// "The *align* qualifier can only be used on blocks or block members, and
+// only for blocks declared with *std140* or *std430* layouts."
+//
+// Tests for successful compilation, when the block is of std140 layout.
+//
+
+#version 140
+#extension GL_ARB_enhanced_layouts : enable
+#extension GL_ARB_shader_storage_buffer_object : enable
+
+layout(std140, align = 32) buffer b {
+ vec4 var1;
+ layout(align = 16) vec4 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-std140-member-align.vert b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-std140-member-align.vert
new file mode 100644
index 0000000..368146e
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-std140-member-align.vert
@@ -0,0 +1,26 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_shader_storage_buffer_object
+// check_link: false
+// [end config]
+//
+// ARB_enhanced_layouts spec says:
+// "The *align* qualifier can only be used on blocks or block members, and
+// only for blocks declared with *std140* or *std430* layouts."
+//
+// Tests for successful compilation, when the block is of std140 layout.
+//
+
+#version 140
+#extension GL_ARB_enhanced_layouts : enable
+#extension GL_ARB_shader_storage_buffer_object : enable
+
+layout(std140) buffer b {
+ layout(align = 32) vec4 var1;
+ layout(align = 16) vec4 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-std430-block-align.vert b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-std430-block-align.vert
new file mode 100644
index 0000000..2aebd03
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-std430-block-align.vert
@@ -0,0 +1,26 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_shader_storage_buffer_object
+// check_link: false
+// [end config]
+//
+// ARB_enhanced_layouts spec says:
+// "The *align* qualifier can only be used on blocks or block members, and
+// only for blocks declared with *std140* or *std430* layouts."
+//
+// Tests for successful compilation, when the block is of std140 layout.
+//
+
+#version 140
+#extension GL_ARB_enhanced_layouts : enable
+#extension GL_ARB_shader_storage_buffer_object : enable
+
+layout(std430, align = 32) buffer b {
+ vec4 var1;
+ layout(align = 16) vec4 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-std430-member-align.vert b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-std430-member-align.vert
new file mode 100644
index 0000000..ac98df6
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ssbo-std430-member-align.vert
@@ -0,0 +1,26 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_shader_storage_buffer_object
+// check_link: false
+// [end config]
+//
+// ARB_enhanced_layouts spec says:
+// "The *align* qualifier can only be used on blocks or block members, and
+// only for blocks declared with *std140* or *std430* layouts."
+//
+// Tests for successful compilation, when the block is of std140 layout.
+//
+
+#version 140
+#extension GL_ARB_enhanced_layouts : enable
+#extension GL_ARB_shader_storage_buffer_object : enable
+
+layout(std430) buffer b {
+ layout(align = 32) vec4 var1;
+ layout(align = 16) vec4 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-packed-layout-block-align.vert b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-packed-layout-block-align.vert
new file mode 100644
index 0000000..64d5377
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-packed-layout-block-align.vert
@@ -0,0 +1,25 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: false
+// [end config]
+//
+// ARB_enhanced_layouts spec says:
+// "The *align* qualifier can only be used on blocks or block members, and
+// only for blocks declared with *std140* or *std430* layouts."
+//
+// Tests for compiler error, when the block is of packed layout.
+//
+
+#version 140
+#extension GL_ARB_enhanced_layouts : enable
+
+layout(packed, align = 32) uniform block {
+ vec4 var1;
+ vec4 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-packed-layout-member-align.vert b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-packed-layout-member-align.vert
new file mode 100644
index 0000000..9ac4187
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-packed-layout-member-align.vert
@@ -0,0 +1,25 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: false
+// [end config]
+//
+// ARB_enhanced_layouts spec says:
+// "The *align* qualifier can only be used on blocks or block members, and
+// only for blocks declared with *std140* or *std430* layouts."
+//
+// Tests for compiler error, when the block is of packed layout.
+//
+
+#version 140
+#extension GL_ARB_enhanced_layouts : enable
+
+layout(packed) uniform block {
+ layout(align = 32) vec4 var1;
+ layout(align = 16) vec4 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-shared-layout-block-align.vert b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-shared-layout-block-align.vert
new file mode 100644
index 0000000..2d3d023
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-shared-layout-block-align.vert
@@ -0,0 +1,25 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: false
+// [end config]
+//
+// ARB_enhanced_layouts spec says:
+// "The *align* qualifier can only be used on blocks or block members, and
+// only for blocks declared with *std140* or *std430* layouts."
+//
+// Tests for compiler error, when the block is of shared layout.
+//
+
+#version 140
+#extension GL_ARB_enhanced_layouts : enable
+
+layout(shared, align = 32) uniform block {
+ vec4 var1;
+ vec4 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-shared-layout-member-align.vert b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-shared-layout-member-align.vert
new file mode 100644
index 0000000..062744d
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-shared-layout-member-align.vert
@@ -0,0 +1,25 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: false
+// [end config]
+//
+// ARB_enhanced_layouts spec says:
+// "The *align* qualifier can only be used on blocks or block members, and
+// only for blocks declared with *std140* or *std430* layouts."
+//
+// Tests for compiler error, when the block is of shared layout.
+//
+
+#version 140
+#extension GL_ARB_enhanced_layouts : enable
+
+layout(shared) uniform block {
+ layout(align = 32) vec4 var1;
+ layout(align = 16) vec4 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-std140-block-align.vert b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-std140-block-align.vert
new file mode 100644
index 0000000..293f81c
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-std140-block-align.vert
@@ -0,0 +1,25 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: false
+// [end config]
+//
+// ARB_enhanced_layouts spec says:
+// "The *align* qualifier can only be used on blocks or block members, and
+// only for blocks declared with *std140* or *std430* layouts."
+//
+// Tests for successful compilation, when align is used a the block level.
+//
+
+#version 140
+#extension GL_ARB_enhanced_layouts : enable
+
+layout(std140, align = 32) uniform block {
+ vec4 var1;
+ layout(align = 16) vec4 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-std140-member-align-named-block.vert b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-std140-member-align-named-block.vert
new file mode 100644
index 0000000..ba68f6e
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-std140-member-align-named-block.vert
@@ -0,0 +1,25 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: false
+// [end config]
+//
+// ARB_enhanced_layouts spec says:
+// "The *align* qualifier can only be used on blocks or block members, and
+// only for blocks declared with *std140* or *std430* layouts."
+//
+// Tests for successful compilation, when the block is of std140 layout.
+//
+
+#version 150
+#extension GL_ARB_enhanced_layouts : enable
+
+layout(std140) uniform block {
+ layout(align = 32) vec4 var1;
+ layout(align = 16) vec4 var2;
+} named;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-std140-member-align.vert b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-std140-member-align.vert
new file mode 100644
index 0000000..abd419b
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/align-layout/ubo-std140-member-align.vert
@@ -0,0 +1,25 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: false
+// [end config]
+//
+// ARB_enhanced_layouts spec says:
+// "The *align* qualifier can only be used on blocks or block members, and
+// only for blocks declared with *std140* or *std430* layouts."
+//
+// Tests for successful compilation, when the block is of std140 layout.
+//
+
+#version 140
+#extension GL_ARB_enhanced_layouts : enable
+
+layout(std140) uniform block {
+ layout(align = 32) vec4 var1;
+ layout(align = 16) vec4 var2;
+};
+
+void main()
+{
+}
--
2.4.3
More information about the Piglit
mailing list