Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 664376e

Browse files
sunsun02Commit Bot
authored andcommitted
Vulkan: Fix performance issue
c9e0edc 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/+/2191551 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
1 parent c483296 commit 664376e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/libANGLE/renderer/vulkan/vk_helpers.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3720,7 +3720,9 @@ angle::Result ImageHelper::flushSingleSubresourceStagedUpdates(ContextVk *contex
37203720
if (update.isUpdateToLayerLevel(layer, level))
37213721
{
37223722
// On any data update, exit out. We'll need to do a full upload.
3723-
if (update.updateSource != UpdateSource::Clear || update.clear.layerCount != 1)
3723+
if (update.updateSource != UpdateSource::Clear ||
3724+
(update.clear.layerCount != 1 &&
3725+
!(update.clear.layerCount == VK_REMAINING_ARRAY_LAYERS && mLayerCount == 1)))
37243726
{
37253727
foundClear.reset();
37263728
break;

0 commit comments

Comments
 (0)