[Piglit] [PATCH 3/4] arb_enhanced_layouts: test offset is a multiple of base alignment for vec4

Timothy Arceri timothy.arceri at collabora.com
Tue Dec 29 15:40:24 PST 2015


Cc: Emil Velikov <emil.l.velikov at gmail.com>
---
 ...-offset-multiple-of-base-member-align-vec4.vert | 25 ++++++++++++++++++++++
 ...-offset-multiple-of-base-member-align-vec4.vert | 24 +++++++++++++++++++++
 2 files changed, 49 insertions(+)
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/explicit-offsets/ssbo-offset-multiple-of-base-member-align-vec4.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/explicit-offsets/ubo-offset-multiple-of-base-member-align-vec4.vert

diff --git a/tests/spec/arb_enhanced_layouts/compiler/explicit-offsets/ssbo-offset-multiple-of-base-member-align-vec4.vert b/tests/spec/arb_enhanced_layouts/compiler/explicit-offsets/ssbo-offset-multiple-of-base-member-align-vec4.vert
new file mode 100644
index 0000000..bca4220
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/explicit-offsets/ssbo-offset-multiple-of-base-member-align-vec4.vert
@@ -0,0 +1,25 @@
+// [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 specified offset must be a multiple of the base alignment of the
+//    type of the block member it qualifies, or a compile-time error results."
+//
+
+#version 140
+#extension GL_ARB_enhanced_layouts : enable
+#extension GL_ARB_shader_storage_buffer_object : enable
+
+layout(std430) buffer b {
+       layout(offset = 8) vec4 var1;
+       layout(offset = 24) vec4 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/explicit-offsets/ubo-offset-multiple-of-base-member-align-vec4.vert b/tests/spec/arb_enhanced_layouts/compiler/explicit-offsets/ubo-offset-multiple-of-base-member-align-vec4.vert
new file mode 100644
index 0000000..4b1e513
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/explicit-offsets/ubo-offset-multiple-of-base-member-align-vec4.vert
@@ -0,0 +1,24 @@
+// [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 specified offset must be a multiple of the base alignment of the
+//    type of the block member it qualifies, or a compile-time error results."
+//
+
+#version 140
+#extension GL_ARB_enhanced_layouts : enable
+
+layout(std140) uniform block {
+       layout(offset = 8) vec4 var1;
+       layout(offset = 24) vec4 var2;
+};
+
+void main()
+{
+}
-- 
2.4.3



More information about the Piglit mailing list