diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2024-07-05 15:05:52 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-05 15:05:52 +0800 |
| commit | 40a4022670c9b6a53c31ba4841eaf744d6402bf2 (patch) | |
| tree | 0ab5e9b4412a88600a9e3b1b7c93fa308612b55a /tests | |
| parent | 42a9fce6dacae9d8ce94283337b215d3bdead388 (diff) | |
Add specializations for 1 vectors in functions using the $N glsl intrinsic placement (#4534)
Closes #4533
Fixes part of #4531
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/bugs/gh-4533.slang | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/bugs/gh-4533.slang b/tests/bugs/gh-4533.slang new file mode 100644 index 000000000..3ee27996b --- /dev/null +++ b/tests/bugs/gh-4533.slang @@ -0,0 +1,20 @@ +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-mtl +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cuda + +// CHECK: 0 +// CHECK-NEXT: 1 +// CHECK-NEXT: 1 +// CHECK-NEXT: 1 + +//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer +RWStructuredBuffer<uint> outputBuffer; + +[numthreads(4, 1, 1)] +void computeMain(uint tid : SV_GroupIndex) +{ + vector<float,1> k = float1(tid); + outputBuffer[tid] = all(k) && any(k) && bool(asint(k)) && bool(asuint(k)); +} |
