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

Image-less framebuffer API #3571

Closed kvark closed 3 years ago

kvark commented 3 years ago

Fixes #3568 It will also solve the annoying validation error about Vulkan framebuffers being destroyed - #3015. Even though we still rely on the "acquire" to actually make the image available, the framebuffers in Vulkan are going to be more solid and persistent. No creation/removal each frame any more! 🎉 🚀

kvark commented 3 years ago

I think this is ready for review/landing! Interestingly, the refactor on GL ended up without as much boilerplate as I feared. I figured there is no need to maintain any caches of framebuffers, since we can mutate existing ones. That nails down pretty much the only concern I had with the change, and I'm very happy to see what it came to be, after so much experimentation and wasted code!

kvark commented 3 years ago

@manugildev thank you for taking a look! bors r=manugildev

bors[bot] commented 3 years ago

Build failed:

kvark commented 3 years ago

bors r=manugildev

bors[bot] commented 3 years ago

Build succeeded: