From c15e7ade4e27e1649d5b98f5854e9e52bb9e60ae Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 2 Feb 2024 22:04:40 -0800 Subject: 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. --- source/slang/slang-emit-glsl.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source/slang/slang-emit-glsl.cpp') 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(inst); + if (!func) + return; + auto block = func->getFirstBlock(); + if (!block) + return; + for (auto childInst : block->getChildren()) + { + if (auto requireGLSLExt = as(childInst)) + { + _requireGLSLExtension(requireGLSLExt->getExtensionName()); + } + } } static Index _getGLSLVersion(ProfileVersion profile) -- cgit v1.2.3