ParseHelper: assign global XfbBuffer to a block missing it
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
Showing
- Test/baseResults/spv.xfbOffsetOnBlockMembersAssignment.vert.out 76 additions, 0 deletions...aseResults/spv.xfbOffsetOnBlockMembersAssignment.vert.out
- Test/baseResults/spv.xfbOverlapOffsetCheckWithBlockAndMember.vert.out 88 additions, 0 deletions...ults/spv.xfbOverlapOffsetCheckWithBlockAndMember.vert.out
- Test/spv.xfbOffsetOnBlockMembersAssignment.vert 13 additions, 0 deletionsTest/spv.xfbOffsetOnBlockMembersAssignment.vert
- Test/spv.xfbOverlapOffsetCheckWithBlockAndMember.vert 19 additions, 0 deletionsTest/spv.xfbOverlapOffsetCheckWithBlockAndMember.vert
- glslang/MachineIndependent/ParseHelper.cpp 10 additions, 0 deletionsglslang/MachineIndependent/ParseHelper.cpp
- gtests/Spv.FromFile.cpp 2 additions, 0 deletionsgtests/Spv.FromFile.cpp
Loading
Please register or sign in to comment