Open Bug 1567511 Opened 5 years ago Updated 2 years ago

Very noisy GPU times

Categories

(Core :: Graphics: WebRender, task, P3)

task

Tracking

()

People

(Reporter: nical, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

This isn't necessarily a bug, but it's something I've been observing for a while and I'd like to better understand:

I often get very noisy GPU times with WebRender's builtin profiler and GPU queries. Usually with frames that have almost the same shader times as the previous ones except that the whole frame is twice (-ish) longer and a single shader is "stretched" (reportedly taking a long time) compared to the previous frame.

I'm not certain but it looks like these longer frames tend to correlate with scene builds.

Two things come to mind:

  • these "stretched" samples are actually stalls caused by uploads or allocations that end up reported in some random-ish shader's ellapsed time.
  • these "stretched" samples are stalls caused by a fence we insert for the frame scheduling/throttling mechanism.

I'm seeing this behaviro on both nvidia and intel hardware.

Edit: actually I'm also getting a lot of variability in GPU times in situations where there is no scene building happening.

When issuing draw calls, we dynamically allocate instance buffers. The driver can do it quickly most of the time, but there are moments where it needs to reclaim previously freed buffers, allocate new memory, etc. This can be resolved by building the instance data up-front and not attempting to create or destroy any buffers during draw call submission.

Depends on: 1568158
Summary: GPU time spikes (after scene building?) → Very noisy GPU times
Blocks: wr-perf
Priority: -- → P3
Blocks: 1782834
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: