diff options
| author | Yong He <yonghe@outlook.com> | 2025-02-06 22:02:43 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-06 22:02:43 -0800 |
| commit | bae87afb20f95f9f27c64c4955bbc4464c576509 (patch) | |
| tree | 44d079bd76002d69be20efdbd03ac6ff62ef8caf /source/slang/slang-ir.cpp | |
| parent | 075b10e69055acc6536d74c1cb3399e0fe75338d (diff) | |
Support stage_switch. (#6311)
* Support stage_switch.
* Update proposal status.
* Fix gl_InstanceID.
* Fix.
Diffstat (limited to 'source/slang/slang-ir.cpp')
| -rw-r--r-- | source/slang/slang-ir.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index 3314567f1..6cf7a1786 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -3209,6 +3209,11 @@ void IRBuilder::setDataType(IRInst* inst, IRType* dataType) } } +IRInst* IRBuilder::emitGetCurrentStage() +{ + return emitIntrinsicInst(getIntType(), kIROp_GetCurrentStage, 0, nullptr); +} + IRInst* IRBuilder::emitGetValueFromBoundInterface(IRType* type, IRInst* boundInterfaceValue) { auto inst = @@ -8301,6 +8306,7 @@ bool IRInst::mightHaveSideEffects(SideEffectAnalysisOptions options) case kIROp_ResolveVaryingInputRef: case kIROp_GetPerVertexInputArray: case kIROp_MetalCastToDepthTexture: + case kIROp_GetCurrentStage: return false; case kIROp_ForwardDifferentiate: |
