Commit 6bb47e67e73c09a1fad7ef75155edd2ec847610e

Amirali Abdolrashidi 2025-06-17T13:42:47

Vulkan: Limit finalizing foreign image layouts Currently, any submission results in finalizing all foreign images. However, if the submission is only limited to the outside render pass command buffer, this would result in oldLayout VVL errors (01197), as it would be too early to finalize the layout of such images at those times. At this time, this type of submission can occur if the size of buffer-to-image updates exceeds the following threshold: kMaxBufferToImageCopySize In this change, finalizing the foreign image layouts would only occur when all commands are being submitted. * In ContextVk::submitCommands(), finalizeAllForeignImages() is now called only when the submission type is Submit::AllCommands. * Added new submit tests for foreign images to ImageTest: * UploadForeignUntilSubmitDoesNotBreakRenderPass * CopyToForeignUntilSubmitDoesNotBreakRenderPass Bug: b/425987310 Change-Id: Ia345e176be79017ba18ef52a57256eeeb298e39a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6653602 Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>