mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 10:49:14 +00:00
Add workaround on using non-zero ResolveLevel or ResolveSlice on Metal
Current Metal drivers have a bug that doing MSAA resolve with non-zero ResolveLevel and ResolveSlice cannot work correctly. This patch adds a workaround for this bug that first resolving into a temporary one-level 2D texture, then copying the result into the true resolve target. Although the end2end test ResolveIntoOneMipmapLevelOf2DTexture and ResolveInto2DArrayTexture can pass on the try bot using AMD GPU, we find they fail on some other AMD GPUs (Macbook Pro 2018), so currently this workaround is enabled on all Metal backends. BUG=dawn:56 TEST=dawn_end2end_tests Change-Id: Ie85858e58ff486d49dc11c270d8b6d95e216fd42 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/6780 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This commit is contained in:
committed by
Commit Bot service account
parent
2a7b631482
commit
c0c7e2f85b
@@ -73,7 +73,15 @@ namespace dawn_native {
|
||||
"Clears texture to full 1 bits as soon as they are created, but doesn't update "
|
||||
"the tracking state of the texture. This way we can test the logic of clearing "
|
||||
"textures that use recycled memory.",
|
||||
"https://bugs.chromium.org/p/dawn/issues/detail?id=145"}}}};
|
||||
"https://bugs.chromium.org/p/dawn/issues/detail?id=145"}},
|
||||
{Toggle::AlwaysResolveIntoZeroLevelAndLayer,
|
||||
{"always_resolve_into_zero_level_and_layer",
|
||||
"When the resolve target is a texture view that is created on the non-zero level or "
|
||||
"layer of a texture, we first resolve into a temporarily 2D texture with only one "
|
||||
"mipmap level and one array layer, and copy the result of MSAA resolve into the "
|
||||
"true resolve target. This workaround is enabled by default on the Metal drivers "
|
||||
"that have bugs when setting non-zero resolveLevel or resolveSlice.",
|
||||
"https://bugs.chromium.org/p/dawn/issues/detail?id=56"}}}};
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
Reference in New Issue
Block a user