forked from llvm/offload-test-suite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTexture2D.SRVToUAV.array.test.yaml
More file actions
95 lines (90 loc) · 1.94 KB
/
Copy pathTexture2D.SRVToUAV.array.test.yaml
File metadata and controls
95 lines (90 loc) · 1.94 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
#--- source.hlsl
// This test verifies handling of texture arrays
Texture2D<float4> In[2] : register(t0);
RWTexture2D<float4> Out[2] : register(u1);
[numthreads(4,1,1)]
void main(uint GI : SV_GroupIndex) {
for (int i = 0; i < 2; i++) {
uint2 GID = {GI / 2, GI % 2};
float4 Color = In[i][GID.xy];
Out[i][GID.xy] = Color.bgra;
}
}
//--- pipeline.yaml
---
Shaders:
- Stage: Compute
Entry: main
Buffers:
- Name: In
Format: Float32
Channels: 4
ArraySize: 2
Data:
- [1.0, 0.0, 0.0, 1.0,
0.0, 1.0, 0.0, 1.0,
0.0, 0.0, 1.0, 1.0,
1.0, 1.0, 0.0, 1.0]
- [2.0, 0.0, 0.0, 2.0,
0.0, 2.0, 0.0, 2.0,
0.0, 0.0, 2.0, 2.0,
2.0, 2.0, 0.0, 2.0]
OutputProps:
Height: 2
Width: 2
Depth: 1
- Name: Out
Format: Float32
Channels: 4
FillSize: 64
ArraySize: 2
OutputProps:
Height: 2
Width: 2
Depth: 1
- Name: ExpectedOut
Format: Float32
Channels: 4
ArraySize: 2
Data:
- [0.0, 0.0, 1.0, 1.0,
0.0, 1.0, 0.0, 1.0,
1.0, 0.0, 0.0, 1.0,
0.0, 1.0, 1.0, 1.0]
- [0.0, 0.0, 2.0, 2.0,
0.0, 2.0, 0.0, 2.0,
2.0, 0.0, 0.0, 2.0,
0.0, 2.0, 2.0, 2.0]
OutputProps:
Height: 2
Width: 2
Depth: 1
Results:
- Result: Test1
Rule: BufferExact
Actual: Out
Expected: ExpectedOut
DescriptorSets:
- Resources:
- Name: In
Kind: Texture2D
DirectXBinding:
Register: 0
Space: 0
VulkanBinding:
Binding: 0
- Name: Out
Kind: RWTexture2D
DirectXBinding:
Register: 1
Space: 0
VulkanBinding:
Binding: 1
...
#--- end
# Resource arrays are not yet implemented in Clang:
# Unimplemented https://github.com/llvm/llvm-project/issues/133835
# XFAIL: Clang
# 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