Skip to content

Commit c4676d3

Browse files
authored
[SM6.10] Update InterlockedAccumulate Param Order (#8459)
Update the LinAlg header file in response to microsoft/hlsl-specs#875 Swaps the InterlockedAccumulate parameters back to their original location
1 parent ab214d2 commit c4676d3

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

tools/clang/lib/Headers/hlsl/dx/linalg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ OuterProduct(vector<InputElTy, M> VecA, vector<InputElTy, N> VecB) {
652652

653653
template <typename InputElTy, SIZE_TYPE M>
654654
typename hlsl::enable_if<hlsl::is_arithmetic<InputElTy>::value, void>::type
655-
InterlockedAccumulate(RWByteAddressBuffer Res, vector<InputElTy, M> Vec,
655+
InterlockedAccumulate(vector<InputElTy, M> Vec, RWByteAddressBuffer Res,
656656
uint StartOffset, uint Align = 64) {
657657
__builtin_LinAlg_VectorAccumulateToDescriptor(Vec, Res, StartOffset, Align);
658658
}

tools/clang/test/CodeGenDXIL/hlsl/linalg/api/vectors.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ void main(uint ID : SV_GroupID) {
193193
// CHECK: call void @dx.op.linAlgVectorAccumulateToDescriptor.v4f16(i32 -2147483617, <4 x half>
194194
// CHECK-SAME: <half 0xH4926, half 0xH4926, half 0xH4926, half 0xH4926>, %dx.types.Handle %{{[0-9]+}}, i32 0, i32 64)
195195
// CHECK-SAME: ; LinAlgVectorAccumulateToDescriptor(vector,handle,offset,align)
196-
InterlockedAccumulate(RWBAB, vec1, 0);
196+
InterlockedAccumulate(vec1, RWBAB, 0);
197197

198198
// CHECK: call void @dx.op.linAlgVectorAccumulateToDescriptor.v8f16(i32 -2147483617, <8 x half> %{{[0-9]+}},
199199
// CHECK-SAME: %dx.types.Handle %{{[0-9]+}}, i32 8, i32 64) ; LinAlgVectorAccumulateToDescriptor(vector,handle,offset,align)
200-
InterlockedAccumulate(RWBAB, vec2, 8);
200+
InterlockedAccumulate(vec2, RWBAB, 8);
201201
}

0 commit comments

Comments
 (0)