Fix ByteAddressBuffer as function parameter

Make sure that an id represents a variable before adding it to an entry
point's interface.

Fixes #3297.
This commit is contained in:
Nathaniel Cesario 2023-08-22 17:51:20 -06:00 committed by arcady-lunarg
parent adfcaba7ae
commit a1f8cd429f
4 changed files with 420 additions and 1 deletions

View file

@ -2014,7 +2014,7 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
spv::StorageClass sc = builder.getStorageClass(id);
// Before SPIR-V 1.4, we only want to include Input and Output.
// Starting with SPIR-V 1.4, we want all globals.
if ((glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_4 && builder.isGlobalStorage(id)) ||
if ((glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_4 && builder.isGlobalVariable(id)) ||
(sc == spv::StorageClassInput || sc == spv::StorageClassOutput)) {
iOSet.insert(id);
}