Skip to content

Commit 5db9c09

Browse files
committed
finish tests
1 parent 63ebf4d commit 5db9c09

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

test/Feature/HLSLLib/adduint64.test

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ RWStructuredBuffer<uint4> Out : register(u1);
55

66
[numthreads(1,1,1)]
77
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;
1617
}
1718

1819
//--- pipeline.yaml
@@ -27,14 +28,16 @@ Buffers:
2728
Format: UInt32
2829
Stride: 16
2930
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
3032
- Name: Out
3133
Format: UInt32
3234
Stride: 16
33-
ZeroInitSize: 80
35+
ZeroInitSize: 64
3436
- Name: ExpectedOut # The result we expect
3537
Format: UInt32
3638
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
3841
Results:
3942
- Result: Test1
4043
Rule: BufferExact
@@ -59,7 +62,9 @@ DescriptorSets:
5962
...
6063
#--- end
6164

62-
# UNSUPPORTED: Clang-Vulkan
65+
# https://github.com/llvm/llvm-project/issues/149345
66+
# XFAIL: Clang-DirectX
67+
6368
# RUN: split-file %s %t
6469
# RUN: %dxc_target -T cs_6_5 -Fo %t.o %t/source.hlsl
6570
# RUN: %offloader %t/pipeline.yaml %t.o

0 commit comments

Comments
 (0)