Clear Vulkan Textures at first usage

This prevents dirty textures to be used when memory is recycled
while destroying/creating textures. If a texture is not cleared at load,
it will be cleared to 0 before it is used.

Bug: dawn:145
Change-Id: Ia3f02427478fb48649089829186ccb377caa1912
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/6960
Commit-Queue: Natasha Lee <natlee@microsoft.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Natasha Lee
2019-06-11 18:11:05 +00:00
committed by Commit Bot service account
parent 031fbbbaa1
commit 28232ce9f5
20 changed files with 518 additions and 35 deletions

View File

@@ -81,7 +81,12 @@ namespace dawn_native {
"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"}}}};
"https://bugs.chromium.org/p/dawn/issues/detail?id=56"}},
{Toggle::LazyClearResourceOnFirstUse,
{"lazy_clear_resource_on_first_use",
"Clears resource to zero on first usage. This initializes the resource "
"so that no dirty bits from recycled memory is present in the new resource.",
"https://bugs.chromium.org/p/dawn/issues/detail?id=145"}}}};
} // anonymous namespace