Skip to content

Commit 2bc8cbb

Browse files
SPIRV Resources: fixed UB name for source produced by slang (close #698)
1 parent c4a98bd commit 2bc8cbb

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)

0 commit comments

Comments
 (0)