gfx-rs / gfx

[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
http://gfx-rs.github.io/
Apache License 2.0
5.35k stars 549 forks source link

[vk] Device creation refactor #3654

Closed tangmi closed 3 years ago

tangmi commented 3 years ago

This PR is a refactor of the logical device creation code. The intention is to make it simpler and less error-prone to add feature/extension usage to the Vulkan backend by consolidating and re-using some of the logic.

PR checklist:

tangmi commented 3 years ago

@kvark Apologies for the large PR! Since a lot of this PR is code moving around, I tried to move the move the files in separate commits as well as add comments in this PR to help point out where blocks within the file moved around. Hopefully this makes it easier to read--please let me know if there's anything else I can do to help legibility!

kvark commented 3 years ago

This makes sense! I noticed that the lib.rs had grown too big, and I'm happy to see all the physical device related stuff consolidated nicely now.

Reviewing this is hard, so there might be issues in there, which we discover later, but that's ok. bors r+

bors[bot] commented 3 years ago

Build succeeded:

tangmi commented 3 years ago

[...] there might be issues in there, which we discover later, but that's ok.

Don't hesitate to ping me on these issues--I'll try my best to support this code.