Snapshot vk image content in common situation
This commit snapshots vk image content by allocating a staging buffer and copying the bytes on snapshot. It only works in the simplest setup. Many situations are not considered in this commit, they include: (1) the image does not support VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL layout; (2) the image does not support VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL layout; (3) the queue is dirty. Also there is no performance optimization. Implementation-wise, snapshot happens in VkDecoderGlobalState after recording / playing back all create / bind commands. It borrows an existing queue to run the extra vk copy commands. A temporary staging buffer is also created for copying. Later we could optimize the code by reusing most of the temporary objects. 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:
@@ -113,6 +113,7 @@ apiSequences = {
|
||||
apiModifies = {
|
||||
"vkMapMemoryIntoAddressSpaceGOOGLE" : ["memory"],
|
||||
"vkGetBlobGOOGLE" : ["memory"],
|
||||
"vkBindImageMemory": ["image"],
|
||||
}
|
||||
|
||||
def is_modify_operation(api, param):
|
||||
|
||||
Reference in New Issue
Block a user