Skip to content

vulkan/gpu_tex: only use host transfers if ReBAR is enabled

Or if the texture to be allocated is substantially below the size of the host-visible area (giving enough headroom for 1024 such textures).

In a perfect world, we could instead rely on the malloc layer to either give us a host-visible memory allocation or not, and then opportunistically use host transfers when possible, but this is far more annoying to implement because we need to first create the image (settling the usage flags) before we know what memory types would be supported for it. So we would need to create an image, query its memory types, then destroy it again and recreate it without the host allocation flag, and then again possibly reallocate the image. Which is a lot of work for no substantial gain.

Merge request reports

Loading