-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathlocal_resource_array_dynamic_index.test
More file actions
74 lines (64 loc) · 1.59 KB
/
local_resource_array_dynamic_index.test
File metadata and controls
74 lines (64 loc) · 1.59 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
#--- source.hlsl
// Test that a local resource array can be dynamically indexed at runtime.
RWByteAddressBuffer gBufArray[4] : register(u0);
[numthreads(1,1,1)]
void main(uint3 tid : SV_DispatchThreadID) {
RWByteAddressBuffer arr[2];
arr[0] = gBufArray[0];
arr[1] = gBufArray[1];
arr[tid.x & 1].Store(0, 42);
}
//--- pipeline.yaml
---
Shaders:
- Stage: Compute
Entry: main
DispatchSize: [1, 1, 1]
Buffers:
- Name: gBufArray
Format: Int32
Stride: 4
ArraySize: 4
Data:
- [0]
- [0]
- [0]
- [0]
- Name: ExpectedBufArray
Format: Int32
Stride: 4
ArraySize: 4
Data:
- [42]
- [0]
- [0]
- [0]
Results:
- Result: BufCheck
Rule: BufferExact
Actual: gBufArray
Expected: ExpectedBufArray
DescriptorSets:
- Resources:
- Name: gBufArray
Kind: RWByteAddressBuffer
DirectXBinding:
Register: 0
Space: 0
VulkanBinding:
Binding: 0
...
#--- end
# Bug: https://github.com/llvm/offload-test-suite/issues/305
# UNSUPPORTED: Metal
# Bug: https://github.com/llvm/llvm-project/issues/192523
# XFAIL: Clang && Vulkan
# Bug: https://github.com/llvm/llvm-project/issues/192538
# Metal is included because it uses the DXIL backend (Metal IR Converter takes
# DXIL as input), so it hits the same DXILLegalizePass assertion as DirectX.
# XFAIL: Clang && (DirectX || Metal)
# Bug: https://github.com/microsoft/DirectXShaderCompiler/issues/8379
# XFAIL: DXC && Vulkan
# 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