Skip to content

feat: make pipeline, pipeline layout, and descriptor abstraction#17

Open
gituser12981u2 wants to merge 6 commits into
feat/tri_rendererfrom
feat/pipeline_abstraction
Open

feat: make pipeline, pipeline layout, and descriptor abstraction#17
gituser12981u2 wants to merge 6 commits into
feat/tri_rendererfrom
feat/pipeline_abstraction

Conversation

@gituser12981u2

Copy link
Copy Markdown
Owner

Made abstractions for pipeline, pipeline layout, and descriptor.

graphics pipeline (combination of pipeline and pipeline layout) and pipeline layout have their own registries and the graphics pipeline registry takes in a pipeline and pipeline layout into the registry slot.

Triangle renderer also got updated to use the abstraction.

I didn't abstract somethings yet, like VkPushConstants, even though these should be abstracted eventually.

@alexcu2718

Copy link
Copy Markdown
Collaborator

I hope I fixed the GCC/MSVC issues, apple strikes again.

Was a minor patch to help me review.

@gituser12981u2

Copy link
Copy Markdown
Owner Author

I hope I fixed the GCC/MSVC issues, apple strikes again.

Was a minor patch to help me review.

Thanks chap.


namespace quark::vk::details {

struct DescriptorSetLayoutHandleTag;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gonna be having FactoryFactories soon bro.


for (const DescriptorBindingDesc &binding : ci.desc.bindings) {
QUARK_ENSURE(
binding.type != VK_DESCRIPTOR_TYPE_MAX_ENUM,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this TYPE_MAX_ENUM

quark_backend_vulkan_pipeline STATIC
graphics_pipeline_bundle.cpp graphics_pipeline_registry.cpp
graphics_pipeline.cpp pipeline.cpp pipeline_layout.cpp)
graphics_pipeline.cpp graphics_pipeline_registry.cpp pipeline.cpp

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

phd in cmake my boy

return out;
}
util::Status GraphicsPipeline::create(const CreateInfo &ci) {
QUARK_ENSURE(ci.desc != nullptr, QUARK_ERR(util::Errc::InvalidArg,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the use of the abstraction,

layout_.destroy();
GraphicsPipelineView GraphicsPipeline::view() const noexcept {
return GraphicsPipelineView{
.handle = handle_,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sexy API

@alexcu2718 alexcu2718 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I think it's berry good, maybe even a strawberry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants