Are OpenGL API calls cached/executed on a delay on the GPU?
I'm wondering if the driver waits for stuff to complete before returning API calls or if it has some kind of separate thread that handles calls made to the driver asynchronously?
The reason I'm asking this is because I want to know if it's better to cache any calls to OpenGL (non-rendering) CPU side and flush them all at once just before rendering or not.
For example: I want to update some SSBO that holds material properties. The rendering of the "previous" frame might still be ongoing at this point (AFAIK drawcalls return immediately, they don't wait until the GPU is done), meaning that if the GPU stalls the CPU thread until it's safe to update the material property SSBO, I'd be better off caching such operations in RAM, and just last-minute update everything on the GPU before starting to issue drawcalls.
But if OpenGL does this internally, I'd just be using up RAM for nothing...
Posted Jan 2, 2023, 5:52 AM UTC