From 9c82ed36946941eb1df3186f00903593aab556c3 Mon Sep 17 00:00:00 2001 From: Anders Leino Date: Thu, 12 Dec 2024 20:09:18 +0200 Subject: WGSL: Fix issue where global calls are generated (#5768) * 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> --- tests/expected-failure-github.txt | 1 - 1 file changed, 1 deletion(-) (limited to 'tests/expected-failure-github.txt') diff --git a/tests/expected-failure-github.txt b/tests/expected-failure-github.txt index 81a61133b..b9b1e4b39 100644 --- a/tests/expected-failure-github.txt +++ b/tests/expected-failure-github.txt @@ -12,5 +12,4 @@ tests/autodiff/custom-intrinsic.slang.2 syn (wgpu) tests/bugs/buffer-swizzle-store.slang.3 syn (wgpu) tests/compute/interface-shader-param-in-struct.slang.4 syn (wgpu) tests/compute/interface-shader-param.slang.5 syn (wgpu) -tests/language-feature/constants/static-const-in-generic-interface.slang.1 syn (wgpu) tests/language-feature/shader-params/interface-shader-param-ordinary.slang.4 syn (wgpu) -- cgit v1.2.3