From 1365885386a70456f61bfd20381a590e0bd35391 Mon Sep 17 00:00:00 2001 From: Yunchao He Date: Fri, 28 Jan 2022 19:44:58 +0000 Subject: [PATCH] Remove UnsafeAPI toggle for readonly depth/stencil attachment Readonly depth/stencil attachment has already been supported on D3D12, Metal and Vulkan. Its implement on GL and GLES will be at post V1 via WebGPU-compat. Bug: dawn:485 Change-Id: I1c13232f405b10b36f66c1c452449a864ca8fedc Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/78441 Reviewed-by: Corentin Wallez Commit-Queue: Yunchao He --- src/dawn_native/CommandEncoder.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/dawn_native/CommandEncoder.cpp b/src/dawn_native/CommandEncoder.cpp index 000155585f..def1f4ef5e 100644 --- a/src/dawn_native/CommandEncoder.cpp +++ b/src/dawn_native/CommandEncoder.cpp @@ -654,13 +654,6 @@ namespace dawn::native { descriptor->depthStencilAttachment->stencilReadOnly; if (IsReadOnlyDepthStencilAttachment(descriptor->depthStencilAttachment)) { - // TODO(dawn:485): Readonly depth/stencil attachment is not fully - // implemented. Disallow it as unsafe until the implementaion is completed. - DAWN_INVALID_IF( - device->IsToggleEnabled(Toggle::DisallowUnsafeAPIs), - "Readonly depth/stencil attachment is disallowed because it's not " - "fully implemented"); - usageTracker.TextureViewUsedAs(view, kReadOnlyRenderAttachment); } else { usageTracker.TextureViewUsedAs(view, wgpu::TextureUsage::RenderAttachment);