From 5e3bb454d50091e581d5d1d03af34e38277694b3 Mon Sep 17 00:00:00 2001 From: ladevieq Date: Thu, 12 Jan 2023 00:47:59 +0100 Subject: WIP new rendering api --- include/api-test/command-buffer.hpp | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 include/api-test/command-buffer.hpp (limited to 'include/api-test/command-buffer.hpp') 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 + +#include + +#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 buffer_handle, ::handle texture_handle); +}; -- cgit v1.3