1 /* The GL 4.30 (Core Profile) spec says:
3 * "7.8 Shader Buffer Variables and Shader Storage Blocks
7 * When a named shader storage block is declared by multiple
8 * shaders in a program, it must be declared identically in each
9 * shader. The buffer variables within the block must be declared
10 * with the same names, types, qualification, and declaration
11 * order. If a program contains multiple shaders with different
12 * declarations for the same named shader storage block, the
13 * program will fail to link."
15 * Although this restriction is not included in the
16 * ARB_shading_language_420pack spec, it is reasonable to believe that
17 * it applies to it too.
19 * Verify that a link error happens when using different binding
20 * points for instanced Shader Storage Blocks with the same name in
21 * different compilation units.
27 GL_ARB_shading_language_420pack
28 GL_ARB_shader_storage_buffer_object
32 #extension GL_ARB_shading_language_420pack: require
33 #extension GL_ARB_shader_storage_buffer_object: require
35 layout (binding = 0) buffer Block {
39 in vec4 piglit_vertex;
44 vs_fs = vs_block.color;
45 gl_Position = piglit_vertex;
50 #extension GL_ARB_shading_language_420pack: require
51 #extension GL_ARB_shader_storage_buffer_object: require
53 layout (binding = 1) buffer Block {
62 fs_out = vs_fs * fs_block.color.x;