Skip to content

Commit 1d63f7b

Browse files
committed
Avoid reading from the buffer we just wrote to
This test isn't about memory sequencing, so avoid doing any of that.
1 parent 6bdd56e commit 1d63f7b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/Feature/HLSLLib/dot4add.test

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ RWStructuredBuffer<uint32_t> Result : register(u2);
77
[numthreads(1,1,1)]
88
void main() {
99
// dot4add({1, 1, 1, 1}, {1, 2, -128, -86}, 0) = -211 = 0xFF2D
10-
Result[0] = dot4add_i8packed(X[0], Y[0], 0u);
10+
uint32_t R0 = dot4add_i8packed(X[0], Y[0], 0u);
11+
Result[0] = R0;
1112
// dot4add({2, 4, 8, -1}, {2, 2, 2, 1}, -211) = -184 = 0xFF48
12-
Result[1] = dot4add_i8packed(X[1], Y[1], Result[0]);
13+
Result[1] = dot4add_i8packed(X[1], Y[1], R0);
1314

1415
// dot4add({1, 1, 1, 1}, {1, 2, 128, 170}, 0) = 301 = 0x012D
15-
Result[2] = dot4add_u8packed(X[0], Y[0], 0u);
16+
uint32_t R1 = dot4add_u8packed(X[0], Y[0], 0u);
17+
Result[2] = R1;
1618
// dot4add({2, 4, 8, 255}, {2, 2, 2, 1}, 301) = 584 = 0x0248
17-
Result[3] = dot4add_u8packed(X[1], Y[1], Result[2]);
19+
Result[3] = dot4add_u8packed(X[1], Y[1], R1);
1820
}
1921

2022
//--- pipeline.yaml

0 commit comments

Comments
 (0)