Commit 664376e2 by Sunny Sun Committed by Commit Bot

Vulkan: Fix performance issue

c9e0edc2 changed the layerCount in SubresourceUpdate to VK_REMAINING_ARRAY_LAYERS in some cases. So that the deferred clear logic cannot work correctly. Bug: angleproject:4617 Change-Id: Idedada085c618ff900538094412c752522594684 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2191551Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
parent c4832968
...@@ -3720,7 +3720,9 @@ angle::Result ImageHelper::flushSingleSubresourceStagedUpdates(ContextVk *contex ...@@ -3720,7 +3720,9 @@ angle::Result ImageHelper::flushSingleSubresourceStagedUpdates(ContextVk *contex
if (update.isUpdateToLayerLevel(layer, level)) if (update.isUpdateToLayerLevel(layer, level))
{ {
// On any data update, exit out. We'll need to do a full upload. // On any data update, exit out. We'll need to do a full upload.
if (update.updateSource != UpdateSource::Clear || update.clear.layerCount != 1) if (update.updateSource != UpdateSource::Clear ||
(update.clear.layerCount != 1 &&
!(update.clear.layerCount == VK_REMAINING_ARRAY_LAYERS && mLayerCount == 1)))
{ {
foundClear.reset(); foundClear.reset();
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment