diff options
| author | Yong He <yonghe@outlook.com> | 2024-02-02 22:04:40 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-02 22:04:40 -0800 |
| commit | c15e7ade4e27e1649d5b98f5854e9e52bb9e60ae (patch) | |
| tree | 22082fda85b2b25eec36da8c4505de7b6cb987fc /source/slang/slang-emit-glsl.cpp | |
| parent | a67cb0609587c230746b52567ff5775cab215220 (diff) | |
Atomics+Wave ops intrinsics fixes. (#3542)
* Fix atomics intrinsics, increase kMaxDescriptorSets.
* Add SPIRVASM to known non-differentiable insts.
* Support fp16 wave ops when targeting glsl.
* Fixes.
* Fix vk validation errors.
* Fix.
* Add to allowed failures.
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) |
