You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A shader interface is defined to be one of these:
• All the uniform variables and uniform blocks declared in a program. This spans all compilation
units linked together within one program.
• All the buffer blocks declared in a program.
• The boundary between adjacent programmable pipeline stages: This spans all the outputs
declared in all compilation units of the first stage and all the inputs declared in all compilation
units of the second stage. Note that for the purposes of this definition, the fragment shader and
the preceding shader are considered to have a shared boundary even though in practice, all
values passed to the fragment shader first pass through the rasterizer and interpolator.
This reads to me to mean that buffer blocks and uniform blocks should be treated as different shader interfaces. Specifically, in the case of block naming, they would have different namespaces:
A block name is allowed to have different definitions in different shader interfaces
within the same shader, allowing, for example, an input block and output block to have the same
name.
Determined that for block naming, the buffer blocks and uniform blocks should share the same namespace. This matches what the current Intel and Nvidia GLSL compilers do as well. I think the spec should be clarified to match what the reference compiler (and other compilers) is doing.
Thanks!
The text was updated successfully, but these errors were encountered:
It's certainly more intuitive to me that there are 3. That's what I originally expected. I don't see UBO and SSBOs being different enough to warrant separation.
Khronos discussed this internally, and it turns out there is a mix of implementation's interpretations. So, in the face of that, it was decided to leave the specification as is. (We can regroup on the original issue back at the glslang repo.)
Hey,
GLSL 4.60 defines a shader interface as:
This reads to me to mean that buffer blocks and uniform blocks should be treated as different shader interfaces. Specifically, in the case of block naming, they would have different namespaces:
Discussions with @johnkslang in this pull request for the reference compiler:
KhronosGroup/glslang#2156
Determined that for block naming, the buffer blocks and uniform blocks should share the same namespace. This matches what the current Intel and Nvidia GLSL compilers do as well. I think the spec should be clarified to match what the reference compiler (and other compilers) is doing.
Thanks!
The text was updated successfully, but these errors were encountered: