summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-emit-c-like.cpp
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2025-01-29 07:55:39 +0800
committerGitHub <noreply@github.com>2025-01-28 15:55:39 -0800
commitc356d3ac2956671b6cb7af667d8b35c7ba8b75a7 (patch)
tree5a9ceaebad7f199588659de19440729119288b0d /source/slang/slang-emit-c-like.cpp
parenta5b1aa08e05eb4b24b28b60a1cd10875353a9a92 (diff)
Allow requiring glsl language extensions on structs (#6173)
* Allow requiring glsl language extensions on structs * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/slang/slang-emit-c-like.cpp')
-rw-r--r--source/slang/slang-emit-c-like.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp
index 98bddad9b..180ef9909 100644
--- a/source/slang/slang-emit-c-like.cpp
+++ b/source/slang/slang-emit-c-like.cpp
@@ -3722,10 +3722,6 @@ void CLikeSourceEmitter::emitSimpleFuncImpl(IRFunc* func)
emitEntryPointAttributes(func, entryPointDecor);
}
- // Deal with required features/capabilities of the function
- //
- handleRequiredCapabilitiesImpl(func);
-
emitFunctionPreambleImpl(func);
emitFuncDecorations(func);
@@ -4885,6 +4881,10 @@ void CLikeSourceEmitter::emitGlobalInstImpl(IRInst* inst)
{
m_writer->advanceToSourceLocation(inst->sourceLoc);
+ // Deal with required features/capabilities of the global inst
+ //
+ handleRequiredCapabilitiesImpl(inst);
+
switch (inst->getOp())
{
case kIROp_GlobalHashedStringLiterals: