Open Bug 949692 Opened 6 years ago Updated 6 years ago

OpenGL compositing commands are suboptimal


(Core :: Graphics: Layers, defect)

Not set




(Reporter: BenWa, Unassigned)


(Depends on 1 open bug)



(3 files)

We often don't manage to composite within 15ms (even if upload was free). We tend the spend a lot of time waiting for the GPU to finish executing our commands stream. Looking at the commands we execute we have a lot of needless state change like switching program, toggling glScissor. Also we spend 0.1ms in every glDrawArrays.

Compare this to chrome' commands stream that looks to be nearly optimal for drawing tiles and they spend a lot less time in their glDrawElements.

Perhaps optimizing our command stream will let us spend less time in glSwapBuffers?
This trace is recorded on mac with tiling enabled (code we use on mobile) and apple client storage to optimize the texture uploads. Even with what appears to be a better upload path our drawing code is still at a disadvantage.
Attached file One frame of chrome
Here's a patch to composite without vsync non stop. This is useful for testing:
1) How was we can composite overall
2) How our worse case differs from our average case
3) How we perform compositing the same frames (where no upload has occured, similar to a video game). Test this in conjunction with 1+2.
Depends on: 956263
Depends on: 956266
Depends on: 956268
Depends on: 956272
You need to log in before you can comment on or make changes to this bug.