KilnGraphics / Blaze4D

Minecraft but with Vulkan.
GNU Lesser General Public License v3.0
270 stars 12 forks source link

New DMA transfer system #32

Closed CodingRays closed 2 years ago

CodingRays commented 3 years ago

This is my proposed DMA system to replace most of our current memory transfer operations.

Any user should call the system in 3 steps:

  1. Pass ownership of any buffers / images to the dma system using the acquire operations. This is necessary for any resources that are allocated using the exclusive flag set. But even for resources that have the shared flag set this is necessary because the DMA system may reorder or otherwise optimize transfers so it is important to have a proper start and end of ownership.
  2. Call one or multiple transfer functions. These functions will record all transfer requests and execute them asynchronously and in a hopefully optimized manner.
  3. Reclaim ownership of resources by calling the release functions.

All of this happens asynchronously so these functions will never block.

Its probably going to take a while to implement this so i wanted to make sure that i have this draft up as early as possible so that i dont start work on things that wouldnt work well with the engine.

ColdIce1605 commented 2 years ago

And ded