diff options
author | Timothy Arceri <timothy.arceri@collabora.com> | 2015-12-30 10:36:31 +1100 |
---|---|---|
committer | Timothy Arceri <timothy.arceri@collabora.com> | 2016-01-18 12:18:43 +1100 |
commit | ebe09476bae733170490f719bb8d521ca3b345d4 (patch) | |
tree | 9d22d7f4aa3c98489b4706e12159864e9d1df282 | |
parent | 248dada9d84241c97ab030d24579b692687955b5 (diff) |
arb_enhanced_layouts: test offset is a multiple of base alignment for vec4
Cc: Emil Velikov <emil.l.velikov@gmail.com>
2 files changed, 49 insertions, 0 deletions
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 000000000..bca4220d3 --- /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 000000000..4b1e513c5 --- /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() +{ +} |