From 8e11ebc3ae6ccfb5ff01d2ca9d658db2c97b99ec Mon Sep 17 00:00:00 2001 From: Martin Baliet Date: Sun, 17 Mar 2024 15:56:20 +0100 Subject: [PATCH] videoOut| + handle submitFlips without prev rendering --- core/imports/imports.cpp | 4 ++-- core/imports/imports.h | 2 +- core/imports/imports_func.h | 2 +- core/videoout/vulkan/vulkanHelper.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/imports/imports.cpp b/core/imports/imports.cpp index 4312291..2e79cb1 100644 --- a/core/imports/imports.cpp +++ b/core/imports/imports.cpp @@ -25,9 +25,9 @@ bool registerDisplayBuffer(uint64_t vaddr, VkExtent2D extent, uint32_t pitch, Vk return g_registerDisplayBuffer(vaddr, extent, pitch, format); } -bool copyDisplayBuffer(uint64_t vaddr, VkCommandBuffer transferBuffer, VkImage dstImage) { +bool copyDisplayBuffer(uint64_t vaddr, VkCommandBuffer transferBuffer, VkImage dstImage, VkExtent2D dstExtent) { assert(g_copyDisplayBuffer != nullptr); - return g_copyDisplayBuffer(vaddr, transferBuffer, dstImage); + return g_copyDisplayBuffer(vaddr, transferBuffer, dstImage, dstExtent); } std::unique_ptr createGraphics(IEventsGraphics& listener, VkDevice device, VkPhysicalDevice physDev, VkInstance instance) { diff --git a/core/imports/imports.h b/core/imports/imports.h index 2fc1389..a08f19e 100644 --- a/core/imports/imports.h +++ b/core/imports/imports.h @@ -16,7 +16,7 @@ using registerDisplayBuffer_t = bool (*)(uint64_t vaddr, VkExtent2D extent, uint32_t pitch, VkFormat format); -using copyDisplayBuffer_t = bool (*)(uint64_t vaddr, VkCommandBuffer transferBuffer, VkImage dstImage); +using copyDisplayBuffer_t = bool (*)(uint64_t vaddr, VkCommandBuffer transferBuffer, VkImage dstImage, VkExtent2D dstExtent); using createGraphics_t = std::unique_ptr (*)(IEventsGraphics& listener, VkDevice device, VkPhysicalDevice physDev, VkInstance instance); diff --git a/core/imports/imports_func.h b/core/imports/imports_func.h index 0b16e49..baf7b3a 100644 --- a/core/imports/imports_func.h +++ b/core/imports/imports_func.h @@ -34,7 +34,7 @@ __APICALL bool registerDisplayBuffer(uint64_t vaddr, VkExtent2D extent, uint32_t * @return true * @return false */ -__APICALL bool copyDisplayBuffer(uint64_t vaddr, VkCommandBuffer transferBuffer, VkImage dstImage); +__APICALL bool copyDisplayBuffer(uint64_t vaddr, VkCommandBuffer transferBuffer, VkImage dstImage, VkExtent2D dstExtent); /** * @brief Create a Graphics object. diff --git a/core/videoout/vulkan/vulkanHelper.cpp b/core/videoout/vulkan/vulkanHelper.cpp index dfbaba9..bf18983 100644 --- a/core/videoout/vulkan/vulkanHelper.cpp +++ b/core/videoout/vulkan/vulkanHelper.cpp @@ -243,7 +243,7 @@ void transfer2Display(VkCommandBuffer cmdBuffer, VulkanObj* obj, vulkan::Swapcha vkCmdPipelineBarrier(cmdBuffer, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, nullptr, 0, nullptr, 1, &barrier); } - copyDisplayBuffer(vaddrDisplayBuffer, cmdBuffer, displayBuffer.image); // let gpumemorymanager decide + copyDisplayBuffer(vaddrDisplayBuffer, cmdBuffer, displayBuffer.image, swapchain.extent2d); // let gpumemorymanager decide { // Change to Present Layout