summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAnders Leino <aleino@nvidia.com>2024-12-12 20:09:18 +0200
committerGitHub <noreply@github.com>2024-12-12 10:09:18 -0800
commit9c82ed36946941eb1df3186f00903593aab556c3 (patch)
tree4be0ad358c7c877282aafbcca56ce72a65a66dc9 /tests
parent79dc7ef6992c761ad3bbb4d8a19f4d515d7b3d78 (diff)
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/expected-failure-github.txt1
-rw-r--r--tests/language-feature/constants/static-const-in-generic-interface.slang2
2 files changed, 0 insertions, 3 deletions
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)
diff --git a/tests/language-feature/constants/static-const-in-generic-interface.slang b/tests/language-feature/constants/static-const-in-generic-interface.slang
index e980a812a..87d8e3be8 100644
--- a/tests/language-feature/constants/static-const-in-generic-interface.slang
+++ b/tests/language-feature/constants/static-const-in-generic-interface.slang
@@ -1,8 +1,6 @@
// static-const-in-generic-interface.slang
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -shaderobj
-// WGSL: Functions cannot be called at module scope #5607
-//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
// Test that `static const` variable declarations inside of
// a generic `interface` type correctly translate to interface requirements.