mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-09 20:10:06 +00:00
adba7dfc68
If a block has assigned a XfbOffset it is assumed that it would inherit the current global XfbBuffer. This commit fixes two use cases: 1) Getting the members of a Block with a XfbOffset to be assigned an offset, as explained on GLSL 4.60 spec, section "4.4.2 Output Layout Qualifiers", subsection "Transform Feedback Layout Qualifiers". 2) Compute properly an error on overlapping ranges if a block is assigned a XfbOffset and one of it members is assigned a explicit one. This gets working because when the members of a block get assigned a Offset/Buffer at fixBlockXfbOffsets, then the block is deassigned the Offsets, so ranges are computed only with the block members. BTW, this is already done when redeclaring block builtins. Fixes #1535
14 lines
222 B
GLSL
14 lines
222 B
GLSL
#version 450
|
|
|
|
layout(xfb_buffer=2) out;
|
|
layout(location=5, xfb_offset=0) out block2 {
|
|
float y1_out;
|
|
vec4 y2_out;
|
|
};
|
|
|
|
void main() {
|
|
y1_out = 7.0;
|
|
y2_out = vec4(1.0, 0.0, 0.0, 1.0);
|
|
gl_Position = vec4(0.0);
|
|
}
|