Skip to content

Commit

Permalink
Fix depth_clamp_and_clip test (gpuweb#3524)
Browse files Browse the repository at this point in the history
Broken in gpuweb#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 and ben-clayton committed Mar 18, 2024
1 parent 173947b commit 5ec3461
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 5ec3461

Please sign in to comment.