summaryrefslogtreecommitdiffstats
path: root/drivers/vulkan/rendering_device_driver_vulkan.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-02-22 11:23:19 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-02-22 11:23:19 +0100
commitd646b7fef63906e09ff16ddae0e827e0cd50a063 (patch)
tree54d3acd873aa1c741e2b89ed2d6107f367a92a4e /drivers/vulkan/rendering_device_driver_vulkan.h
parent0a3f162f17bbe1c63f8691131bba84017ba6c557 (diff)
parentee2d8f68baa752612a76c3351e85aa2b72ab32df (diff)
downloadredot-engine-d646b7fef63906e09ff16ddae0e827e0cd50a063.tar.gz
Merge pull request #88560 from DarioSamo/rdd_execute_and_present
Merge execute and present commands for RenderingDeviceDriver.
Diffstat (limited to 'drivers/vulkan/rendering_device_driver_vulkan.h')
-rw-r--r--drivers/vulkan/rendering_device_driver_vulkan.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/vulkan/rendering_device_driver_vulkan.h b/drivers/vulkan/rendering_device_driver_vulkan.h
index 4abaeecd11..70c4cebba5 100644
--- a/drivers/vulkan/rendering_device_driver_vulkan.h
+++ b/drivers/vulkan/rendering_device_driver_vulkan.h
@@ -115,6 +115,7 @@ class RenderingDeviceDriverVulkan : public RenderingDeviceDriver {
VkDevice vk_device = VK_NULL_HANDLE;
RenderingContextDriverVulkan *context_driver = nullptr;
RenderingContextDriver::Device context_device = {};
+ uint32_t frame_count = 1;
VkPhysicalDevice physical_device = VK_NULL_HANDLE;
VkPhysicalDeviceProperties physical_device_properties = {};
VkPhysicalDeviceFeatures physical_device_features = {};
@@ -276,6 +277,7 @@ public:
// ----- QUEUE -----
private:
struct CommandQueue {
+ LocalVector<VkSemaphore> present_semaphores;
LocalVector<VkSemaphore> image_semaphores;
LocalVector<SwapChain *> image_semaphores_swap_chains;
LocalVector<uint32_t> pending_semaphores_for_execute;
@@ -284,12 +286,12 @@ private:
LocalVector<Pair<Fence *, uint32_t>> image_semaphores_for_fences;
uint32_t queue_family = 0;
uint32_t queue_index = 0;
+ uint32_t present_semaphore_index = 0;
};
public:
virtual CommandQueueID command_queue_create(CommandQueueFamilyID p_cmd_queue_family, bool p_identify_as_main_queue = false) override final;
- virtual Error command_queue_execute(CommandQueueID p_cmd_queue, VectorView<CommandBufferID> p_cmd_buffers, VectorView<SemaphoreID> p_wait_semaphores, VectorView<SemaphoreID> p_signal_semaphores, FenceID p_signal_fence) override final;
- virtual Error command_queue_present(CommandQueueID p_cmd_queue, VectorView<SwapChainID> p_swap_chains, VectorView<SemaphoreID> p_wait_semaphores) override final;
+ virtual Error command_queue_execute_and_present(CommandQueueID p_cmd_queue, VectorView<SemaphoreID> p_wait_semaphores, VectorView<CommandBufferID> p_cmd_buffers, VectorView<SemaphoreID> p_cmd_semaphores, FenceID p_cmd_fence, VectorView<SwapChainID> p_swap_chains) override final;
virtual void command_queue_free(CommandQueueID p_cmd_queue) override final;
private: