aboutsummaryrefslogtreecommitdiffstats
path: root/include/api-test/command-buffer.hpp
diff options
context:
space:
mode:
authorladevieq <ladevie.quentin@gmail.com>2023-01-12 00:47:59 +0100
committerladevieq <ladevie.quentin@gmail.com>2023-01-12 00:47:59 +0100
commit5e3bb454d50091e581d5d1d03af34e38277694b3 (patch)
tree06eada2111afb56a24d0ced89685587400041c8d /include/api-test/command-buffer.hpp
parentb47e177898657e435cb5bc913a4a783fddbe1f3d (diff)
WIP new rendering api
Diffstat (limited to 'include/api-test/command-buffer.hpp')
-rw-r--r--include/api-test/command-buffer.hpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/include/api-test/command-buffer.hpp b/include/api-test/command-buffer.hpp
new file mode 100644
index 0000000..140a291
--- /dev/null
+++ b/include/api-test/command-buffer.hpp
@@ -0,0 +1,44 @@
+#pragma once
+
+#include <cstdint>
+
+#include <vulkan/vulkan_core.h>
+
+#include "handle.hpp"
+
+enum class QueueType : uint32_t {
+ GRAPHICS,
+ ASYNC_COMPUTE,
+ TRANSFER,
+ MAX,
+};
+
+
+struct device_buffer;
+struct device_texture;
+
+struct command_buffer {
+ void start() const;
+ void stop() const;
+
+ void barrier();
+
+ VkCommandBuffer handle;
+ QueueType queue_type;
+};
+
+struct graphics_command_buffer : public command_buffer {
+ void set_pipeline();
+
+ void dispatch();
+};
+
+struct compute_command_buffer : public command_buffer {
+ void set_pipeline();
+
+ void dispatch();
+};
+
+struct transfer_command_buffer : public command_buffer {
+ void copy(::handle<device_buffer> buffer_handle, ::handle<device_texture> texture_handle);
+};