summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit-c-like.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2025-01-24 21:39:13 -0800
committerGitHub <noreply@github.com>2025-01-24 21:39:13 -0800
commit3ecbeacd3b02e2a8c1b9796df1caced0aa34224f (patch)
tree6e8ddd208082ca042a7ebac2f5125337b4216a13 /source/slang/slang-emit-c-like.cpp
parenta7958afa5ace2c92e10e1765a5bc33c891d09079 (diff)
Fix depth texture sampling on Metal. (#6168)
Diffstat (limited to 'source/slang/slang-emit-c-like.cpp')
-rw-r--r--source/slang/slang-emit-c-like.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp
index ac548e354..98bddad9b 100644
--- a/source/slang/slang-emit-c-like.cpp
+++ b/source/slang/slang-emit-c-like.cpp
@@ -1413,6 +1413,7 @@ bool CLikeSourceEmitter::shouldFoldInstIntoUseSites(IRInst* inst)
// or statement).
case kIROp_UpdateElement:
case kIROp_DefaultConstruct:
+ case kIROp_MetalCastToDepthTexture:
return false;
// Always fold these in, because they are trivial
@@ -3129,6 +3130,7 @@ void CLikeSourceEmitter::_emitInst(IRInst* inst)
case kIROp_AtomicCompareExchange:
case kIROp_StructuredBufferGetDimensions:
case kIROp_MetalAtomicCast:
+ case kIROp_MetalCastToDepthTexture:
emitInstStmt(inst);
break;