--- .../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 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit