diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-03-25 16:45:56 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-25 16:45:56 -0400 |
| commit | b3e6f1b2cffa8def593e97a00576eeba0f947ebc (patch) | |
| tree | f953b64922bb3fe69ef1ac26bef0eda2741626d3 /source/slang/slang-emit-hlsl.cpp | |
| parent | 28a0ca96a1ad2a3f0e09cc97b866f3b6338a09fa (diff) | |
Unroll target improvements (#1291)
* Add unroll support for CUDA, and preliminary for C++.
Document [unroll] support.
* Fix loop-unroll to run on CPU, and test on CPU and elsewhere.
Fix bug in emitting loop unroll condition.
* Improved comment.
* Added support for vk/glsl loop unrolling.
Diffstat (limited to 'source/slang/slang-emit-hlsl.cpp')
| -rw-r--r-- | source/slang/slang-emit-hlsl.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/slang-emit-hlsl.cpp b/source/slang/slang-emit-hlsl.cpp index a0e6e872d..489e17c8e 100644 --- a/source/slang/slang-emit-hlsl.cpp +++ b/source/slang/slang-emit-hlsl.cpp @@ -504,6 +504,14 @@ void HLSLSourceEmitter::emitVectorTypeNameImpl(IRType* elementType, IRIntegerVal m_writer->emit(">"); } +void HLSLSourceEmitter::emitLoopControlDecorationImpl(IRLoopControlDecoration* decl) +{ + if (decl->getMode() == kIRLoopControl_Unroll) + { + m_writer->emit("[unroll]\n"); + } +} + void HLSLSourceEmitter::emitSimpleValueImpl(IRInst* inst) { switch (inst->op) |
