D3D11: ignore Debug layer's CreateTexture2D errors.
Chrome's video decoder sometimes attempts to create a multiplanar
texture with non-even dimensions. D3D11 doesn't support that and the
debug layer will throw an error message. However, the error will be
handled gracefully by Chrome. We shouldn't treat this as a fatal
error in Dawn.
Bug: chromium:406269712
Change-Id: I854606f3198f31e27d659a4533748ece513a7ba2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/243594
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
diff --git a/src/dawn/native/d3d11/DeviceD3D11.cpp b/src/dawn/native/d3d11/DeviceD3D11.cpp
index 427a752..2a8c7e7 100644
--- a/src/dawn/native/d3d11/DeviceD3D11.cpp
+++ b/src/dawn/native/d3d11/DeviceD3D11.cpp
@@ -107,6 +107,13 @@
// https://learn.microsoft.com/en-us/windows/win32/direct3d11/d3d10-graphics-programming-guide-input-assembler-stage-using#instanceid
// i.e. it will wrap to 0.
return true;
+ case D3D11_MESSAGE_ID_CREATETEXTURE2D_INVALIDDIMENSIONS:
+ case D3D11_MESSAGE_ID_CREATETEXTURE2D_INVALIDARG_RETURN:
+ // External video decoder sometimes attempts to create a multiplanar texture with
+ // non-even dimensions. This is not supported by D3D11 runtime, but the error should
+ // already be handled by the call sites. Chromium's video decoder already does that so
+ // it's better we don't treat this as a fatal error.
+ return true;
default:
return false;
}