Transfer dynamic data without blocking render? #1121
-
Hello! Then dynamic data is changing, copying to GPU memory is done in render thread. But is there any way to transfer data without blocking main render thread? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The design of vsg::TransferTask is meant to ensure that the data is robustly copied to the GPU and available when required, if you drop the synchronization then you can end up consuming data before it's been updated. The design of TransferTask is also meant for modest amounts of data, it scales pretty well to pretty large amounts of data. There is also multi-buffering done by TransferTask to ensure updates on the CPU and copied to the GPU data at the correct time, otherwise you can end up with values from the wrong frame being consumed on the GPU. If you don't want the safety that TransferTask provides then you can implement your own copying of data to the GPU, all the code is there available. What is the best solution for your application is something I can't advise upon as you have provide any details why you want data to transfer without blocking, or what the data is being used for etc. It may be that you are trying to do something in a way that is entirely inappropriate. |
Beta Was this translation helpful? Give feedback.
The design of vsg::TransferTask is meant to ensure that the data is robustly copied to the GPU and available when required, if you drop the synchronization then you can end up consuming data before it's been updated.
The design of TransferTask is also meant for modest amounts of data, it scales pretty well to pretty large amounts of data.
There is also multi-buffering done by TransferTask to ensure updates on the CPU and copied to the GPU data at the correct time, otherwise you can end up with values from the wrong frame being consumed on the GPU.
If you don't want the safety that TransferTask provides then you can implement your own copying of data to the GPU, all the code is there avail…