diff options
| author | Yong He <yonghe@outlook.com> | 2020-06-13 00:24:21 -0700 |
|---|---|---|
| committer | Yong He <yonghe@outlook.com> | 2020-06-13 00:25:12 -0700 |
| commit | 04a81ab634ce058168f7e1554274bbeb34f3a3c5 (patch) | |
| tree | c23033182cf462e18bf0cfecd3a449e1fed64ae9 /source | |
| parent | 36a06f1289c9a68a261920ef5d34f075f2a43219 (diff) | |
Emit [[dont_unroll]] attribute in GLSL
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-emit-glsl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/slang/slang-emit-glsl.cpp b/source/slang/slang-emit-glsl.cpp index a41004622..a73ea529a 100644 --- a/source/slang/slang-emit-glsl.cpp +++ b/source/slang/slang-emit-glsl.cpp @@ -706,6 +706,11 @@ void GLSLSourceEmitter::emitLoopControlDecorationImpl(IRLoopControlDecoration* d m_glslExtensionTracker->requireExtension(UnownedStringSlice::fromLiteral("GL_EXT_control_flow_attributes")); m_writer->emit("[[unroll]]\n"); } + else if (decl->getMode() == kIRLoopControl_Loop) + { + m_glslExtensionTracker->requireExtension(UnownedStringSlice::fromLiteral("GL_EXT_control_flow_attributes")); + m_writer->emit("[[dont_unroll]]\n"); + } } void GLSLSourceEmitter::emitSimpleValueImpl(IRInst* inst) |
