CPU thread can run ahead of GPU thread too much #23

Closed
taisel opened this Issue Jan 26, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@taisel
Owner

taisel commented Jan 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.

@taisel taisel self-assigned this Jan 26, 2016

@taisel taisel added the bug label Jan 26, 2016

@taisel 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

@taisel

This comment has been minimized.

Show comment
Hide comment
@taisel

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.

Owner

taisel commented Jan 26, 2016

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 taisel closed this Jan 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment