From 75acd0104448d7c5f43f99700decff39b8a034b2 Mon Sep 17 00:00:00 2001 From: ladevieq Date: Fri, 3 Feb 2023 00:15:19 +0100 Subject: Graphics pipeline and rendering implementation --- include/api-test/vk-device.hpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'include/api-test/vk-device.hpp') diff --git a/include/api-test/vk-device.hpp b/include/api-test/vk-device.hpp index a30b18c..32a0707 100644 --- a/include/api-test/vk-device.hpp +++ b/include/api-test/vk-device.hpp @@ -15,6 +15,17 @@ using VmaAllocator = struct VmaAllocator_T*; class window; +struct vksurface { + VkSurfaceKHR vk_surface; + VkSwapchainKHR vk_swapchain; + uint32_t image_index; +}; + +struct vksemaphore { + VkSemaphore vk_semaphore = nullptr; + uint64_t value = 0U; +}; + class vkdevice { struct queue { VkQueue vk_queue; @@ -38,6 +49,8 @@ class vkdevice { handle create_pipeline(const pipeline_desc& desc); + vksemaphore create_semaphore(); + void destroy_texture(const device_texture& texture); void destroy_texture(handle handle); @@ -72,9 +85,11 @@ class vkdevice { return device; } - void submit(command_buffer* buffers, size_t count); + void wait(vksemaphore& semaphore); + + void submit(std::span buffers, vksemaphore* wait, vksemaphore* signal); - void present(); + void present(vksurface& surface, const vksemaphore& semaphore); private: vkdevice(const window& window); -- cgit v1.3