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 547 forks source link

Update API object mutability according to external synchronization requirements in Vulkan #3553

Closed kvark closed 3 years ago

kvark commented 3 years ago

The external sync in these objects almost allows us to simplify the implementations, but not really. So it's sort of a waste, but there is no reason to diverge from Vulkan here. This allows our backends to do less locking! 🎉

Fixes #3551 PR checklist:

kvark commented 3 years ago

Just implemented the changes to descriptor writes, and I'm seeing it working very well on DX12 at least. We had all of Cell, RefCell, and UnsafeCell used there, and this is now gone for good! I believe we can also refactor Metal to avoid locking now on descriptor binding.

kvark commented 3 years ago

bors r=cwfitzgerald

bors[bot] commented 3 years ago

Build succeeded: