Mir

DemoRenderer: GL_BLEND is really always enabled even when not required (also causes RGBX discolouration in mir_proving_server)

Bug #1423462 reported by Daniel van Vugt on 2015-02-19
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
Medium
Daniel van Vugt
mir (Ubuntu)
Medium
Unassigned

Bug Description

DemoRenderer: GL_BLEND is really always enabled, even when not required.

This is because DemoRenderer turns it on for shadows etc during tessellation. And that ends up applying to the whole glDrawArrays(), which is all primitives.

Related branches

Daniel van Vugt (vanvugt) wrote :

Trevinho reports RGBX surfaces are getting blended incorrectly. I think that would be this bug.

Daniel van Vugt (vanvugt) wrote :

On the other hand, that could also be related to: bug 1424909

Yeah, basically using sdl1.2, a both using an A*_8888 format and an X*_8888 format surface is blended anyway (here's what I mean http://i.imgur.com/VgM6Uyu.png).

By writing the alpha channel to 0xff by hand (with something like http://pastebin.ubuntu.com/10394442/), problem is fixed.

Daniel van Vugt (vanvugt) wrote :

I'm not sure OpenGL has any support for uploading RGBX/XRGB pixel data (extensions?). It only seems to support RGBA/ARGB etc. So for that reason we might have to drop support (or warn and deprecate) for software surfaces with 32-bit RGBX/XRGB.

We do indeed need to populate the alpha channel by hand. And I suggest that's better done in the client than a hack in Mir. So you should probably switch to RGBA/ARGB etc now.

Daniel van Vugt (vanvugt) wrote :

Ordinarily there should be zero overhead to setting the alpha channel to 0xff because you're usually writing your pixels in at least 32-bit chunks (or should be).

So I suggest looking at your source pixel data. Switch that to RGBA and you can remove the CPU-intensive hack.

tags: added: wrong-colours-on-screen
Changed in mir:
assignee: nobody → Daniel van Vugt (vanvugt)
Daniel van Vugt (vanvugt) wrote :

This is still a problem, now for Xmir. Xmir prefers RGBX_8888 type pixel formats, however when on screen the colours are weird with odd transparency. That's probably because mir_proving_server is using the X byte as alpha A, but X is uninitialized.

summary: DemoRenderer: GL_BLEND is really always enabled even when not required
+ (also causes RGBX discolouration in mir_proving_server)
tags: added: xmir
Changed in mir:
milestone: none → 0.17.0
Changed in mir:
milestone: 0.17.0 → 0.18.0
Changed in mir:
status: Triaged → In Progress
Changed in mir (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
PS Jenkins bot (ps-jenkins) wrote :

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

Changed in mir:
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :
Download full text (6.3 KiB)

This bug was fixed in the package mir - 0.18.0+16.04.20151216.1-0ubuntu1

---------------
mir (0.18.0+16.04.20151216.1-0ubuntu1) xenial; urgency=medium

  [ Kevin DuBois ]
  * New upstream release 0.18.0 (https://launchpad.net/mir/+milestone/0.18.0)
    - ABI summary: Only servers need rebuilding;
      . Mirclient ABI unchanged at 9
      . Mirserver ABI bumped to 36
      . Mircommon ABI unchanged at 5
      . Mirplatform ABI unchanged at 11
      . Mirprotobuf ABI unchanged at 3
      . Mirplatformgraphics ABI bumped to 7
      . Mirclientplatform ABI unchanged at 3
      . Mirinputplatform ABI added. Current version is 4
    - Enhancements:
      . Use libinput by default, and remove the android input stack
      . Add x11 input probing
      . Add alternative buffer swapping mechanism internally, available with
        --nbuffers 0
      . Automatic searching and selection of input platforms
      . Better support for themed cursors
      . Add demo client that uses multiple buffer streams in one surface
      . Improve fingerpaint demo to use touch pressure
      . Allow for configuring cursor acceleration, scroll speed and left or
        right handed mice
      . Allow for setting a base display configuration via client api
      . Various nested server multimonitor fixes and stability improvements
      . Remove DepthId from the SurfaceStack
    - Bug fixes:
      . Unit test failures in Display.* on Android (LP: #1519276)
      . Build failure due to missing dependency of client rpc code on mir
        protobuf (LP: #1518372)
      . Test failure in
        NestedServer.display_configuration_reset_when_application_exits
        (LP: #1517990)
      . CI test failures in various NesterServer tests (LP: #1517781)
      . FTBFS with -DMIR_PLATFORM=android (LP: #1517532)
      . Nesting Mir servers with assorted display configs causes lockup
        (LP: #1516670)
      . [testsfail] RaiseSurfaces.motion_events_dont_prevent_raise
        (LP: #1515931)
      . CI test failures in GLMark2Test (LP: #1515660)
      . Shells that inject user input events need to agree with the system
        compositor on the clock to use (LP: #1515515)
      . mircookie-dev is missing nettle-dev dependency (LP: #1514391)
      . Segmentation fault on server shutdown with mesa-kms (LP: #1513901)
      . mircookie requires nettle but libmircookie-dev doesn't depend on it
        (LP: #1513792)
      . libmircookie1 package does not list libnettle as dependency
        (LP: #1513225)
      . display configuration not reset when application exits (LP: #1511798)
      . unplugging external monitor causes nested server to throttle client
        (LP: #1511723)
      . 1/2 screen on external monitor (LP: #1511538)
      . unity-system-compositor crash, no interaction on windowed mode
        (LP: #1511095)
      . [regression] arm64/powerpc cross compile doesn't build any more
        (LP: #1510778)
      . mir_connection_get_egl_pixel_format() crashes if libEGL is loaded
        RTLD_LAZY (LP: #1510218)
      . [multimonitor] nested server surface positioning incorrect
        (LP: #1506846)
      . unity-system-compositor fails to build against lp:mir r3027
   ...

Read more...

Changed in mir (Ubuntu):
status: Triaged → Fix Released
Kevin DuBois (kdub) on 2015-12-22
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