diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2023-01-12 00:47:59 +0100 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2023-01-12 00:47:59 +0100 |
| commit | 5e3bb454d50091e581d5d1d03af34e38277694b3 (patch) | |
| tree | 06eada2111afb56a24d0ced89685587400041c8d /include/api-test/command-buffer.hpp | |
| parent | b47e177898657e435cb5bc913a4a783fddbe1f3d (diff) | |
WIP new rendering api
Diffstat (limited to 'include/api-test/command-buffer.hpp')
| -rw-r--r-- | include/api-test/command-buffer.hpp | 44 |
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); +}; |
