aboutsummaryrefslogtreecommitdiffstats
path: root/include/compute-renderpass.hpp
diff options
context:
space:
mode:
authorladevieq <ladevie.quentin@gmail.com>2022-02-14 12:45:52 +0100
committerladevieq <ladevie.quentin@gmail.com>2022-02-14 12:45:52 +0100
commitf582eb80d73a1d0b735503c8894636782406228c (patch)
treec4eb2da956a5b8977c8796b5fe25725ff518a23f /include/compute-renderpass.hpp
parentbbb45f80298dc4a41d31805416bad19363c8eff8 (diff)
High level buffer class
Diffstat (limited to 'include/compute-renderpass.hpp')
-rw-r--r--include/compute-renderpass.hpp29
1 files changed, 6 insertions, 23 deletions
diff --git a/include/compute-renderpass.hpp b/include/compute-renderpass.hpp
index 39cbf79..a581930 100644
--- a/include/compute-renderpass.hpp
+++ b/include/compute-renderpass.hpp
@@ -1,32 +1,11 @@
#pragma once
+#include "renderpass.hpp"
#include "vk-api.hpp"
#include <array>
class Texture;
-class Renderpass {
- public:
-
- Renderpass(vkapi& api)
- :api(api)
- {};
-
- virtual ~Renderpass() {
- api.destroy_pipeline(pipeline);
- }
-
- void set_pipeline(pipeline pipeline) {
- this->pipeline = pipeline;
- }
-
- // TODO: Do not use vulkan api type
- virtual void execute(VkCommandBuffer command_buffer) = 0;
-
- protected:
- vkapi &api;
-
- pipeline pipeline;
-};
+class Buffer;
class ComputeRenderpass : public Renderpass {
public:
@@ -35,12 +14,16 @@ class ComputeRenderpass : public Renderpass {
: Renderpass(api)
{}
+
+ void set_pipeline(std::string& shader_name) override final;
+
void set_dispatch_size(size_t count_x, size_t count_y, size_t count_z);
void set_ouput_texture(Texture* ouput_texture);
void set_constant(off_t offset, uint64_t* constant);
void set_constant(off_t offset, Texture* texture);
+ void set_constant(off_t offset, Buffer* buffer);
// TODO: Do not use vulkan api type
void execute(VkCommandBuffer command_buffer) override final;