Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added more accurate GPU Timing #505

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RuffledPlume
Copy link

Problem:

From doing GPU Captures & Traces, I've noticed that adding the GPU Markers together doesn't paint the full picture of how long a frame is being drawn. GPU Idle time,

Solution:
Added new Timer: RENDER_FRAME, to capture the time between PostDrawScene() & the Submit in Draw().

Caveat:
This does mean it'll capture the GPU Idle time between the compute & submit, but overall I've found this to be more accurate when testing changes.

Since GPUTime is used to calculate an estimated FPS, adding up all the timers doesn't paint the full picture.
Instead a new timer has been added: RENDER_FRAME
This timer is added at the start of postDrawScene() & ends just before the submit.

(cherry picked from commit 4c4de7b)
FrameTimerOverlay::render() takes around 0.5 ms, account for this in the CPU time
glGetError() is costly to call, around 0.2 ms so whilst the FrameTimer is open suppress the function
@RuffledPlume
Copy link
Author

Noticed that both checkGlError() & rendering the FrameTimerOverlay were adding almost a whole millisecond to the CPU timer, both of these are only ever opened in developer builds, so we should try to remove them whilst the UI is opened

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant