summaryrefslogtreecommitdiff
path: root/render/vulkan/fence.h
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2024-10-25 22:57:43 -0500
committerDanny Holman <dholman@gymli.org>2024-10-25 22:57:43 -0500
commit71befd8eaf7244badb0188b751066afacb8d8ee3 (patch)
treeca1c6bac49f68083556cb1492136078aff8a35b1 /render/vulkan/fence.h
parentc20adaa0c494edf1a04d88b925ca887f42e71bf1 (diff)
render: create the rendering subsystem
Create the rendering subsystem and populate it with a basic Vulkan renderer. This renderer is not yet functional and should not be used yet. Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'render/vulkan/fence.h')
-rw-r--r--render/vulkan/fence.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/render/vulkan/fence.h b/render/vulkan/fence.h
new file mode 100644
index 0000000..34af87d
--- /dev/null
+++ b/render/vulkan/fence.h
@@ -0,0 +1,19 @@
+#ifndef VKFENCE_H
+#define VKFENCE_H
+
+#include "device.h"
+#include <rune/util/types.h>
+#include <vulkan/vulkan.h>
+
+struct vkfence {
+ VkFence handle;
+ int signal;
+};
+
+struct vkfence* create_vkfence(struct vkdev *dev, uint8_t signal);
+void destroy_vkfence(struct vkfence *fence, struct vkdev *dev);
+
+uint8_t fence_lock(struct vkfence *fence, struct vkdev *dev, uint64_t timeout);
+void fence_unlock(struct vkfence *fence, struct vkdev *dev);
+
+#endif