Reduce GPUDriver bitmap copy overhead
SupinePandora43 opened this issue · 0 comments
SupinePandora43 commented
Use Surface
instead of Bitmap
in GPUDriver to support partial updates and custom surfaces.
Custom surface with mapped video driver memory can be used to further improve efficiency by being a direct source of vkCmdCopyBufferToImage
/CopyTextureRegion
.
Currently, in Vulkan, 2 full-size copies have to be made in {Create/Update}Texture
calls: first from bitmap to driver's ram "staging" buffer, and second from this buffer to vram.
(From my understanding, vulkan can also use existing memory pointer (bitmap's locked pixels) with VK_EXT_EXTERNAL_MEMORY_HOST
extension, but I haven't reached it yet).
What I propose will not only make these copies partial, but also remove 1 copy completely.