generated from engine3d-dev/conan-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
Overview
The graphics pipeline relies on the setup of vk::shader_resource. I was considering to have a helper function that can automate setting up these parameters.
By Vulkan specification, a graphics pipeline requires that it needs to shader resources to be specified. Shader modules, vertex attributes, binding attributes, and descriptor layouts to be provided up front.
By providing this API, it can be used to simplify the need to specify parameters required for the graphics pipeline parameters specification to be constructed correctly.
Idea for API
Here are what the parameter setup looks like without it:
vk::pipeline_settings pipeline_configuration = {
.renderpass = main_renderpass,
.shader_modules = geometry_resource.handles(),
.vertex_attributes = geometry_resource.vertex_attributes(),
.vertex_bind_attributes = geometry_resource.vertex_bind_attributes(),
.descriptor_layouts = layouts
};
vk::pipeline main_pipeline(m_device, pipeline_configuration);
// then do stuff with it afterwardsHere is what it looks like with it:
// get_pipeline_configuration(const VkRenderPass&, const shader_resource& p_resource, const descriptor_layout& p_layout);
vk::pipeline_settings pipeline_configuration = vk::get_pipeline_configuration(main_renderpass, geometry_resource, layouts);
vk::pipeline main_pipeline(m_device, pipeline_configuration);Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers