summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir-legalize-global-values.cpp
Commit message (Collapse)AuthorAge
* Inline global constants for shader style CPU targets (#8686)Julius Ikkala2025-10-16
| | | | | | | On the shader-host-callable target, test `gh-4874.slang` generates IR that contains global constants referencing global params. These need to get inlined into functions, as otherwise `introduceExplicitGlobalContext()` will fail with "no outer func at use site for global", making the test crash the compiler.
* extend fiddle to allow custom lua splices in more places (#7559)Ellie Hermaszewska2025-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add fkYAML submodule * Generate slang-ir-inst-defs.h from slang-ir-inst-defs.yaml * generate ir-inst-defs.h * neaten things * neaten inst def parser * add rapidyaml submodule * remove fkyaml * remove fkyaml submodule * remove use of ir-inst-defs.h * format and warnings * fix wasm build * tidy * remove rapidyaml * Extend fiddle to allow custom splices in more places * Use lua to describe ir insts * fix * neaten * neaten * neaten * spelling * neaten * comment comment out assert * merge
* Inline global constants that contains opaque handles for legalization. (#6098)Yong He2025-01-15
| | | | | | | | | * Inline global constants that contains opaque handles for legalization. * Add diagnostics on opaque type global variables. * Fix. * Fix test.
* WGSL: Fix issue where global calls are generated (#5768)Anders Leino2024-12-12
* Split out SPIR-V -specific legalization of global functions This is a refactoring and should not affect generated code. * Move global inst inlining code into separate function This is a refactoring and should not affect generated code. * Take SPIR-V -specific parts out of GlobalInstInliningContext This is a refactoring and should not affect generated code. * Move 'inlineGlobalValues' to generic inlining context This is a refactoring and should not affect generated code. * Move 'setInsertBeforeOutsideASM' to generic inlining context This is a refactoring and should not affect generated code. * Move generic inlining context into own file This is a refactoring and should not affect generated code. * Run global inlining for WGSL as well * Make the 'getOutsideASM' function generic as well * Enable language-feature/constants/static-const-in-generic-interface.slang for WebGPU * Clarify when it's safe to remove and deallocate an IRInst * Remove globals if they're left unused after inlining This closes #5607. * Handle IRGlobalValueRef in C-like emitter * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>