[glslang][EXT] Support extension ARB_bindless_texture.

Add missing callgraph clean for bindless status flag.

Add test cases. Add support to check special extensions not be available for Vulkan when using GLSL.
This commit is contained in:
Zhou
2022-11-16 00:04:55 +08:00
committed by ShchchowAMD
parent 2b2523fb95
commit 16526fd9d2
19 changed files with 608 additions and 35 deletions

View File

@@ -1293,7 +1293,7 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
type.getQualifier().storage == glslang::EvqUniform) {
if (type.isAtomic())
return spv::StorageClassAtomicCounter;
if (type.containsOpaque())
if (type.containsOpaque() && !glslangIntermediate->getBindlessMode())
return spv::StorageClassUniformConstant;
}
@@ -5083,7 +5083,7 @@ bool TGlslangToSpvTraverser::originalParam(glslang::TStorageQualifier qualifier,
return true;
if (glslangIntermediate->getSource() == glslang::EShSourceHlsl)
return paramType.getBasicType() == glslang::EbtBlock;
return paramType.containsOpaque() || // sampler, etc.
return (paramType.containsOpaque() && !glslangIntermediate->getBindlessMode()) || // sampler, etc.
#ifndef GLSLANG_WEB
paramType.getQualifier().isSpirvByReference() || // spirv_by_reference
#endif