From edc85fc4631782d42e113f00dfbbd113dcd8c96f Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 12 Mar 2024 13:47:14 -0700 Subject: Make type names spec-conformant in SPIRV reflect. (#3748) * Preserve ByteAddressBuffer user type name. * Make user type lowercase. * Make typenames conform to spec. * Use `SpvOpDecorateString`. --- source/slang/slang-ir-spirv-legalize.cpp | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'source/slang/slang-ir-spirv-legalize.cpp') diff --git a/source/slang/slang-ir-spirv-legalize.cpp b/source/slang/slang-ir-spirv-legalize.cpp index b387a67f6..d072e2da0 100644 --- a/source/slang/slang-ir-spirv-legalize.cpp +++ b/source/slang/slang-ir-spirv-legalize.cpp @@ -496,21 +496,6 @@ struct SPIRVLegalizationContext : public SourceEmitterBase void processGlobalParam(IRGlobalParam* inst) { - if (inst->getDataType()) - { - // Preserve the original type name as a decoration before we do any type lowering. - // This is needed to implement -fspv-reflect, which allows the compiler to output the - // original user-friendly type name of each shader parameter as a SPIRV decoration. - // - StringBuilder sb; - getTypeNameHint(sb, inst->getDataType()); - if (sb.getLength()) - { - IRBuilder builder(inst); - builder.addDecoration(inst, kIROp_UserTypeNameDecoration, builder.getStringValue(sb.produceString().getUnownedSlice())); - } - } - // If the param is a texture, infer its format. if (auto textureType = as(unwrapArray(inst->getDataType()))) { -- cgit v1.2.3