Skip to content

Commit 02cfc68

Browse files
authored
[spirv] Fix ByteAddressBufferTemplatedStoreStruct2 test (#4535)
This test was previously excluded from running. Add it back in and fix issues causing it to fail. Fixes #4532
1 parent c6f0ea4 commit 02cfc68

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

tools/clang/test/CodeGenSPIRV/method.byte-address-buffer.templated-store.struct2.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void main(uint3 tid : SV_DispatchThreadId) {
4141
// CHECK: [[sArr:%\d+]] = OpLoad %_arr_S_uint_2 %sArr
4242
// CHECK: [[sArr0:%\d+]] = OpCompositeExtract %S [[sArr]] 0
4343
// CHECK: [[sArr1:%\d+]] = OpCompositeExtract %S [[sArr]] 1
44-
// CHECK: [[s0_a:%\d+]] = OpCompositeExtract %half [[sArr]] 0
44+
// CHECK: [[s0_a:%\d+]] = OpCompositeExtract %half [[sArr0]] 0
4545
// CHECK: [[ptr0:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf2 %uint_0 [[address0]]
4646
// CHECK: OpBitcast %ushort
4747
// CHECK: OpUConvert %uint
@@ -72,7 +72,7 @@ void main(uint3 tid : SV_DispatchThreadId) {
7272
// CHECK: OpBitcast %ushort [[s0_e1_x0]]
7373
// CHECK: OpUConvert %uint
7474
// CHECK: OpShiftLeftLogical %uint {{%\d+}} %uint_16
75-
// CHECK: [[oldWord1:%\d+]] = OpLoad %uint [[address1]]
75+
// CHECK: [[oldWord1:%\d+]] = OpLoad %uint [[ptr1]]
7676
// CHECK: [[newWord1:%\d+]] = OpBitwiseOr %uint [[oldWord1]] {{%\d+}}
7777
// CHECK: OpStore [[ptr1]] [[newWord1]]
7878

tools/clang/unittests/SPIRV/CodeGenSpirvTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,7 @@ TEST_F(FileTest, ByteAddressBufferTemplatedStoreStruct) {
10861086
runFileTest("method.byte-address-buffer.templated-store.struct.hlsl");
10871087
}
10881088
TEST_F(FileTest, ByteAddressBufferTemplatedStoreStruct2) {
1089-
runFileTest("method.byte-address-buffer.templated-store.struct.hlsl");
1089+
runFileTest("method.byte-address-buffer.templated-store.struct2.hlsl");
10901090
}
10911091
TEST_F(FileTest, ByteAddressBufferTemplatedStoreMatrix) {
10921092
runFileTest("method.byte-address-buffer.templated-store.matrix.hlsl");

0 commit comments

Comments
 (0)