GLSL 4.5 Specification - Confusion about Interface Blocks

Hi,

I’m a bit confused by parts of section 4.3.9 of the GLSL 4.5 specification. That section is about interface blocks. Everything is fine until after the definition of shader interfaces.

From what I understand, in a program:

[ul]
[li]The set of all the uniform variables and uniform blocks forms 1 shader interface.[/li][li]The set of all buffer blocks forms 1 shader interface.[/li][li]For every boundary between adjacent pipeline stages, the set of all out/in variables forms 1 shader interface.[/li][/ul]
So far so good, but here comes the confusion.

The block name is used to match within shader interfaces: an output block of one pipeline stage will be matched to an input block with the same name in the subsequent pipeline stage.
Ok, fine, but what about the matching of buffer blocks (e.g. declared in different shaders of the same program, thus part of the same shader interface)? Same question about uniform blocks…

For uniform blocks, the application uses the block name to identify the block
Great, but there is no equivalent mention for buffer blocks. Why?

Matched uniform block names (but not input or output block names) must also either all be lacking an instance name or all having an instance name
And what about buffer blocks?

Any help would be greatly appreciated, thanks!

Ok, fine, but what about the matching of buffer blocks (e.g. declared in different shaders of the same program, thus part of the same shader interface)? Same question about uniform blocks…

You go on to quote how interface block matching works. It’s in the very next paragraph.

Great, but there is no equivalent mention for buffer blocks. Why?

Because it’s a bug in the spec.

Thanks for your reply. Then I may have found another issue. In section 4.4 “Layout Qualifiers”, it says “They can also appear
with just an interface qualifier (a storage qualifier that is in, out, or uniform)”. Here again, buffer seems to be missing. Maybe it should be in your ticket too.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.