yquake2 / ref_vk

Optional Vulkan renderer lib for Yamagi Quake II
Other
47 stars 10 forks source link

vma allocator introduction proposal. #23

Closed devnexen closed 2 years ago

devnexen commented 2 years ago

unused for now but could replace the actual various buffer instantiations.

0lvin commented 2 years ago

vma allocator had initially used and removed as part of https://github.com/yquake2/yquake2/pull/524. Currently VMA allocator is overkill in most of the cases and add c++ dependencies :-( . (619 lines vs 19558 lines)

If VMA allocator has some crucial features, we can try to port such functionality, e.g. https://github.com/yquake2/yquake2/pull/617, https://github.com/yquake2/yquake2/pull/625.

As i know we have not ported heuristic for search nearest memory type allocation, look to:

                // Calculate cost as number of bits from preferredFlags not present in this memory type.
                uint32_t currCost = VMA_COUNT_BITS_SET(preferredFlags & ~currFlags) +
                    VMA_COUNT_BITS_SET(currFlags & notPreferredFlags);

And currently code selects fully optimal or minimal possible memory type.

devnexen commented 2 years ago

oh I was right just "testing the water" then :-) I understand your concerns.