1// [config] 2// expect_result: pass 3// glsl_version: 1.40 4// require_extensions: GL_ARB_enhanced_layouts GL_ARB_shader_storage_buffer_object 5// check_link: false 6// [end config] 7// 8// ARB_enhanced_layouts spec says: 9// "The /actual alignment/ of a member will be the greater of the specified 10// *align* alignment and the standard (e.g., *std140*) base alignment for the 11// member's type. The /actual offset/ of a member is computed as follows: 12// If *offset* was declared, start with that offset, otherwise start with the 13// next available offset. If the resulting offset is not a multiple of the 14// /actual alignment/, increase it to the first offset that is a multiple of 15// the /actual alignment/. This results in the /actual offset/ the member 16// will have." 17// 18// Tests whether a block with conflicting offset and alignment requirements 19// is accepted. 20// 21 22#version 140 23#extension GL_ARB_enhanced_layouts : enable 24#extension GL_ARB_shader_storage_buffer_object : enable 25 26layout(std430) buffer b { 27 layout(offset = 4, align = 16) float var1; 28}; 29 30void main() 31{ 32} 33