cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

snoukkis
Journeyman III

Can mantle partition a GPU for two workloads?

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.

0 Likes
1 Solution

Hi,

Mantle does not allow you to have multiple graphics queues with different priorities, however if one of your jobs (probably the real time task) can be done using compute only, then you could use the universal queue for your (low frequency) render job and use the asynchronous compute queue to prepare your real time data and present it to screen.

Regards,

Stephan

View solution in original post

0 Likes
2 Replies

Hi,

Mantle does not allow you to have multiple graphics queues with different priorities, however if one of your jobs (probably the real time task) can be done using compute only, then you could use the universal queue for your (low frequency) render job and use the asynchronous compute queue to prepare your real time data and present it to screen.

Regards,

Stephan

0 Likes

Thank you, that answers my question. I'll consider reimplemetation with asynchronous compute queue.

0 Likes