Skip to content

Commit 81a16a0

Browse files
authored
[Vulkan] Remove XFAILs for counter tests (#467)
Counter variable in Clang when targeting Vulkan is now implemented. See llvm/llvm-project#137032. This removes the XFAIL from tests that are now passing. Note that inc_counter_array.test is still failing, but for a different resson. A new bug was opened to address that issue. However, a new test is added to test counter arrays.
1 parent 2178963 commit 81a16a0

File tree

5 files changed

+75
-14
lines changed

5 files changed

+75
-14
lines changed

test/Feature/StructuredBuffer/dec_counter.test

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ DescriptorSets:
3434
...
3535
#--- end
3636

37-
# Unimplemented https://github.com/llvm/llvm-project/issues/137032
38-
# XFAIL: Clang && Vulkan
39-
4037
# Offload tests are missing support for counters on Metal
4138
# Unimplemented https://github.com/llvm/offload-test-suite/issues/304
4239
# XFAIL: Metal

test/Feature/StructuredBuffer/inc_counter.test

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ DescriptorSets:
3434
...
3535
#--- end
3636

37-
# Unimplemented https://github.com/llvm/llvm-project/issues/137032
38-
# XFAIL: Clang && Vulkan
39-
4037
# Offload tests are missing support for counters on Metal
4138
# Unimplemented https://github.com/llvm/offload-test-suite/issues/304
4239
# XFAIL: Metal

test/Feature/StructuredBuffer/inc_counter_array.test

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ DescriptorSets:
4040
...
4141
#--- end
4242

43-
# Unimplemented https://github.com/llvm/llvm-project/issues/137032
43+
# Bug https://github.com/llvm/llvm-project/issues/162841
4444
# XFAIL: Clang && Vulkan
4545

4646
# Offload tests are missing support for counters and resource arrays on Metal
@@ -62,7 +62,7 @@ DescriptorSets:
6262
# CHECK: Name: Out
6363
# CHECK: Counters: [ 1, 2, 3, 4 ]
6464
# CHECK: Data:
65-
- [ 0x0 ]
66-
- [ 0x1 ]
67-
- [ 0x2 ]
68-
- [ 0x3 ]
65+
# CHECK-NEXT: - [ 0x0 ]
66+
# CHECK-NEXT: - [ 0x1 ]
67+
# CHECK-NEXT: - [ 0x2 ]
68+
# CHECK-NEXT: - [ 0x3 ]
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#--- source.hlsl
2+
3+
// This test verifies handling of resource arrays when the
4+
// resource type has a counter.
5+
6+
RWStructuredBuffer<int> Out[4] : register(u0);
7+
8+
[numthreads(4,1,1)]
9+
void main(uint GI : SV_GroupIndex) {
10+
Out[0].IncrementCounter();
11+
12+
Out[1].IncrementCounter();
13+
Out[1].IncrementCounter();
14+
15+
Out[2].IncrementCounter();
16+
Out[2].IncrementCounter();
17+
Out[2].IncrementCounter();
18+
19+
Out[3].IncrementCounter();
20+
Out[3].IncrementCounter();
21+
Out[3].IncrementCounter();
22+
Out[3].IncrementCounter();
23+
}
24+
25+
//--- pipeline.yaml
26+
---
27+
Shaders:
28+
- Stage: Compute
29+
Entry: main
30+
DispatchSize: [1, 1, 1]
31+
Buffers:
32+
- Name: Out
33+
Format: Hex32
34+
Stride: 4
35+
ArraySize: 4
36+
ZeroInitSize: 4
37+
38+
DescriptorSets:
39+
- Resources:
40+
- Name: Out
41+
Kind: RWStructuredBuffer
42+
HasCounter: true
43+
DirectXBinding:
44+
Register: 0
45+
Space: 0
46+
VulkanBinding:
47+
Binding: 0
48+
CounterBinding: 1
49+
...
50+
#--- end
51+
52+
# Offload tests are missing support for counters and resource arrays on Metal
53+
# Unimplemented https://github.com/llvm/offload-test-suite/issues/304
54+
# Unimplemented https://github.com/llvm/offload-test-suite/issues/305
55+
# XFAIL: Metal
56+
57+
# RUN: split-file %s %t
58+
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl
59+
# RUN: %offloader %t/pipeline.yaml %t.o | FileCheck %s %if DirectX %{ --check-prefixes=CHECK,DX-CHECK %}
60+
61+
# DX-CHECK: Creating UAV: { Size = 4100, Register = u0, Space = 0, HasCounter = 1 }
62+
# DX-CHECK: UAV: HeapIdx = 0 EltSize = 4 NumElts = 1 HasCounter = 1
63+
64+
# CHECK: Name: Out
65+
# CHECK: Counters: [ 4, 8, 12, 16 ]
66+
# CHECK: Data:
67+
# CHECK-NEXT: - [ 0x0 ]
68+
# CHECK-NEXT: - [ 0x0 ]
69+
# CHECK-NEXT: - [ 0x0 ]
70+
# CHECK-NEXT: - [ 0x0 ]

test/Tools/Offloader/missing-counter-binding.test

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ DescriptorSets:
3131
...
3232
#--- end
3333

34-
# Unimplemented https://github.com/llvm/llvm-project/issues/137032
35-
# XFAIL: Clang && Vulkan
36-
3734
# REQUIRES: Vulkan
3835
# RUN: split-file %s %t
3936
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl

0 commit comments

Comments
 (0)