-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathmatrix_scalar_constructor.test
More file actions
64 lines (55 loc) · 1.24 KB
/
matrix_scalar_constructor.test
File metadata and controls
64 lines (55 loc) · 1.24 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
#--- source.hlsl
RWBuffer<int> In : register(u0);
RWBuffer<int> Out : register(u1);
[numthreads(6,1,1)]
void main(uint GI : SV_GroupIndex) {
int2x3 A = int2x3(In[0], In[1], In[2],
In[3], In[4], In[5]);
const uint COLS = 3; // int2x3 => 2 rows, 3 columns
uint row = GI / COLS; // 0..1
uint col = GI % COLS; // 0..2
Out[GI] = A[row][col];
}
//--- pipeline.yaml
---
Shaders:
- Stage: Compute
Entry: main
DispatchSize: [1, 1, 1]
Buffers:
- Name: In
Format: Int32
Data: [ 1, 2, 3, 4, 5, 6]
- Name: Out
Format: Int32
FillSize: 24
- Name: ExpectedOut
Format: Int32
Data: [ 1, 2, 3, 4, 5, 6 ]
Results:
- Result: Out
Rule: BufferExact
Actual: Out
Expected: ExpectedOut
DescriptorSets:
- Resources:
- Name: In
Kind: RWBuffer
DirectXBinding:
Register: 0
Space: 0
VulkanBinding:
Binding: 0
- Name: Out
Kind: RWBuffer
DirectXBinding:
Register: 1
Space: 0
VulkanBinding:
Binding: 1
...
#--- end
# Bug https://github.com/llvm/offload-test-suite/issues/538
# 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