-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathSparseByteAddressBuffer.test
More file actions
78 lines (67 loc) · 1.5 KB
/
SparseByteAddressBuffer.test
File metadata and controls
78 lines (67 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#--- source.hlsl
RWByteAddressBuffer X : register(u0);
RWStructuredBuffer<int> Out : register(u1);
[numthreads(1,1,1)]
void main() {
// Index 0: Offset 0.
Out[0] = X.Load(0);
// Offset 128000: Second tile.
Out[1] = X.Load(128000);
}
//--- pipeline.yaml
---
Shaders:
- Stage: Compute
Entry: main
DispatchSize: [1, 1, 1]
Buffers:
- Name: X
Format: Int32
Stride: 4
FillSize: 131072
FillValue: 9001
- Name: Out
Format: Int32
Stride: 4
FillSize: 8
FillValue: 0
- Name: ExpectedOut
Format: Int32
Stride: 4
Data: [9001, 0]
Results:
- Result: Test
Rule: BufferExact
Actual: Out
Expected: ExpectedOut
DescriptorSets:
- Resources:
- Name: X
Kind: RWByteAddressBuffer
IsReserved: true
DirectXBinding:
Register: 0
Space: 0
VulkanBinding:
Binding: 0
TilesMapped: 1
- Name: Out
Kind: RWStructuredBuffer
DirectXBinding:
Register: 1
Space: 0
VulkanBinding:
Binding: 1
#--- end
# REQUIRES: !Vulkan || sparseBinding
# REQUIRES: !Vulkan || sparseResidencyBuffer
# XFAIL: Vulkan && Clang
# Unimplemented: https://github.com/llvm/offload-test-suite/issues/515
# XFAIL: Metal
# RUN: split-file %s %t
# RUN: %dxc_target -T cs_6_5 -Fo %t.o %t/source.hlsl
# RUN: %offloader %t/pipeline.yaml %t.o | FileCheck %s
# CHECK: - Name: Out
# CHECK-NEXT: Format: Int32
# CHECK-NEXT: Stride: 4
# CHECK-NEXT: Data: [ 9001, 0 ]