[Vulkan] Implement readback_resolve for vulkan

This commit is contained in:
Herman S.
2025-10-23 13:49:33 +09:00
committed by Radosław Gliński
parent f4b471d000
commit 4644657e83
5 changed files with 229 additions and 4 deletions

View File

@@ -436,6 +436,9 @@ class VulkanCommandProcessor final : public CommandProcessor {
return !submission_open_ && submissions_in_flight_fences_.empty();
}
// Requests a readback buffer for CPU access to GPU data.
VkBuffer RequestReadbackBuffer(uint32_t size);
void ClearTransientDescriptorPools();
void SplitPendingBarrier();
@@ -750,6 +753,11 @@ class VulkanCommandProcessor final : public CommandProcessor {
// Temporary storage for memexport stream constants used in the draw.
std::vector<draw_util::MemExportRange> memexport_ranges_;
// Readback buffer for CPU access to resolved data
VkBuffer readback_buffer_ = VK_NULL_HANDLE;
VkDeviceMemory readback_buffer_memory_ = VK_NULL_HANDLE;
uint32_t readback_buffer_size_ = 0;
};
} // namespace vulkan