-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathres-in-struct-simple-array.test
More file actions
78 lines (66 loc) · 1.36 KB
/
res-in-struct-simple-array.test
File metadata and controls
78 lines (66 loc) · 1.36 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
// This test verifies handling of a resource array in a struct.
struct B {
RWBuffer<int> Bufs[2];
};
[[vk::binding(3)]]
B b1 : register(u3);
B b2;
[numthreads(4,1,1)]
void main(uint3 ID : SV_GroupThreadID) {
int x = b1.Bufs[0][ID.x];
int y = b1.Bufs[1][ID.x];
b2.Bufs[0][ID.x] = x + y;
b2.Bufs[1][ID.x] = x * y;
}
//--- pipeline.yaml
---
Shaders:
- Stage: Compute
Entry: main
DispatchSize: [1, 1, 1]
Buffers:
- Name: BufB1
Format: Int32
ArraySize: 2
Data:
- [ 1, 2, 3, 4 ]
- [ 10, 20, 30, 40 ]
- Name: BufB2
Format: Int32
ArraySize: 2
FillSize: 16
- Name: ExpectedBufB2
Format: Int32
ArraySize: 2
Data:
- [ 11, 22, 33, 44 ]
- [ 10, 40, 90, 160 ]
Results:
- Result: ExpectedResult
Rule: BufferExact
Actual: BufB2
Expected: ExpectedBufB2
DescriptorSets:
- Resources:
- Name: BufB1
Kind: RWBuffer
DirectXBinding:
Register: 3
Space: 0
VulkanBinding:
Binding: 3
- Name: BufB2
Kind: RWBuffer
DirectXBinding:
Register: 0
Space: 0
VulkanBinding:
Binding: 0
...
#--- end
# Unimplemented https://github.com/llvm/offload-test-suite/issues/305
# XFAIL: Metal
# RUN: split-file %s %t
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl
# RUN: %offloader %t/pipeline.yaml %t.o