diff options
Diffstat (limited to 'source/slang/slang-emit-glsl.cpp')
| -rw-r--r-- | source/slang/slang-emit-glsl.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/slang/slang-emit-glsl.cpp b/source/slang/slang-emit-glsl.cpp index 3d3f9687e..a0151133d 100644 --- a/source/slang/slang-emit-glsl.cpp +++ b/source/slang/slang-emit-glsl.cpp @@ -2114,6 +2114,21 @@ void GLSLSourceEmitter::handleRequiredCapabilitiesImpl(IRInst* inst) } } + + // The function may have IRRequireGLSLExtensionInst in its body. We also need to look for them. + auto func = as<IRFunc>(inst); + if (!func) + return; + auto block = func->getFirstBlock(); + if (!block) + return; + for (auto childInst : block->getChildren()) + { + if (auto requireGLSLExt = as<IRRequireGLSLExtension>(childInst)) + { + _requireGLSLExtension(requireGLSLExt->getExtensionName()); + } + } } static Index _getGLSLVersion(ProfileVersion profile) |
