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

crash when rendering wireframe with vulkan backend #174

Open
aclysma opened this issue Aug 7, 2021 · 0 comments
Open

crash when rendering wireframe with vulkan backend #174

aclysma opened this issue Aug 7, 2021 · 0 comments

Comments

@aclysma
Copy link
Owner

aclysma commented Aug 7, 2021

The wireframe rendering codepath uses the same descriptor for set 0 as the depth shader. This was intended to work because they create the same descriptor set layout, and it works on the metal backend. However, vulkan fails, maybe because the deduplication is not working. This hashing/deduplication is supposed to happen in resource_lookup.rs, but that was designed before rafx_api and RafxRootSignature was a thing. We may need to move deduplication to happen in rafx_api.

(This became a crash in 2afe8fb but it was throwing validation errors before this)

The most straightforward but suboptimal fix is to create wireframe-specific descriptor sets and bind them. This means more descriptor sets, and prevents reusing them. Another approach would be to revisit how we handle descriptor set layouts and pipeline layouts to ensure that descriptor sets created for the depth shader are compatible with the wireframe shader. (This is broken in vulkan but metal works.)

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

No branches or pull requests

1 participant