Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce GPUDriver bitmap copy overhead #475

Open
SupinePandora43 opened this issue Jul 25, 2023 · 0 comments
Open

Reduce GPUDriver bitmap copy overhead #475

SupinePandora43 opened this issue Jul 25, 2023 · 0 comments

Comments

@SupinePandora43
Copy link

SupinePandora43 commented Jul 25, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant