[PATCH RFC xserver] dix: Work around non-premultiplied ARGB cursor data

Adam Jackson ajax at nwnk.net
Fri Jul 15 14:00:51 UTC 2016


On Fri, 2016-07-15 at 09:30 -0400, Alex Deucher wrote:
> On Tue, Jun 28, 2016 at 4:22 AM, Michel Dänzer <michel at daenzer.net> wrote:
> > From: Michel Dänzer <michel.daenzer at amd.com>
> > 
> > Some games incorrectly use non-premultiplied ARGB cursor data, presumably
> > because that's what Windows uses. On some hardware (and with SWcursor),
> > this breaks areas of the cursor which are supposed to be transparent
> > (and presumably also translucent areas, but that's less noticeable).
> > 
> > This change checks for pixels with alpha == 0 and any non-alpha component
> > != 0. If any such pixel is found, the data is assumed to be
> > non-premultiplied and fixed up by multiplying the RGB components with the
> > alpha component.
> > 
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92309
> > Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
> > ---
> > 
> > I'm on the fence about whether this is a good or bad idea.
> > 
> > Pro:
> > * Allows users with affected setups to play broken games
> > * Less overhead than a corresponding workaround in the driver
> > 
> > Con:
> > * Makes the problem completely invisible to game developers, so once
> >   it's in we can probably never remove it again
> > 
> > Opinions?
> 
> Seems like a good idea to me.
> Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

Yeah, I'm convinced.

remote: I: patch #95410 updated using rev 401a8d6e1379133863e3271374dc21850d0d3cab.
remote: I: 1 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   033888e..401a8d6  master -> master

- ajax


More information about the xorg-devel mailing list