-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathres-of-matrix-in-struct.test
More file actions
68 lines (59 loc) · 1.23 KB
/
res-of-matrix-in-struct.test
File metadata and controls
68 lines (59 loc) · 1.23 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 matrix types in RWStructuredBuffer within structs.
struct A {
RWStructuredBuffer<int3x2> Buf;
};
A a1;
A a2;
[numthreads(1,1,1)]
void main() {
int3x2 m = a1.Buf[0];
a2.Buf[0] = m * 2;
}
//--- pipeline.yaml
---
Shaders:
- Stage: Compute
Entry: main
DispatchSize: [1, 1, 1]
Buffers:
- Name: BufA1
Format: Int32
Stride: 24
Data: [ 1, 2, 3, 4, 5, 6 ]
- Name: BufA2
Format: Int32
Stride: 24
FillSize: 24
- Name: ExpectedBufA2
Format: Int32
Stride: 24
Data: [ 2, 4, 6, 8, 10, 12 ]
Results:
- Result: ExpectedResultA
Rule: BufferExact
Actual: BufA2
Expected: ExpectedBufA2
DescriptorSets:
- Resources:
- Name: BufA1
Kind: RWStructuredBuffer
DirectXBinding:
Register: 0
Space: 0
VulkanBinding:
Binding: 0
- Name: BufA2
Kind: RWStructuredBuffer
DirectXBinding:
Register: 1
Space: 0
VulkanBinding:
Binding: 1
...
#--- end
# Unimplemented https://github.com/microsoft/DirectXShaderCompiler/issues/8302
# XFAIL: Vulkan && DXC
# 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