diff options
| author | Yong He <yonghe@outlook.com> | 2020-06-05 13:00:32 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-05 13:00:32 -0700 |
| commit | e3e1cf2045f14837cfecb14e252c0e1083787b93 (patch) | |
| tree | 070f9a3a27796d6edf4f905a3bfbd43a73f06338 /source/slang/slang-lower-to-ir.cpp | |
| parent | 3bb780724830ae830657a47e4eba008a4c0f4ff7 (diff) | |
| parent | 00db8212b3266dfc6f3b1fba2d0f1f0c6fe5ec95 (diff) | |
Merge pull request #1371 from csyonghe/loop_attrib
Emit [loop] attribute to output HLSL.
Diffstat (limited to 'source/slang/slang-lower-to-ir.cpp')
| -rw-r--r-- | source/slang/slang-lower-to-ir.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp index c52025244..ecec6f2ec 100644 --- a/source/slang/slang-lower-to-ir.cpp +++ b/source/slang/slang-lower-to-ir.cpp @@ -3353,6 +3353,10 @@ struct StmtLoweringVisitor : StmtVisitor<StmtLoweringVisitor> { getBuilder()->addLoopControlDecoration(inst, kIRLoopControl_Unroll); } + else if( stmt->findModifier<LoopAttribute>() ) + { + getBuilder()->addLoopControlDecoration(inst, kIRLoopControl_Loop); + } // TODO: handle other cases here } |
