[Bug 108355] Civilization VI - Artifacts in mouse cursor
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Oct 24 19:41:46 UTC 2018
https://bugs.freedesktop.org/show_bug.cgi?id=108355
--- Comment #11 from Hadrien Nilsson <freedesktop at psydk.org> ---
Thank you for the patch, Michel.
I spent the last few days trying to understand the situation about color mouse
cursors and I think it is rather confusing.
I extracted the mouse cursor asset from Civ6 and I could reproduce the same
problem with my SDL test program. When I multiplied the R, G and B components
with the Alpha, the blending was correct. So I think you are right about the
symptoms.
I tried your patch and the blending was correct in both my SDL program and the
game.
Now the question is, what should be the correct behavior? How should the RGBA
data be provided, premultiplied or straight? I tried to find specifications,
alas:
- the SDL documentation gives no clue about it;
- XcursorImage* documentation neither;
- wl_pointer_set_cursor neither.
I even looked at Windows. No clue there with the exception of what I think is a
low level function: DrvSetPointerShape, where finally it gives information
about the pixel format: the RGB data should be indeed alpha premultiplied.
As the documentation is not very clear, I had to test implementations. Here are
my results with different combinations:
- Xorg + amdgpu : premultiplied ok, straight wrong
- Xorg + intel : premultiplied ok, straight wrong
- Xorg + proprietary nVidia : premultiplied ok, straight ok
- wayland + amdgpu : premultiplied ok, straight wrong
- wayland + intel : premultiplied ok, straight wrong
- Windows + amdgpu : premultiplied ok, straight ok
- Windows + intel : premultiplied ok, straight ok
So it looks like Windows with any graphics card is able to detect a wrong
format (straight alpha) and fix it, as you did in your patch. And also nVidia
proprietary X11 drivers have the same workaround. I think it could explain why
Aspyr only supports nVidia as nVidia drivers will fix wrong data for them.
I'm very happy your patch fixes Xorg + amdgpu combination, but isn't there a
larger problem, where such a workaround should be also done somewhere else in a
centralized part of the graphics stack (SDL, Xcursor, wayland?) so any
combination could benefit of it?
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg-driver-ati/attachments/20181024/d7f1a8b8/attachment.html>
More information about the xorg-driver-ati
mailing list