@@ -5,14 +5,15 @@ RWStructuredBuffer<uint4> Out : register(u1);
5
5
6
6
[numthreads(1,1,1)]
7
7
void main() {
8
- Out[0].xy = AddUint64(In[0].xy, In[0].xy);
9
- Out[0].zw = AddUint64(In[0].zw, In[0].zw);
10
- Out[1].xy = AddUint64(In[1].xy, In[1].xy);
11
- Out[1].zw = AddUint64(In[1].zw, In[1].zw);
12
- Out[2].xy = AddUint64(In[2].xy, In[2].xy);
13
- Out[2].zw = AddUint64(In[2].zw, In[2].zw);
14
- Out[3] = AddUint64(In[0], In[0]); // vec4 test
15
- Out[4].xy = AddUint64(uint2(1,2), uint2(3,4));
8
+ // vec4
9
+ Out[0] = AddUint64(In[0], In[0]);
10
+ Out[1] = AddUint64(uint4(1, 0, 1, 256), uint4(1, 0, 1, 256));
11
+
12
+ // vec2
13
+ uint4 Tmp = {AddUint64(In[1].xy, In[1].xy), AddUint64(In[1].zw, In[1].zw)};
14
+ Out[2] = Tmp;
15
+ uint4 Tmp2 = {AddUint64(In[2].xy, In[2].xy), AddUint64(In[2].zw, In[2].zw)};
16
+ Out[3] = Tmp2;
16
17
}
17
18
18
19
//--- pipeline.yaml
@@ -27,14 +28,16 @@ Buffers:
27
28
Format: UInt32
28
29
Stride: 16
29
30
Data: [ 1, 0, 1, 256, 10000, 10001, 0x80000000, 1, 0x7fffffff, 0x7fffffff, 0xffffffff, 0x7fffffff ]
31
+ # 1, 0, 1, 256, 10000, 10001, 2147483648, 1, 2147483647, 2147483647, 4294967295, 2147483647
30
32
- Name: Out
31
33
Format: UInt32
32
34
Stride: 16
33
- ZeroInitSize: 80
35
+ ZeroInitSize: 64
34
36
- Name: ExpectedOut # The result we expect
35
37
Format: UInt32
36
38
Stride: 16
37
- Data: [ 2, 0, 2, 512, 20000, 20002, 0, 3, 0xfffffffe, 0xfffffffe, 0xfffffffe, 0xffffffff, 2, 0, 2, 512, 4, 6, 0, 0 ]
39
+ Data: [ 2, 0, 2, 512, 2, 0, 2, 512, 20000, 20002, 0, 3, 0xfffffffe, 0xfffffffe, 0xfffffffe, 0xffffffff ]
40
+ # 2, 0, 2, 512, 2, 0, 2, 512, 20000, 20002, 0, 3, 4294967294, 4294967294, 4294967294, 4294967295
38
41
Results:
39
42
- Result: Test1
40
43
Rule: BufferExact
@@ -59,7 +62,9 @@ DescriptorSets:
59
62
...
60
63
#--- end
61
64
62
- # UNSUPPORTED: Clang-Vulkan
65
+ # https://github.com/llvm/llvm-project/issues/149345
66
+ # XFAIL: Clang-DirectX
67
+
63
68
# RUN: split-file %s %t
64
69
# RUN: %dxc_target -T cs_6_5 -Fo %t.o %t/source.hlsl
65
70
# RUN: %offloader %t/pipeline.yaml %t.o
0 commit comments