thatcosmonaut / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
1 stars 2 forks source link

Async readback API #13

Closed thatcosmonaut closed 1 month ago

thatcosmonaut commented 1 month ago

DownloadFromTexture and DownloadFromBuffer are now async and go inside a copy pass.

D3D11 decided to get in the way as usual - there does not appear to be any way to copy from a texture to a buffer on the GPU timeline. The best I could do was create a staging texture inside of the transfer buffer object, which gets mapped on the GetTransferData call. It's ugly but it works. Hopefully this workaround doesn't disrupt the transfer buffer direct mapping API I want to create.

Fixes #9

kg commented 1 month ago

Thanks for doing this!

flibitijibibo commented 1 month ago

Will leave most of the reviewing to Kate, but once the current changes are finished we should fill in Metal before merging.