Hey everyone, I am trying to figure out how to handle async/background thread resource uploading, and performing queue family transfer operations between transfer family and graphics family queues.
Assuming transfer queue family != graphics queue family, and that there is a timeline semaphore that is incremented every time a unique resource (or batch of resources) is uploaded
My idea is as follow for e.g. uploading a mesh (this is a single copy, but imagine they could be batched).
- Allocate host visible buffer
- Copy host memory to host visible buffer
- Get transfer command buffer
- buffermemorybarrier the copy
- put copy in cmd buf
- buffermemorybarrier the transfer
- Queue submit, waiting on last timeline semaphore, and signaling next semaphore
My question is, what is the best way to submit the graphics queue transfer operations?
- Do I need to batch all of the destination queue family transfers into a single pipeline barrier on the graphics queue?
- Can I simply submit a single queue family transfer to the graphics queue, waiting on the timeline semaphore? Would any following graphics queue submit be blocked by those barriers since they are read in-order?
I'm still trying to wrap my head around everything, so maybe I have made some mistakes here