Khronos Public Bugzilla
Bug 876 - shared buffer layout and querying variables
Summary: shared buffer layout and querying variables
Alias: None
Product: OpenGL
Classification: Unclassified
Component: API Specification (show other bugs)
Version: 4.3
Hardware: All All
: P3 normal
Target Milestone: ---
Assignee: johnk
QA Contact:
Depends on:
Reported: 2013-05-24 04:45 PDT by Alfonse
Modified: 2015-10-22 14:09 PDT (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Alfonse 2013-05-24 04:45:38 PDT
The `shared` layout qualifier means that the layout of a particular set of variables in a block will be identical, so long as all blocks share the same definition. However, this does *not* mean that all of the members of a `shared` block are considered "active". Which means that you aren't guaranteed to be able to query the full layout for such a block from any program you compile that uses the shared block.

This is not a phantasmal issue; it is real and is really affecting code. NVIDIA's current drivers apparently will not consider shared uniforms active unless they're used. And the specification seems to allow this. See here for details:

The specification should *not* permit this.
Comment 1 johnk 2013-07-15 12:01:48 PDT
I believe this related to something we have been recently working on internally, and will update here once that's confirmed and with the result.
Comment 2 Graeme Leese 2015-10-22 14:09:53 PDT
The spec has been updated to consider all members of shared, std140 and std430 blocks as active, so they can be queried.