Shader interface matching rework to fix #2136 (#2156)
authorMalcolm Bechard <mbechard@users.noreply.github.com>
Thu, 2 Apr 2020 08:03:53 +0000 (04:03 -0400)
committerGitHub <noreply@github.com>
Thu, 2 Apr 2020 08:03:53 +0000 (02:03 -0600)
commit0b66fa3b62cb36a3bc86f5018cf92a5211b27156
tree959ae6ddc0e9ff43e1c4ef966359c5e45e42cfa2
parent1fff3623550471d20d2a4d0afeeb0bedf28edc54
Shader interface matching rework to fix #2136 (#2156)

* rework how shader interface block naming rules are handled

* Fixes 2136

According to the spec, shader interfaces (uniform blocks, buffer
blocks, input blocks, output blocks) all should be matched up via
their block names across all compilation units, not instance names.
Also, all block names can be re-used between all 4 interface types
without conflict. This change makes it so all of these blocks are
matched and remapped using block name and not by instance name.
Additional the rule that matched uniform and buffer blocks must
either be anonymous or named (but not nessearily the same name) is
now imposed.

* add warning if instance names differ between matched shader interfaces

* Add test cases from #2137 which is now fixed as well.

* replace some tab characters with spaces

* buffer blocks and uniform blocks now share the same block namespace
29 files changed:
Test/baseResults/link.multiAnonBlocksInvalid.0.0.vert.out [new file with mode: 0755]
Test/baseResults/link.multiAnonBlocksValid.0.0.vert.out [new file with mode: 0755]
Test/baseResults/link.multiBlocksInvalid.0.0.vert.out [new file with mode: 0755]
Test/baseResults/link.multiBlocksValid.1.0.vert.out [new file with mode: 0755]
Test/baseResults/link.vk.multiBlocksValid.0.0.vert.out [new file with mode: 0755]
Test/baseResults/link.vk.multiBlocksValid.1.0.geom.out [new file with mode: 0755]
Test/baseResults/link.vk.pcNamingInvalid.0.0.vert.out [new file with mode: 0755]
Test/baseResults/link.vk.pcNamingValid.0.0.vert.out [new file with mode: 0755]
Test/link.multiAnonBlocksInvalid.0.0.vert [new file with mode: 0755]
Test/link.multiAnonBlocksInvalid.0.1.vert [new file with mode: 0755]
Test/link.multiAnonBlocksValid.0.0.vert [new file with mode: 0755]
Test/link.multiAnonBlocksValid.0.1.vert [new file with mode: 0755]
Test/link.multiBlocksInvalid.0.0.vert [new file with mode: 0755]
Test/link.multiBlocksInvalid.0.1.vert [new file with mode: 0755]
Test/link.multiBlocksValid.1.0.vert [new file with mode: 0755]
Test/link.multiBlocksValid.1.1.vert [new file with mode: 0755]
Test/link.vk.multiBlocksValid.0.0.vert [new file with mode: 0755]
Test/link.vk.multiBlocksValid.0.1.vert [new file with mode: 0755]
Test/link.vk.multiBlocksValid.1.0.geom [new file with mode: 0755]
Test/link.vk.multiBlocksValid.1.1.geom [new file with mode: 0755]
Test/link.vk.pcNamingInvalid.0.0.vert [new file with mode: 0755]
Test/link.vk.pcNamingInvalid.0.1.vert [new file with mode: 0755]
Test/link.vk.pcNamingValid.0.0.vert [new file with mode: 0755]
Test/link.vk.pcNamingValid.0.1.vert [new file with mode: 0755]
glslang/Include/Types.h
glslang/MachineIndependent/linkValidate.cpp [changed mode: 0644->0755]
glslang/MachineIndependent/localintermediate.h
gtests/Link.FromFile.Vk.cpp [changed mode: 0644->0755]
gtests/Link.FromFile.cpp [changed mode: 0644->0755]