diff options
| author | Julius Ikkala <julius.ikkala@gmail.com> | 2025-10-16 21:53:10 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-16 18:53:10 +0000 |
| commit | 537697d3aa21b418c348b1017005603668b6a4cb (patch) | |
| tree | 4ad71cfe4ab2c51f2071d8171ba7bd98929a776a /tests | |
| parent | 0257cb001b6f5c31e4ac0435d546fe638a17c48a (diff) | |
Inline global constants for shader style CPU targets (#8686)
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.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/bugs/gh-4874.slang | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/bugs/gh-4874.slang b/tests/bugs/gh-4874.slang index 403f6fc50..53a2aaf38 100644 --- a/tests/bugs/gh-4874.slang +++ b/tests/bugs/gh-4874.slang @@ -6,6 +6,7 @@ // //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -shaderobj //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -shaderobj -vk +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -shaderobj -cpu // //TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer RWStructuredBuffer<uint> outputBuffer; @@ -47,4 +48,4 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) // CHECK: 432 // CHECK: 543 // CHECK: 654 -}
\ No newline at end of file +} |
