1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
# Tests that no link error occurs for interfaces blocks with matching
# instances names but mismatching members count and block names.
#
# GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
# "The block name (block-name) is used to match interfaces: an output
# block of one pipeline stage will be matched to an input block with
# the same name in the subsequent pipeline stage. For uniform blocks,
# the application uses the block name to identify the block.
#
# ...
#
# Outside the shading language (i.e., in the API), members are
# similarly identified except the block name is always used in place
# of the instance name (API accesses are to interfaces, not to
# shaders)."
[require]
GLSL >= 1.50
[vertex shader]
#version 150
uniform blockA {
vec4 a;
} inst;
void main()
{
gl_Position = inst.a;
}
[fragment shader]
#version 150
uniform blockB {
vec4 a;
vec4 b;
} inst;
out vec4 color;
void main()
{
color = inst.a;
}
[test]
link success
|