-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathres-in-struct-simple-one.test
More file actions
68 lines (57 loc) · 1.17 KB
/
res-in-struct-simple-one.test
File metadata and controls
68 lines (57 loc) · 1.17 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
#--- source.hlsl
// This test verifies handling of a simple resource in a struct.
struct A {
RWBuffer<int> Buf;
};
[[vk::binding(5)]]
A a1 : register(u5);
A a2; // will bind to register u0
[numthreads(8, 1, 1)]
void main(uint3 ID : SV_GroupThreadID) {
a2.Buf[ID.x] += a1.Buf[ID.x];
}
//--- pipeline.yaml
---
Shaders:
- Stage: Compute
Entry: main
DispatchSize: [1, 1, 1]
Buffers:
- Name: BufA1
Format: Int32
Data:
[ 1, 2, 3, 4, 5, 6, 7, 8 ]
- Name: BufA2
Format: Int32
Data:
[ 10, 20, 30, 40, 50, 60, 70, 80 ]
- Name: ExpectedBufA2
Format: Int32
Data:
[ 11, 22, 33, 44, 55, 66, 77, 88 ]
Results:
- Result: ExpectedResult
Rule: BufferExact
Actual: BufA2
Expected: ExpectedBufA2
DescriptorSets:
- Resources:
- Name: BufA1
Kind: RWBuffer
DirectXBinding:
Register: 5
Space: 0
VulkanBinding:
Binding: 5
- Name: BufA2
Kind: RWBuffer
DirectXBinding:
Register: 0
Space: 0
VulkanBinding:
Binding: 0
...
#--- end
# 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