aboutsummaryrefslogtreecommitdiffstats
path: root/include/api-test/vk-device.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/api-test/vk-device.hpp')
-rw-r--r--include/api-test/vk-device.hpp19
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);