Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upCPU thread can run ahead of GPU thread too much #23
Comments
taisel
self-assigned this
Jan 26, 2016
taisel
added
the
bug
label
Jan 26, 2016
taisel
changed the title from
CPU thread can run ahead of GPU thread
to
CPU thread can run ahead of GPU thread too much
Jan 26, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
taisel
Jan 26, 2016
Owner
We specifically designed around the cpu emulation running in parallel and slighty ahead of the gpu emulation, but we need to set hard limits. We do have a limit, but it's the size of the command buffer queue, which should really never ever be filled fully ever. I'd say 2 frames worth of counter incrementation is a nice hard limit we should add.*
*I say 2 and not 1 because we support triple buffering by design.
|
We specifically designed around the cpu emulation running in parallel and slighty ahead of the gpu emulation, but we need to set hard limits. We do have a limit, but it's the size of the command buffer queue, which should really never ever be filled fully ever. I'd say 2 frames worth of counter incrementation is a nice hard limit we should add.* *I say 2 and not 1 because we support triple buffering by design. |
taisel commentedJan 26, 2016
We need to add a check to futexWait the emulation core thread if the gfx thread is reporting a line counter lagging too far behind the command buffer's own line counter value. I haven't seen this issue happen at all, because CPU emulation is more heavyweight than the graphics thread, but I just want to add this check to be safe due to how it theoretically can occur.