Skip to content

Commit f4c2460

Browse files
SPIRV Resources: fix UB name detection for byte code produced by slang (close #698)
1 parent 6e7692c commit f4c2460

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Graphics/ShaderTools/src/SPIRVShaderResources.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ const std::string& GetUBName(diligent_spirv_cross::Compiler& Compi
259259
// use UB.name even if the instance name is present
260260

261261
const std::string& instance_name = Compiler.get_name(UB.id);
262-
return (IRSource.hlsl && !instance_name.empty()) ? instance_name : UB.name;
262+
return ((IRSource.hlsl || IRSource.lang == spv::SourceLanguageSlang) && !instance_name.empty()) ? instance_name : UB.name;
263263
}
264264

265265
static SHADER_CODE_BASIC_TYPE SpirvBaseTypeToShaderCodeBasicType(diligent_spirv_cross::SPIRType::BaseType SpvBaseType)

ThirdParty/SPIRV-Cross

Submodule SPIRV-Cross updated 74 files

0 commit comments

Comments
 (0)