diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2023-06-22 15:07:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-22 15:07:31 -0400 |
| commit | 769c7fdd19ea579770baac7b6d5e16d6406a8013 (patch) | |
| tree | a0f04c668911a2b3b58e0fc89f5bb765540226bd /source/slang/slang-emit-c-like.cpp | |
| parent | ac541d45fafde340b141172cf76d003ff70d471e (diff) | |
[branch] and [flatten] support (#2928)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Small fixes and improvements around reflection tool.
* Make PrettyWriter printing a class.
* Add HLSL output support for [flatten] and [branch]
* Handle [branch] on switch.
Diffstat (limited to 'source/slang/slang-emit-c-like.cpp')
| -rw-r--r-- | source/slang/slang-emit-c-like.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp index c7ea3a09a..872a7a8b2 100644 --- a/source/slang/slang-emit-c-like.cpp +++ b/source/slang/slang-emit-c-like.cpp @@ -2792,6 +2792,8 @@ void CLikeSourceEmitter::emitRegion(Region* inRegion) { auto ifRegion = (IfRegion*) region; + emitIfDecorationsImpl(ifRegion->ifElseInst); + // TODO: consider simplifying the code in // the case where `ifRegion == null` // so that we output `if(!condition) { elseRegion }` @@ -2858,6 +2860,8 @@ void CLikeSourceEmitter::emitRegion(Region* inRegion) { auto switchRegion = (SwitchRegion*) region; + emitSwitchDecorationsImpl(switchRegion->switchInst); + // Emit the start of our statement. m_writer->emit("switch("); emitOperand(switchRegion->getCondition(), getInfo(EmitOp::General)); |
