1#version 430 2 3// Verify that blocks with different instance names 4// are correctly detected as invalid non-matching blocks 5// when they are matched up by block name 6layout (std140) uniform Block 7{ 8 mat4 uProj; 9} uD; 10 11out Vertex 12{ 13 vec4 v1; 14} oV; 15 16layout (std140) uniform ColorBlock 17{ 18 vec4 color1; 19} uC; 20 21// Error, buffer blocks and uniform blocks share the 22// same namespace for their block name 23layout (std430) buffer ColorBlock 24{ 25 vec4 color1; 26} uBufC; 27 28vec4 getWorld(); 29vec4 getColor2(); 30 31out vec4 oColor; 32 33void 34main() 35{ 36 oColor = uC.color1 * getColor2(); 37 oV.v1 = uC.color1 + uBufC.color1; 38 39 gl_Position = uD.uProj * getWorld(); 40} 41