Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow vertex buffer binding when they are used disregarding implicit buffer index #2222

Merged
merged 3 commits into from
May 4, 2024

Conversation

aitor-lunarg
Copy link
Collaborator

Fixes #1609

Due to how MoltenVK decides when a buffer can be bound based on its requirements for the implicit buffer, if the application uses all bindings, implicit buffer index will be uint max. This lead to used buffers not being bound.

I did not test with the application mentioned in #1592 so if someone with the set up ready to test could, it would be great.

Although this change fixes the issue, it's a partial fix. I will create a new issue to discuss some concerns about the whole vertex input attachment architecture, since I do believe we would benefit from a rework of the system (I may be wrong tho). Haven't created a PR with a proof of concept since it'll require a considerable time investment I cannot afford currently.

…index

Due to how MoltenVK decides when a buffer can be bound based on
its requirements for the implicit buffer, if the application uses
all bindings, implicit buffer index will be uint max. This lead
to used buffers not being bound.
Copy link
Contributor

@billhollings billhollings left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of this.

LGTM. Just one minor naming change request.

MoltenVK/MoltenVK/GPUObjects/MVKPipeline.h Outdated Show resolved Hide resolved
Copy link
Contributor

@billhollings billhollings left a comment

Choose a reason for hiding this comment

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

I've gone ahead and made the naming change I suggested, so we can get this into the upcoming SDK.

MoltenVK/MoltenVK/GPUObjects/MVKPipeline.h Outdated Show resolved Hide resolved
MoltenVK/MoltenVK/GPUObjects/MVKPipeline.h Outdated Show resolved Hide resolved
Renamed _maxVertexInputBindingBufferCount to kMVKMaxVertexInputBindingBufferCount.
Renamed _maxVertexInputBindingBufferCount to kMVKMaxVertexInputBindingBufferCount.
@billhollings billhollings merged commit 75fb949 into KhronosGroup:main May 4, 2024
6 checks passed
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.

Vertex attributes missing from attribute array (regression)
2 participants