KhronosGroup / MoltenVK

MoltenVK is a Vulkan Portability implementation. It layers a subset of the high-performance, industry-standard Vulkan graphics and compute API over Apple's Metal graphics framework, enabling Vulkan applications to run on macOS, iOS and tvOS.
Apache License 2.0
4.63k stars 402 forks source link

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

Closed aitor-lunarg closed 2 months ago

aitor-lunarg commented 2 months ago

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.