Better track color buffer usage in Vulkan

Sometimes guest renders to an AHB without calling
vkQueueSignalReleaseImageANDROIDAsyncGOOGLE. This would result in the
color buffer not being updated from Vulkan.

This commit tracks the situation that AHB is rendered to, and copies its
content to color buffer.

Note that it adds extra wait, which could hurt performance.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
This commit is contained in:
Yahan Zhou
2024-02-05 11:19:10 -08:00
committed by Marge Bot
parent ae8d2c2907
commit fe6accba65
2 changed files with 7 additions and 0 deletions

View File

@@ -700,6 +700,10 @@ custom_decodes = {
"vkDestroyRenderPass" : emit_global_state_wrapped_decoding,
"vkCreateFramebuffer" : emit_global_state_wrapped_decoding,
"vkDestroyFramebuffer" : emit_global_state_wrapped_decoding,
"vkDestroyFramebuffer" : emit_global_state_wrapped_decoding,
"vkCmdBeginRenderPass" : emit_global_state_wrapped_decoding,
"vkCmdBeginRenderPass2" : emit_global_state_wrapped_decoding,
"vkCmdBeginRenderPass2KHR" : emit_global_state_wrapped_decoding,
"vkCreateSamplerYcbcrConversion": emit_global_state_wrapped_decoding,
"vkDestroySamplerYcbcrConversion": emit_global_state_wrapped_decoding,

View File

@@ -310,6 +310,9 @@ custom_decodes = {
"vkEndCommandBufferAsyncGOOGLE": emit_global_state_wrapped_decoding_with_context,
"vkResetCommandBufferAsyncGOOGLE": emit_global_state_wrapped_decoding,
"vkCommandBufferHostSyncGOOGLE": emit_global_state_wrapped_decoding,
"vkCmdBeginRenderPass" : emit_global_state_wrapped_decoding,
"vkCmdBeginRenderPass2" : emit_global_state_wrapped_decoding,
"vkCmdBeginRenderPass2KHR" : emit_global_state_wrapped_decoding,
}