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

Fix Vulkan validation issue with uniform shader memory barriers #533

Merged
merged 1 commit into from Mar 30, 2024

Conversation

opticfluorine
Copy link
Contributor

My previous pull request #530 accidentally introduced a Vulkan validation error (sorry about that). This pull request resolves the Vulkan validation error by adjusting the scope of uniform buffer copies to comply with the Vulkan spec. The behaviors of all other buffer copies are unchanged.

Specifically, this changes the destination operation in the memory barrier to cover all shader types instead of reading the vertex input (the Vulkan spec only allows combining UNIFORM_READ_BIT with the shader scopes, not with the vertex input scope). It also removes VertexAttributeRead as a destination access mask for uniform buffers as that combination is not permitted by the spec.

Altogether, this treats the copy to a uniform buffer in a separate way from other buffer copies in such a way that ensures correct order of operations when a uniform buffer is updated, while also remaining compliant with the Vulkan spec.

@smoogipoo smoogipoo merged commit 37ab5ee into veldrid:master Mar 30, 2024
1 check 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.

None yet

2 participants