Hi!
Apparantly OpenGL can't do what I want. What about Mantle? I'm on mobile so I'll just copy&paste the original question here from OpenGL Discussion and Help Forums:
I would like to do onscreen and offscreen rendering in parallel. The onscreen job is relatively fast (e.g. 3 ms / frame). The offscreen job is relatively slow (e.g. 100 ms / frame). Both happen periodically, but only the onscreen job is strictly time critical (locked to refresh rate). The offscreen job is updating data for the onscreen job, but it doesn't matter if it takes a little bit more or less time to get it done.
Continuing with example values:
With a 144 Hz screen the frame period is 6,94 ms. That leaves an excess of 3,94 ms of GPU time per onscreen frame.
Is it possible to utilize that excess GPU time to continue the offscreen rendering job in the background without disrupting the onscreen rendering (i.e. time sharing)? I'd also be fine with any kind of fixed computing resource partitioning.
A CPU world analog would be doing the work in realtime priority foreground and low priority background threads without caring if it's actually getting done on two separate cores or on one context switching core.
All I can think of is using a frame queue. Unfortunately I need to avoid extra latency. Also on average I would need to store 100 / 6.94 = 14.4 frames. At 1080p that's 117 MB memory wasted.