Mir lacks a direct rendering ("bypass") mode

Bug #1109963 reported by Daniel van Vugt on 2013-01-30
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Fix Released
Daniel van Vugt
mir (Ubuntu)

Bug Description

Mir lacks a direct rendering mode.

Direct rendering means when a surface is full screen, the app is allowed to render directly to the framebuffer and bypass the compositor. This is a critical requirement for gaming performance. We did this in Compiz and it's the reason why Ubuntu went from just about the slowest distro for gaming in 12.10 to the fastest in recent benchmarks of 13.04. (In compiz, it's known as "Unredirected Fullscreen Windows").

Related branches

Daniel van Vugt (vanvugt) wrote :

The really fancy part is how GLX implements this with multiple monitors. You can have a single framebuffer for all your monitors and yet one of them could be rendered directly bypassing the compositor if it's covered by a fullscreen window. How this was achieved is documented in the paper "System Support for OpenGL Direct Rendering (1995)": http://citeseerx.ist.psu.edu/viewdoc/summary?doi=

Daniel van Vugt (vanvugt) wrote :

Bumped to critical. Just to remind everyone that Ubuntu can not and must not use Mir on the desktop until this is resolved.

Changed in mir:
importance: High → Critical
importance: Critical → High
Daniel van Vugt (vanvugt) wrote :

Actually, that was an overreaction. It's high. But comment #2 still applies.

Daniel van Vugt (vanvugt) wrote :

See also bug 1110079.

Chris Halse Rogers (raof) wrote :

There are quite a lot of moving parts to this, ranging in difficulty from an estimated ‘pretty easy’ to ‘blocked until we're running a Mir session compositor under a Mir system compositor’.

The first step would be for the system compositor to not composite when there's no need to - which should be all the time when there's not an active transition occurring. That's the easy one.

Then we have the X server copy-to-Mir overhead. We can't reasonably remove this¹ because X's rendering model is persistent. Once we're running under a Mir session compositor we can run XMir without a root window and have each X window backed by its own Mir surface. For GL clients this would allow us to pass the Mir buffer all the way through DRI2, eliminating X's buffer copy.

¹: Although we could optimise it somewhat by Mir telling the client how old the buffer its receiving is. Then XMir could track damage between frames, and only copy the diff.

Changed in mir:
status: New → Triaged
Kevin DuBois (kdub) wrote :

as for android+this bug...
We have control over the framebuffer objects, so this should be possible. We have to write a native window type (or adapt the current one to use framebuffers instead of standard buffers) for the compositor to use in process. We currently sit on top of a small nugget of android code (from about GB) that is an android native window type backed by framebuffers. We will probably have to take into consideration the HWC layer

information type: Proprietary → Public
Changed in mir:
assignee: nobody → Kevin DuBois (kdub)
milestone: none → 0.0.4
status: Triaged → In Progress
Changed in mir:
status: In Progress → Triaged
assignee: Kevin DuBois (kdub) → nobody
summary: - Mir lacks a direct rendering mode
+ Mir lacks a direct rendering ("bypass") mode
Changed in mir:
milestone: 0.0.4 → 0.0.5
Changed in mir:
milestone: 0.0.5 → 0.0.6
kevin gunn (kgunn72) on 2013-06-28
Changed in mir:
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in mir:
status: Triaged → In Progress
Changed in mir:
milestone: 0.0.6 → 0.0.7
kevin gunn (kgunn72) on 2013-07-10
Changed in mir:
importance: High → Critical
Changed in mir:
milestone: 0.0.7 → 0.0.8
Changed in mir:
milestone: 0.0.8 → 0.0.9
Changed in mir:
milestone: 0.0.9 → 0.0.10
Changed in mir:
milestone: 0.0.10 → 0.0.11
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.0.11

Changed in mir:
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mir - 0.0.10+13.10.20130829-0ubuntu1

mir (0.0.10+13.10.20130829-0ubuntu1) saucy; urgency=low

  [ Daniel van Vugt ]
  * Add "composition bypass" support, whereby fullscreen surfaces are
    allowed to go straight to the display hardware without being
    composited at all, hence avoiding the overhead of any OpenGL or
    texturing where possible. Hardware support: intel: Excellent radeon:
    Good, but REQUIRES kernel 3.11.0 nouveau: Good, but REQUIRES kernel
    3.11.0 android: No bypass implemented yet. (LP: #1109963)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 1033
 -- Ubuntu daily release <email address hidden> Thu, 29 Aug 2013 10:04:53 +0000

Changed in mir (Ubuntu):
status: New → Fix Released
kevin gunn (kgunn72) on 2013-08-30
Changed in mir:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers