Skip to content

Commit

Permalink
[*] WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
IAmNotHanni committed Nov 19, 2023
1 parent 160d7bf commit 24ca21c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ namespace inexor::vulkan_renderer::wrapper::pipelines {
// TODO: ComputePipelineBuilder

/// Builder class for VkPipelineCreateInfo for graphics pipelines which use dynamic rendering
/// @note This builder pattern does not perform any checks which are already covered by validation layers.
/// This means if you forget to specify viewport for example, creation of the graphics pipeline will fail.
/// It is the reponsibility of the programmer to use validation layers to check for problems.
class GraphicsPipelineBuilder {
private:
/// The device wrapper reference
Expand Down
2 changes: 2 additions & 0 deletions src/vulkan-renderer/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,8 @@ void Application::setup_render_graph() {
.offset = offsetof(OctreeGpuVertex, color),
},
})
.set_viewport(m_swapchain->extent())
.set_scissor(m_swapchain->extent())
.add_shader(*m_vertex_shader)
.add_shader(*m_fragment_shader)
.build("Octree");
Expand Down
1 change: 0 additions & 1 deletion src/vulkan-renderer/render-graph/render_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ std::weak_ptr<BufferResource> RenderGraph::add_buffer(std::string name, const Bu
}

void RenderGraph::add_graphics_stage(std::shared_ptr<GraphicsStage> graphics_stage) {
// This way, the constructor arguments of GraphicsStage class can be passed into add_graphics_stage directly
m_graphics_stages.push_back(std::move(graphics_stage));
}

Expand Down
3 changes: 2 additions & 1 deletion src/vulkan-renderer/wrapper/pipelines/pipeline_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ GraphicsPipelineBuilder &GraphicsPipelineBuilder::add_shader(const wrapper::Shad
return add_shader(make_info<VkPipelineShaderStageCreateInfo>({
.stage = shader.type(),
.module = shader.module(),
.pName = shader.name().c_str(),
.pName = shader.entry_point().c_str(),

}));
}

Expand Down

0 comments on commit 24ca21c

Please sign in to comment.