summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir-spirv-legalize.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-03-12 13:47:14 -0700
committerGitHub <noreply@github.com>2024-03-12 13:47:14 -0700
commitedc85fc4631782d42e113f00dfbbd113dcd8c96f (patch)
tree8d6ce10d7ea4d62633d9ce74d78ae2d41578fffb /source/slang/slang-ir-spirv-legalize.cpp
parent8b5196033ae5e8113e6d06cb64c7cbe570496c51 (diff)
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`.
Diffstat (limited to 'source/slang/slang-ir-spirv-legalize.cpp')
-rw-r--r--source/slang/slang-ir-spirv-legalize.cpp15
1 files changed, 0 insertions, 15 deletions
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<IRTextureTypeBase>(unwrapArray(inst->getDataType())))
{