summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorjarcherNV <jarcher@nvidia.com>2025-08-04 12:26:30 -0700
committerGitHub <noreply@github.com>2025-08-04 19:26:30 +0000
commit3f12964b24f8829a4548f634463492f02b7de913 (patch)
tree4ebb45c9f4b61ecce73293828e0aef6213641748 /source
parent34840bb69fd6b124e772535ffb3f223743870467 (diff)
Add support for pointer literals in metal (#8040)
Add support for kIROp_PtrLit types in metal and add a test for null pointer values, which is the only valid value.
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-emit-metal.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/slang/slang-emit-metal.cpp b/source/slang/slang-emit-metal.cpp
index d3b00d57d..7dd0c19ad 100644
--- a/source/slang/slang-emit-metal.cpp
+++ b/source/slang/slang-emit-metal.cpp
@@ -937,6 +937,11 @@ bool MetalSourceEmitter::tryEmitInstExprImpl(IRInst* inst, const EmitOpInfo& inO
}
return true;
}
+ case kIROp_PtrLit:
+ {
+ m_writer->emit("nullptr");
+ return true;
+ }
default:
break;
}