aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorladevieq <ladevie.quentin@gmail.com>2021-01-11 23:16:49 +0100
committerladevieq <ladevie.quentin@gmail.com>2021-01-11 23:16:49 +0100
commit18dd6722d1c4b14dfe322b036b6e4fa1281b4712 (patch)
tree09dd829a5bdf4f4e69f6d2b66d58584c182c42a7 /include
parent843dbf7d8dca95883e563d3ba5c20d6b1ee7fd90 (diff)
Path tracer write to the swapchain image
Diffstat (limited to 'include')
-rw-r--r--include/vk-renderer.hpp18
-rw-r--r--include/vulkan-loader.hpp1
2 files changed, 8 insertions, 11 deletions
diff --git a/include/vk-renderer.hpp b/include/vk-renderer.hpp
index 32d661c..0ca4da4 100644
--- a/include/vk-renderer.hpp
+++ b/include/vk-renderer.hpp
@@ -31,19 +31,12 @@ struct input_data {
uint32_t height;
};
-struct path_tracer_data {
- struct input_data inputs;
- color first_pixel;
-};
-
class vkrenderer {
public:
vkrenderer(window& wnd);
void compute(const input_data& inputs, size_t width, size_t height);
- const color* const output_image();
-
private:
void create_instance();
@@ -65,11 +58,14 @@ class vkrenderer {
void create_semaphores();
+ public:
+ void initialization_frame();
+
void select_physical_device();
void select_compute_queue();
- void fill_descriptor_set(const input_data& data, size_t width, size_t height);
+ void fill_descriptor_set(const input_data& data);
uint32_t compute_queue_index;
@@ -85,9 +81,9 @@ class vkrenderer {
VkCommandBuffer command_buffer;
VkDescriptorPool descriptor_pool;
- VkDescriptorSet compute_shader_input_set;
+ VkDescriptorSet compute_shader_set;
- VkDescriptorSetLayout compute_shader_input_layout;
+ VkDescriptorSetLayout compute_shader_layout;
VkPipelineLayout compute_pipeline_layout;
VkPipeline compute_pipeline;
@@ -101,7 +97,7 @@ class vkrenderer {
std::vector<VkImageView>swapchain_images_views;
uint32_t current_image_index;
- struct path_tracer_data* mapped_data;
+ struct input_data* mapped_data;
};
#endif // !__VK_RENDERER_HPP_
diff --git a/include/vulkan-loader.hpp b/include/vulkan-loader.hpp
index 66542cf..d993f5a 100644
--- a/include/vulkan-loader.hpp
+++ b/include/vulkan-loader.hpp
@@ -90,6 +90,7 @@
X(vkCmdDispatch) \
X(vkCmdEndRenderPass) \
X(vkEndCommandBuffer) \
+ X(vkResetCommandBuffer) \
X(vkCreateRenderPass) \
X(vkCreateBuffer) \
X(vkCreateImage) \