gfx-rs / portability

Vulkan Portability Implementation
Mozilla Public License 2.0
384 stars 25 forks source link

Faster bound resource expectation #115

Closed kvark closed 5 years ago

kvark commented 6 years ago

As our buffers and images are all stored as enum { Bound, Unbound }, it requires a match/branch on each and every access. This may show up in the profiles, even if a lower priority than using iterators everywhere. We need a build mode that avoids those branches and just transmutes the thing where it's expected.

msiglreith commented 6 years ago

The Bound <-> Unbound difference is nice for typesafety but will probably fall apart for sparse resources at some point. So we could merge those again or keep it in HAL and adjust it for portability in case we go with the BAL approach.

kvark commented 5 years ago

This is not a problem as of https://github.com/gfx-rs/gfx/pull/2518