Skip to content

Simplify binding descriptor sets.#111

Merged
crud89 merged 2 commits intomainfrom
bind-to-default-pipeline
Dec 20, 2023
Merged

Simplify binding descriptor sets.#111
crud89 merged 2 commits intomainfrom
bind-to-default-pipeline

Conversation

@crud89
Copy link
Copy Markdown
Owner

@crud89 crud89 commented Dec 20, 2023

Describe the pull request

This PR simplifies binding descriptor sets. Previously the pipeline that consumes the descriptor sets had to be explicitly provided every time a descriptor set was bound. With the new overload to ICommandBuffer::bind, the pipeline that has been passed to the last call to ICommandBuffer::use will be stored and used for binding. If no pipeline has been used before calling this overload, an error is raised. Those changes make it easier decouple resource binding from pipeline management and keeps the interface more in line with the other bind overloads that handle index and vertex buffers:

commandBuffer->use(geometryPipeline);
commandBuffer->bind(cameraBindings); // Equivalent to calling commandBuffer->bind(cameraBindings, geometryPipeline) in this case.

// Binding index and vertex buffers for comparison:
commandBuffer->bind(vertexBuffer);
commandBuffer->bind(indexBuffer);

@crud89 crud89 added Priority: Low A low priority issue. Vulkan 🌋 The issue involves the Vulkan backend. DX12 ❎ The issue involves the DX12 backend. labels Dec 20, 2023
@crud89 crud89 added this to the Alpha #04 milestone Dec 20, 2023
@crud89 crud89 self-assigned this Dec 20, 2023
@crud89 crud89 marked this pull request as ready for review December 20, 2023 15:52
@crud89 crud89 merged commit 2c8c1f9 into main Dec 20, 2023
@crud89 crud89 deleted the bind-to-default-pipeline branch December 20, 2023 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DX12 ❎ The issue involves the DX12 backend. Priority: Low A low priority issue. Vulkan 🌋 The issue involves the Vulkan backend.

Projects

Status: v0.4.1

Development

Successfully merging this pull request may close these issues.

1 participant