diff options
| author | Anders Leino <aleino@nvidia.com> | 2025-01-17 07:23:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-16 21:23:31 -0800 |
| commit | dfb369e87dd7638e84efe8feb9e7069e5238b44c (patch) | |
| tree | ec1d8ffb4b295cd5c0d1a042255e77ecd9ae8ce7 /source/slang | |
| parent | 1b7c242bc9ebf649708836f5ed03363f5f0e3969 (diff) | |
Move global variable initialization into entry points for WGSL (#6106)
* Add test that reproduces the issue in #5986
* Call moveGlobalVarInitializationToEntryPoints for WGSL as well
This closes #5986.
---------
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/slang')
| -rw-r--r-- | source/slang/slang-emit.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp index 176cd0558..4fee5c440 100644 --- a/source/slang/slang-emit.cpp +++ b/source/slang/slang-emit.cpp @@ -1471,6 +1471,7 @@ Result linkAndOptimizeIR( default: break; case CodeGenTarget::GLSL: + case CodeGenTarget::WGSL: moveGlobalVarInitializationToEntryPoints(irModule); break; // For SPIR-V to SROA across 2 entry-points a value must not be a global |
