Skip to content

Commit

Permalink
Fix depth_clamp_and_clip test (#3524)
Browse files Browse the repository at this point in the history
Broken in #3412. Prior to this, some copies were being skipped for some formats because bytesPerBlock was undefined for those copies.
This doesn't change the coverage of the test though, as the actual check that used those copies is still skipped.

I missed the regressions before because they were a bit buried in existing failures on my machine.
  • Loading branch information
kainino0x authored Mar 18, 2024
1 parent cd9decb commit d568361
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/webgpu/api/operation/rendering/depth_clip_clamp.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ have unexpected values then get drawn to the color buffer, which is later checke
pass.end();
}
if (dsActual) {
enc.copyTextureToBuffer({ texture: dsTexture }, { buffer: dsActual }, [kNumTestPoints]);
enc.copyTextureToBuffer({ texture: dsTexture, aspect: 'depth-only' }, { buffer: dsActual }, [
kNumTestPoints,
]);
}
{
const clearValue = [0, 0, 0, 0]; // Will see this color if the check passed.
Expand Down Expand Up @@ -304,7 +306,11 @@ have unexpected values then get drawn to the color buffer, which is later checke
}
enc.copyTextureToBuffer({ texture: checkTexture }, { buffer: checkBuffer }, [kNumTestPoints]);
if (dsExpected) {
enc.copyTextureToBuffer({ texture: dsTexture }, { buffer: dsExpected }, [kNumTestPoints]);
enc.copyTextureToBuffer(
{ texture: dsTexture, aspect: 'depth-only' },
{ buffer: dsExpected },
[kNumTestPoints]
);
}
t.device.queue.submit([enc.finish()]);

Expand Down

0 comments on commit d568361

Please sign in to comment.