diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2023-02-03 00:15:19 +0100 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2023-02-03 00:15:19 +0100 |
| commit | 75acd0104448d7c5f43f99700decff39b8a034b2 (patch) | |
| tree | 1b22b1ce10f24c8ef41b3ab1110a30c545e3cc66 /include/api-test/vk-device.hpp | |
| parent | ddff2fa5d0cbae17cb819c91bad0a79105ba0ea7 (diff) | |
Graphics pipeline and rendering implementation
Diffstat (limited to 'include/api-test/vk-device.hpp')
| -rw-r--r-- | include/api-test/vk-device.hpp | 19 |
1 files changed, 17 insertions, 2 deletions
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<device_pipeline> create_pipeline(const pipeline_desc& desc); + vksemaphore create_semaphore(); + void destroy_texture(const device_texture& texture); void destroy_texture(handle<device_texture> 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<command_buffer> buffers, vksemaphore* wait, vksemaphore* signal); - void present(); + void present(vksurface& surface, const vksemaphore& semaphore); private: vkdevice(const window& window); |
