-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathBufferFormats.test
More file actions
155 lines (151 loc) · 3.07 KB
/
BufferFormats.test
File metadata and controls
155 lines (151 loc) · 3.07 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#--- source.hlsl
Buffer<int4> In0 : register(t0);
RWBuffer<int4> Out0 : register(u1);
StructuredBuffer<int4> In1 : register(t2);
RWStructuredBuffer<int4> Out1 : register(u3);
Buffer<float4> In2 : register(t4);
RWBuffer<float4> Out2 : register(u5);
StructuredBuffer<float4> In3 : register(t6);
RWStructuredBuffer<float4> Out3 : register(u7);
[numthreads(1,1,1)]
void main() {
Out0[0] = In0[0];
Out1[0] = In1[0];
Out2[0] = In2[0];
Out3[0] = In3[0];
}
//--- pipeline.yaml
---
Shaders:
- Stage: Compute
Entry: main
DispatchSize: [1, 1, 1]
Buffers:
- Name: In0
Format: Int32
Channels: 4
Data: [ 1, 2, 3, 4 ]
- Name: Out0
Format: Int32
Channels: 4
FillSize: 16
- Name: ExpectedOut0
Format: Int32
Channels: 4
Data: [ 1, 2, 3, 4 ]
- Name: In1
Format: Int32
Channels: 4
Data: [ 1, 2, 3, 4 ]
- Name: Out1
Format: Int32
Channels: 4
FillSize: 16
- Name: ExpectedOut1
Format: Int32
Channels: 4
Data: [ 1, 2, 3, 4 ]
- Name: In2
Format: Float32
Channels: 4
Data: [ 1.0, 2.0, 3.0, 4.0 ]
- Name: Out2
Format: Float32
Channels: 4
FillSize: 16
- Name: ExpectedOut2
Format: Float32
Channels: 4
Data: [ 1.0, 2.0, 3.0, 4.0 ]
- Name: In3
Format: Float32
Channels: 4
Data: [ 1.0, 2.0, 3.0, 4.0 ]
- Name: Out3
Format: Float32
Channels: 4
FillSize: 16
- Name: ExpectedOut3
Format: Float32
Channels: 4
Data: [ 1.0, 2.0, 3.0, 4.0 ]
Results:
- Result: Test0
Rule: BufferExact
Actual: Out0
Expected: ExpectedOut0
- Result: Test1
Rule: BufferExact
Actual: Out1
Expected: ExpectedOut1
- Result: Test2
Rule: BufferExact
Actual: Out2
Expected: ExpectedOut2
- Result: Test3
Rule: BufferExact
Actual: Out3
Expected: ExpectedOut3
DescriptorSets:
- Resources:
- Name: In0
Kind: Buffer
DirectXBinding:
Register: 0
Space: 0
VulkanBinding:
Binding: 0
- Name: Out0
Kind: RWBuffer
DirectXBinding:
Register: 1
Space: 0
VulkanBinding:
Binding: 1
- Name: In1
Kind: StructuredBuffer
DirectXBinding:
Register: 2
Space: 0
VulkanBinding:
Binding: 2
- Name: Out1
Kind: RWStructuredBuffer
DirectXBinding:
Register: 3
Space: 0
VulkanBinding:
Binding: 3
- Name: In2
Kind: Buffer
DirectXBinding:
Register: 4
Space: 0
VulkanBinding:
Binding: 4
- Name: Out2
Kind: RWBuffer
DirectXBinding:
Register: 5
Space: 0
VulkanBinding:
Binding: 5
- Name: In3
Kind: StructuredBuffer
DirectXBinding:
Register: 6
Space: 0
VulkanBinding:
Binding: 6
- Name: Out3
Kind: RWStructuredBuffer
DirectXBinding:
Register: 7
Space: 0
VulkanBinding:
Binding: 7
...
#--- end
# RUN: split-file %s %t
# RUN: %dxc_target -T cs_6_5 -Fo %t.o %t/source.hlsl
# RUN: %offloader --validation-layer %t/pipeline.yaml %t.o