From 9d545f7b8a231bcba673b9c70736c5adff1e13e5 Mon Sep 17 00:00:00 2001 From: Kai Ninomiya Date: Mon, 18 Mar 2024 12:20:19 -0700 Subject: [PATCH] Fix depth_clamp_and_clip test Broken in #3412. Prior to this, some checks were being skipped (that we didn't want to skip, but were skipped because of the limitations of the format info table). --- .../api/operation/rendering/depth_clip_clamp.spec.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/webgpu/api/operation/rendering/depth_clip_clamp.spec.ts b/src/webgpu/api/operation/rendering/depth_clip_clamp.spec.ts index 5e8357114107..1d3b6d8b7a74 100644 --- a/src/webgpu/api/operation/rendering/depth_clip_clamp.spec.ts +++ b/src/webgpu/api/operation/rendering/depth_clip_clamp.spec.ts @@ -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. @@ -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()]);