xf86-video-amdgpu: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Nov 15 15:50:23 UTC 2018
src/drmmode_display.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 426f9a49655f01863cf4d898f525e5f95984e0c4
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Tue Nov 6 12:06:20 2018 +0100
Relax detection of non-premultiplied alpha cursor data
The stricter detection broke the cursor in some games. Apparently those
use cursor data with premultiplied alpha, but with some pixels having
r/g/b values larger than the alpha value (which corresponds to original
r/g/b values > 1.0), triggering the workaround.
Relax the detection to match what's in the X server since 1.18.4, but
keep the workaround for older versions.
Bugzilla: https://bugs.freedesktop.org/108650
Acked-by: Alex Deucher <alexander.deucher at amd.com>
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 34b3d87..871a645 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1509,8 +1509,8 @@ drmmode_cursor_pixel(xf86CrtcPtr crtc, uint32_t *argb, Bool premultiplied,
int i;
if (premultiplied) {
-#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 20, 99, 0, 0)
- if (*argb > (alpha | alpha << 8 | alpha << 16 | alpha << 24))
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 18, 4, 0, 0)
+ if (alpha == 0 && (*argb & 0xffffff) != 0)
/* Doesn't look like premultiplied alpha */
return FALSE;
#endif
More information about the xorg-commit
mailing list