-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathAdjacent-Partial-Writes.yaml
More file actions
74 lines (65 loc) · 1.75 KB
/
Adjacent-Partial-Writes.yaml
File metadata and controls
74 lines (65 loc) · 1.75 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
StructuredBuffer<int64_t4> InInt : register(t0);
RWStructuredBuffer<uint4> OutInt : register(u1);
[numthreads(1,1,1)]
void main() {
// Int
OutInt[0] = countbits(InInt[0]);
OutInt[1].xyz = countbits(InInt[0].xyz);
OutInt[1].w = countbits(InInt[0].w);
OutInt[2].xy = countbits(InInt[0].xy);
}
//--- pipeline.yaml
---
Shaders:
- Stage: Compute
Entry: main
DispatchSize: [1, 1, 1]
Buffers:
- Name: InInt
Format: Int64
Stride: 32
Data: [0x2A, 0, 0x0f0f0f0f0f0f0f0f, -1]
- Name: OutInt
Format: UInt32
Stride: 16
Data: [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112]
- Name: ExpectedOut # The result we expect
Format: UInt32
Stride: 16
Data: [3, 0, 32, 64, 3, 0, 32, 64, 3, 0, 111, 112]
Results:
- Result: Test1
Rule: BufferExact
Actual: OutInt
Expected: ExpectedOut
DescriptorSets:
- Resources:
- Name: InInt
Kind: StructuredBuffer
DirectXBinding:
Register: 0
Space: 0
VulkanBinding:
Binding: 0
- Name: OutInt
Kind: RWStructuredBuffer
DirectXBinding:
Register: 1
Space: 0
VulkanBinding:
Binding: 1
...
#--- end
# REQUIRES: Int64
# When compiled with DXC this test encounters a memory coherence issue on Intel
# UHD drivers. This issue does not reproduce when compiled with Clang because
# LLVM's load-store optimization performs correct optimizations that hide the
# problem.
# Bug https://github.com/llvm/offload-test-suite/issues/226
# https://github.com/microsoft/DirectXShaderCompiler/issues/7494
# https://github.com/llvm/llvm-project/issues/142677
# UNSUPPORTED: Vulkan
# RUN: split-file %s %t
# RUN: %dxc_target -T cs_6_5 -Fo %t.o %t/source.hlsl
# RUN: %offloader %t/pipeline.yaml %t.o