From 97f56bd0b858c764663f153d5294d5ce880184f5 Mon Sep 17 00:00:00 2001 From: Austin Eng Date: Wed, 25 Jan 2023 20:57:49 +0000 Subject: [PATCH] Clamp the stencil reference to 255 Fixed: dawn:1645 Change-Id: I908fe0a2cb029c7cc6cf94b066f0f842e0f1e224 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117532 Commit-Queue: Austin Eng Reviewed-by: Kai Ninomiya Reviewed-by: Loko Kung Kokoro: Kokoro --- src/dawn/native/RenderPassEncoder.cpp | 2 +- webgpu-cts/expectations.txt | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/dawn/native/RenderPassEncoder.cpp b/src/dawn/native/RenderPassEncoder.cpp index 0ebc0bf4a0..cc3de8d656 100644 --- a/src/dawn/native/RenderPassEncoder.cpp +++ b/src/dawn/native/RenderPassEncoder.cpp @@ -180,7 +180,7 @@ void RenderPassEncoder::APISetStencilReference(uint32_t reference) { [&](CommandAllocator* allocator) -> MaybeError { SetStencilReferenceCmd* cmd = allocator->Allocate(Command::SetStencilReference); - cmd->reference = reference; + cmd->reference = reference & 255; return {}; }, diff --git a/webgpu-cts/expectations.txt b/webgpu-cts/expectations.txt index 538b7b5949..1d11861902 100644 --- a/webgpu-cts/expectations.txt +++ b/webgpu-cts/expectations.txt @@ -299,22 +299,6 @@ crbug.com/tint/1771 [ ubuntu ] webgpu:api,validation,compute_pipeline:overrides, crbug.com/tint/1771 [ win10 ] webgpu:api,validation,compute_pipeline:overrides,workgroup_size,limits,* [ Failure ] crbug.com/tint/1805 webgpu:shader,validation,parse,align:align_required_alignment:* [ Failure ] -################################################################################ -# API operation failures -################################################################################ -crbug.com/dawn/0000 [ intel-gen-9 monterey ] webgpu:api,operation,render_pass,clear_value:stencil_clear_value:stencilFormat="depth24plus-stencil8";stencilClearValue=258;applyStencilClearValueAsStencilReferenceValue=true [ Failure ] -crbug.com/dawn/0000 [ nvidia-0x2184 ubuntu ] webgpu:api,operation,render_pass,clear_value:stencil_clear_value:stencilFormat="depth24plus-stencil8";stencilClearValue=258;applyStencilClearValueAsStencilReferenceValue=true [ Failure ] -crbug.com/dawn/0000 [ intel-gen-9 monterey ] webgpu:api,operation,render_pass,clear_value:stencil_clear_value:stencilFormat="depth24plus-stencil8";stencilClearValue=65539;applyStencilClearValueAsStencilReferenceValue=true [ Failure ] -crbug.com/dawn/0000 [ nvidia-0x2184 ubuntu ] webgpu:api,operation,render_pass,clear_value:stencil_clear_value:stencilFormat="depth24plus-stencil8";stencilClearValue=65539;applyStencilClearValueAsStencilReferenceValue=true [ Failure ] -crbug.com/dawn/0000 [ intel-gen-9 monterey ] webgpu:api,operation,render_pass,clear_value:stencil_clear_value:stencilFormat="depth32float-stencil8";stencilClearValue=258;applyStencilClearValueAsStencilReferenceValue=true [ Failure ] -crbug.com/dawn/0000 [ nvidia-0x2184 ubuntu ] webgpu:api,operation,render_pass,clear_value:stencil_clear_value:stencilFormat="depth32float-stencil8";stencilClearValue=258;applyStencilClearValueAsStencilReferenceValue=true [ Failure ] -crbug.com/dawn/0000 [ intel-gen-9 monterey ] webgpu:api,operation,render_pass,clear_value:stencil_clear_value:stencilFormat="depth32float-stencil8";stencilClearValue=65539;applyStencilClearValueAsStencilReferenceValue=true [ Failure ] -crbug.com/dawn/0000 [ nvidia-0x2184 ubuntu ] webgpu:api,operation,render_pass,clear_value:stencil_clear_value:stencilFormat="depth32float-stencil8";stencilClearValue=65539;applyStencilClearValueAsStencilReferenceValue=true [ Failure ] -crbug.com/dawn/0000 [ intel-gen-9 monterey ] webgpu:api,operation,render_pass,clear_value:stencil_clear_value:stencilFormat="stencil8";stencilClearValue=258;applyStencilClearValueAsStencilReferenceValue=true [ Failure ] -crbug.com/dawn/0000 [ nvidia-0x2184 ubuntu ] webgpu:api,operation,render_pass,clear_value:stencil_clear_value:stencilFormat="stencil8";stencilClearValue=258;applyStencilClearValueAsStencilReferenceValue=true [ Failure ] -crbug.com/dawn/0000 [ intel-gen-9 monterey ] webgpu:api,operation,render_pass,clear_value:stencil_clear_value:stencilFormat="stencil8";stencilClearValue=65539;applyStencilClearValueAsStencilReferenceValue=true [ Failure ] -crbug.com/dawn/0000 [ nvidia-0x2184 ubuntu ] webgpu:api,operation,render_pass,clear_value:stencil_clear_value:stencilFormat="stencil8";stencilClearValue=65539;applyStencilClearValueAsStencilReferenceValue=true [ Failure ] - ################################################################################ # Failures with depth/stencil textures on Intel Mac ################################################################################