From 44032e50849da3d38a3faaeae552e14e0d194dc0 Mon Sep 17 00:00:00 2001 From: Austin Eng Date: Mon, 13 Feb 2023 18:04:00 +0000 Subject: [PATCH] Unblock multi-mip stencil textures on Metal These textures still have some outstanding issues on both Intel and AMD, where the wrong subresource can be read from. Zero-initialization workarounds have been enabled to ensure that even when the wrong subresource is read, uninitialized data is not read. Bug: dawn:704, dawn:791, dawn:838 Change-Id: Ib118eff0c5ed5e7812fa70e88ece5317c1af13b0 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/116849 Kokoro: Kokoro Reviewed-by: Corentin Wallez Commit-Queue: Austin Eng --- src/dawn/native/Texture.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/dawn/native/Texture.cpp b/src/dawn/native/Texture.cpp index 1d78191688..2467533806 100644 --- a/src/dawn/native/Texture.cpp +++ b/src/dawn/native/Texture.cpp @@ -376,15 +376,6 @@ MaybeError ValidateTextureDescriptor(const DeviceBase* device, descriptor->dimension, format->format); DAWN_TRY(ValidateTextureSize(device, descriptor, format)); - - // TODO(crbug.com/dawn/838): Implement a workaround for this issue. - // Readbacks from the non-zero mip of a stencil texture may contain garbage data. - DAWN_INVALID_IF(device->IsToggleEnabled(Toggle::DisallowUnsafeAPIs) && format->HasStencil() && - descriptor->mipLevelCount > 1 && - device->GetAdapter()->GetBackendType() == wgpu::BackendType::Metal, - "https://crbug.com/dawn/838: Stencil textures with more than one mip level are " - "disabled on Metal."); - return {}; }