Skip to content

Commit 3082ec4

Browse files
authored
Enhance i64 atomics testing for texture types (microsoft#4424)
The already broad i64 atomics testing was missing most coverage for texture (image) types. This adds to atomicop_i64, and the various atomic*_i64_and_i32 tests to use int64 texture types and verify the DXIL output
1 parent 8a92da0 commit 3082ec4

File tree

5 files changed

+156
-22
lines changed

5 files changed

+156
-22
lines changed

tools/clang/test/HLSLFileCheck/hlsl/intrinsics/atomic/atomic_cmpstr_i64_and_i32.hlsl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
// RUN: %dxc -E CSMain -T cs_6_6 %s | FileCheck %s -check-prefix=GSCHECK
22
// RUN: %dxc -T ps_6_6 -DMEMTYPE=RWBuffer %s | FileCheck %s -check-prefixes=CHECK,TYCHECK
33
// RUN: %dxc -T ps_6_6 -DMEMTYPE=RWStructuredBuffer %s | FileCheck %s -check-prefix=CHECK
4+
// RUN: %dxc -T ps_6_6 -DMEMTYPE=RWTexture1D %s | FileCheck %s -check-prefix=CHECK
45

56
// RUN: %dxilver 1.6 | %dxc -E CSMain -T cs_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
67
// RUN: %dxilver 1.6 | %dxc -T ps_6_5 -DMEMTYPE=RWBuffer %s | FileCheck %s -check-prefix=ERRCHECK
78
// RUN: %dxilver 1.6 | %dxc -T ps_6_5 -DMEMTYPE=RWStructuredBuffer %s | FileCheck %s -check-prefix=ERRCHECK
9+
// RUN: %dxilver 1.6 | %dxc -T ps_6_5 -DMEMTYPE=RWTexture1D %s | FileCheck %s -check-prefix=ERRCHECK
810

911
// Verify that the first arg determines the overload and the others can be what they will
1012

tools/clang/test/HLSLFileCheck/hlsl/intrinsics/atomic/atomic_cmpxchg_i64_and_i32.hlsl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
// RUN: %dxc -E CSMain -T cs_6_6 %s | FileCheck %s -check-prefix=GSCHECK
22
// RUN: %dxc -T ps_6_6 -DMEMTYPE=RWBuffer %s | FileCheck %s -check-prefixes=CHECK,TYCHECK
33
// RUN: %dxc -T ps_6_6 -DMEMTYPE=RWStructuredBuffer %s | FileCheck %s -check-prefix=CHECK
4+
// RUN: %dxc -T ps_6_6 -DMEMTYPE=RWTexture1D %s | FileCheck %s -check-prefix=CHECK
45

56
// RUN: %dxilver 1.6 | %dxc -E CSMain -T cs_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
67
// RUN: %dxilver 1.6 | %dxc -T ps_6_5 -DMEMTYPE=RWBuffer %s | FileCheck %s -check-prefix=ERRCHECK
78
// RUN: %dxilver 1.6 | %dxc -T ps_6_5 -DMEMTYPE=RWStructuredBuffer %s | FileCheck %s -check-prefix=ERRCHECK
9+
// RUN: %dxilver 1.6 | %dxc -T ps_6_5 -DMEMTYPE=RWTexture1D %s | FileCheck %s -check-prefix=ERRCHECK
810

911
// Verify that the first arg determines the overload and the others can be what they will
1012

tools/clang/test/HLSLFileCheck/hlsl/intrinsics/atomic/atomic_xchg_i64_and_i32.hlsl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
// RUN: %dxc -E CSMain -T cs_6_6 %s | FileCheck %s -check-prefix=GSCHECK
22
// RUN: %dxc -T ps_6_6 -DMEMTYPE=RWBuffer %s | FileCheck %s -check-prefixes=CHECK,TYCHECK
33
// RUN: %dxc -T ps_6_6 -DMEMTYPE=RWStructuredBuffer %s | FileCheck %s -check-prefix=CHECK
4+
// RUN: %dxc -T ps_6_6 -DMEMTYPE=RWTexture1D %s | FileCheck %s -check-prefix=CHECK
45

56
// RUN: %dxilver 1.6 | %dxc -E CSMain -T cs_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
67
// RUN: %dxilver 1.6 | %dxc -T ps_6_5 -DMEMTYPE=RWBuffer %s | FileCheck %s -check-prefix=ERRCHECK
78
// RUN: %dxilver 1.6 | %dxc -T ps_6_5 -DMEMTYPE=RWStructuredBuffer %s | FileCheck %s -check-prefix=ERRCHECK
9+
// RUN: %dxilver 1.6 | %dxc -T ps_6_5 -DMEMTYPE=RWTexture1D %s | FileCheck %s -check-prefix=ERRCHECK
810

911
// Verify that the first arg determines the overload and the others can be what they will
1012

tools/clang/test/HLSLFileCheck/hlsl/intrinsics/atomic/atomicop_i64.hlsl

Lines changed: 123 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@ groupshared int64_t gs[256];
66
RWBuffer<int64_t> tb;
77
RWStructuredBuffer<int64_t> sb;
88
RWByteAddressBuffer rb;
9+
RWTexture1D<int64_t> tex1;
10+
RWTexture2D<int64_t> tex2;
11+
RWTexture3D<int64_t> tex3;
912

1013
groupshared uint64_t ugs[256];
1114
RWBuffer<uint64_t> utb;
1215
RWStructuredBuffer<uint64_t> usb;
16+
RWTexture1D<uint64_t> utex1;
17+
RWTexture2D<uint64_t> utex2;
18+
RWTexture3D<uint64_t> utex3;
1319

1420
[numthreads(1,1,1)]
1521
void main( uint3 gtid : SV_GroupThreadID)
@@ -18,70 +24,171 @@ void main( uint3 gtid : SV_GroupThreadID)
1824
uint b = gtid.y;
1925
uint64_t luv = a * b;
2026
int64_t liv = a + b;
27+
int64_t liv2 = 0, liv3 = 0;
2128
uint ix = 0;
2229

23-
// GSCHECK: atomicrmw add i64
30+
// CHECK: atomicrmw add i64
31+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 0
32+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 0
33+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 0
34+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 0
2435
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 0
2536
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 0
2637
InterlockedAdd( gs[a], liv );
2738
InterlockedAdd( tb[a], liv );
2839
InterlockedAdd( sb[a], liv );
29-
rb.InterlockedAdd( ix++, liv );
40+
InterlockedAdd( tex1[a], liv );
41+
InterlockedAdd( tex2[gtid.xy], liv );
42+
InterlockedAdd( tex3[gtid], liv );
43+
rb.InterlockedAdd64( ix++, liv );
3044

31-
// GSCHECK: atomicrmw and i64
45+
// CHECK: atomicrmw and i64
46+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 1
47+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 1
48+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 1
49+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 1
3250
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 1
3351
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 1
3452
InterlockedAnd( gs[a], liv );
3553
InterlockedAnd( tb[a], liv );
3654
InterlockedAnd( sb[a], liv );
37-
rb.InterlockedAnd( ix++, liv );
55+
InterlockedAnd( tex1[a], liv );
56+
InterlockedAnd( tex2[gtid.xy], liv );
57+
InterlockedAnd( tex3[gtid], liv );
58+
rb.InterlockedAnd64( ix++, liv );
3859

39-
// GSCHECK: atomicrmw or i64
60+
// CHECK: atomicrmw or i64
61+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 2
62+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 2
63+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 2
64+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 2
4065
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 2
4166
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 2
4267
InterlockedOr( gs[a], liv );
4368
InterlockedOr( tb[a], liv );
4469
InterlockedOr( sb[a], liv );
45-
rb.InterlockedOr( ix++, liv );
70+
InterlockedOr( tex1[a], liv );
71+
InterlockedOr( tex2[gtid.xy], liv );
72+
InterlockedOr( tex3[gtid], liv );
73+
rb.InterlockedOr64( ix++, liv );
4674

47-
// GSCHECK: atomicrmw xor i64
75+
// CHECK: atomicrmw xor i64
76+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 3
77+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 3
78+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 3
79+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 3
4880
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 3
4981
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 3
5082
InterlockedXor( gs[a], liv );
5183
InterlockedXor( tb[a], liv );
5284
InterlockedXor( sb[a], liv );
53-
rb.InterlockedXor( ix++, liv );
85+
InterlockedXor( tex1[a], liv );
86+
InterlockedXor( tex2[gtid.xy], liv );
87+
InterlockedXor( tex3[gtid], liv );
88+
rb.InterlockedXor64( ix++, liv );
5489

55-
// GSCHECK: atomicrmw min i64
90+
// CHECK: atomicrmw min i64
91+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 4
92+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 4
93+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 4
94+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 4
5695
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 4
5796
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 4
5897
InterlockedMin( gs[a], liv );
5998
InterlockedMin( tb[a], liv );
6099
InterlockedMin( sb[a], liv );
61-
rb.InterlockedMin( ix++, liv );
100+
InterlockedMin( tex1[a], liv );
101+
InterlockedMin( tex2[gtid.xy], liv );
102+
InterlockedMin( tex3[gtid], liv );
103+
rb.InterlockedMin64( ix++, liv );
62104

63-
// GSCHECK: atomicrmw max i64
105+
// CHECK: atomicrmw max i64
106+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 5
107+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 5
108+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 5
109+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 5
64110
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 5
65111
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 5
66112
InterlockedMax( gs[a], liv );
67113
InterlockedMax( tb[a], liv );
68114
InterlockedMax( sb[a], liv );
69-
rb.InterlockedMax( ix++, liv );
115+
InterlockedMax( tex1[a], liv );
116+
InterlockedMax( tex2[gtid.xy], liv );
117+
InterlockedMax( tex3[gtid], liv );
118+
rb.InterlockedMax64( ix++, liv );
70119

71-
// GSCHECK: atomicrmw umin i64
120+
// CHECK: atomicrmw umin i64
121+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 6
122+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 6
123+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 6
124+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 6
72125
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 6
73126
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 6
74127
InterlockedMin( ugs[a], luv );
75128
InterlockedMin( utb[a], luv );
76129
InterlockedMin( usb[a], luv );
77-
rb.InterlockedMin( ix++, luv );
130+
InterlockedMin( utex1[a], liv );
131+
InterlockedMin( utex2[gtid.xy], liv );
132+
InterlockedMin( utex3[gtid], liv );
133+
rb.InterlockedMin64( ix++, luv );
78134

79-
// GSCHECK: atomicrmw umax i64
135+
// CHECK: atomicrmw umax i64
136+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 7
137+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 7
138+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 7
139+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 7
80140
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 7
81141
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 7
82142
InterlockedMax( ugs[a], luv );
83143
InterlockedMax( utb[a], luv );
84144
InterlockedMax( usb[a], luv );
85-
rb.InterlockedMax( ix++, luv );
145+
InterlockedMax( utex1[a], liv );
146+
InterlockedMax( utex2[gtid.xy], liv );
147+
InterlockedMax( utex3[gtid], liv );
148+
rb.InterlockedMax64( ix++, luv );
149+
150+
// CHECK: atomicrmw xchg i64
151+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 8
152+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 8
153+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 8
154+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 8
155+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 8
156+
// CHECK: call i64 @dx.op.atomicBinOp.i64(i32 78, %dx.types.Handle %{{[0-9]*}}, i32 8
157+
InterlockedExchange( gs[a], liv, liv2 );
158+
InterlockedExchange( tb[a], liv2, liv );
159+
InterlockedExchange( sb[a], liv, liv2 );
160+
InterlockedExchange( tex1[a], liv2, liv );
161+
InterlockedExchange( tex2[gtid.xy], liv, liv2 );
162+
InterlockedExchange( tex3[gtid], liv2, liv );
163+
rb.InterlockedExchange64( ix++, liv, liv2 );
164+
165+
// CHECK: cmpxchg i64
166+
// CHECK: call i64 @dx.op.atomicCompareExchange.i64(i32 79
167+
// CHECK: call i64 @dx.op.atomicCompareExchange.i64(i32 79
168+
// CHECK: call i64 @dx.op.atomicCompareExchange.i64(i32 79
169+
// CHECK: call i64 @dx.op.atomicCompareExchange.i64(i32 79
170+
// CHECK: call i64 @dx.op.atomicCompareExchange.i64(i32 79
171+
// CHECK: call i64 @dx.op.atomicCompareExchange.i64(i32 79
172+
InterlockedCompareStore( gs[a], liv, liv2 );
173+
InterlockedCompareStore( tb[a], liv2, liv );
174+
InterlockedCompareStore( sb[a], liv, liv2 );
175+
InterlockedCompareStore( tex1[a], liv2, liv );
176+
InterlockedCompareStore( tex2[gtid.xy], liv2, liv );
177+
InterlockedCompareStore( tex3[gtid], liv, liv2 );
178+
rb.InterlockedCompareStore64( ix++, liv2, liv );
86179

180+
// CHECK: cmpxchg i64
181+
// CHECK: call i64 @dx.op.atomicCompareExchange.i64(i32 79
182+
// CHECK: call i64 @dx.op.atomicCompareExchange.i64(i32 79
183+
// CHECK: call i64 @dx.op.atomicCompareExchange.i64(i32 79
184+
// CHECK: call i64 @dx.op.atomicCompareExchange.i64(i32 79
185+
// CHECK: call i64 @dx.op.atomicCompareExchange.i64(i32 79
186+
// CHECK: call i64 @dx.op.atomicCompareExchange.i64(i32 79
187+
InterlockedCompareExchange( gs[a], liv, liv2, liv3 );
188+
InterlockedCompareExchange( tb[a], liv2, liv3, liv );
189+
InterlockedCompareExchange( sb[a], liv2, liv, liv3 );
190+
InterlockedCompareExchange( tex1[a], liv2, liv3, liv );
191+
InterlockedCompareExchange( tex2[gtid.xy], liv2, liv, liv3 );
192+
InterlockedCompareExchange( tex3[gtid], liv, liv2, liv3 );
193+
rb.InterlockedCompareExchange64( ix++, liv2, liv3, liv );
87194
}

tools/clang/test/HLSLFileCheck/hlsl/intrinsics/atomic/atomicop_i64_and_i32.hlsl

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
// RUN: %dxc -DMEMTYPE=RWStructuredBuffer -DINTRIN=InterlockedOr -T ps_6_6 %s | FileCheck %s -check-prefix=CHECK
2020
// RUN: %dxc -DMEMTYPE=RWStructuredBuffer -DINTRIN=InterlockedXor -T ps_6_6 %s | FileCheck %s -check-prefix=CHECK
2121

22-
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWBuffer -DINTRIN=InterlockedAdd -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
23-
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWBuffer -DINTRIN=InterlockedMin -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
24-
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWBuffer -DINTRIN=InterlockedMax -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
25-
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWBuffer -DINTRIN=InterlockedAnd -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
26-
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWBuffer -DINTRIN=InterlockedOr -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
27-
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWBuffer -DINTRIN=InterlockedXor -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
22+
// RUN: %dxc -DMEMTYPE=RWTexture1D -DINTRIN=InterlockedAdd -T ps_6_6 %s | FileCheck %s -check-prefix=CHECK
23+
// RUN: %dxc -DMEMTYPE=RWTexture1D -DINTRIN=InterlockedMin -T ps_6_6 %s | FileCheck %s -check-prefix=CHECK
24+
// RUN: %dxc -DMEMTYPE=RWTexture1D -DINTRIN=InterlockedMax -T ps_6_6 %s | FileCheck %s -check-prefix=CHECK
25+
// RUN: %dxc -DMEMTYPE=RWTexture1D -DINTRIN=InterlockedAnd -T ps_6_6 %s | FileCheck %s -check-prefix=CHECK
26+
// RUN: %dxc -DMEMTYPE=RWTexture1D -DINTRIN=InterlockedOr -T ps_6_6 %s | FileCheck %s -check-prefix=CHECK
27+
// RUN: %dxc -DMEMTYPE=RWTexture1D -DINTRIN=InterlockedXor -T ps_6_6 %s | FileCheck %s -check-prefix=CHECK
2828

2929
// RUN: %dxilver 1.6 | %dxc -DINTRIN=InterlockedAdd -E CSMain -T cs_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
3030
// RUN: %dxilver 1.6 | %dxc -DINTRIN=InterlockedMin -E CSMain -T cs_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
@@ -33,6 +33,27 @@
3333
// RUN: %dxilver 1.6 | %dxc -DINTRIN=InterlockedOr -E CSMain -T cs_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
3434
// RUN: %dxilver 1.6 | %dxc -DINTRIN=InterlockedXor -E CSMain -T cs_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
3535

36+
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWBuffer -DINTRIN=InterlockedAdd -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
37+
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWBuffer -DINTRIN=InterlockedMin -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
38+
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWBuffer -DINTRIN=InterlockedMax -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
39+
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWBuffer -DINTRIN=InterlockedAnd -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
40+
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWBuffer -DINTRIN=InterlockedOr -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
41+
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWBuffer -DINTRIN=InterlockedXor -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
42+
43+
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWStructuredBuffer -DINTRIN=InterlockedAdd -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
44+
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWStructuredBuffer -DINTRIN=InterlockedMin -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
45+
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWStructuredBuffer -DINTRIN=InterlockedMax -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
46+
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWStructuredBuffer -DINTRIN=InterlockedAnd -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
47+
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWStructuredBuffer -DINTRIN=InterlockedOr -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
48+
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWStructuredBuffer -DINTRIN=InterlockedXor -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
49+
50+
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWTexture1D -DINTRIN=InterlockedAdd -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
51+
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWTexture1D -DINTRIN=InterlockedMin -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
52+
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWTexture1D -DINTRIN=InterlockedMax -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
53+
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWTexture1D -DINTRIN=InterlockedAnd -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
54+
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWTexture1D -DINTRIN=InterlockedOr -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
55+
// RUN: %dxilver 1.6 | %dxc -DMEMTYPE=RWTexture1D -DINTRIN=InterlockedXor -T ps_6_5 %s | FileCheck %s -check-prefix=ERRCHECK
56+
3657
// Verify that the first arg determines the overload and the others can be what they will
3758

3859
#ifdef MEMTYPE

0 commit comments

Comments
 (0)