Color cursor transparency problem on Linux AMD

Color cursor transparency appears to be broken with AMD GPUs on Linux
(fglrx driver). There’s a colored box around my cursor where there
should be transparency.

Currently there doesn’t appear to be a test program for this.
test_automation has some code but that doesn’t allow you to actually
see the results. Attached is a small program which allows you to switch
cursors. If you find it useful feel free to add it to tests. Just clean
it up and add error handling first :slight_smile:

This works on Windows, Mac and Linux with Nvidia GPUs (binary driver).
Intel GPUs or free drivers not tested. Could someone with access to them
do that?

This looks like an AMD bug. Quick googling finds similar problem in
Legend of Grimrock:
http://www.grimrock.net/forum/viewtopic.php?f=12&t=4583

Does someone know who ported it and does it use SDL2?
Can SDL do anything about this or is the only recourse for AMD to fix
their driver?

Present in both 2.0.3 and latest Hg.

Also the wiki on SDL_CreateCursor is out of date. It doesn’t mention
SDL_CreateColorCursor and suggests drawing color cursors yourself.
-------------- next part --------------
A non-text attachment was scrubbed…
Name: cursorTest.c
Type: text/x-c++src
Size: 4577 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20140618/c0a5af0c/attachment.cc

It appears that SDL calls X11 function, either X11_CreateXCursorCursor() or X11_CreatePixmapCursor(). My guess is that it would be only AMD who can fix the problem.

BTW, if the cause is known, it would be possible to find a workaround. That’s what being a support programmer teaches me :-).

The problem doesn’t seem to exist with Intel graphics on Linux (Fedora 18
x86_64):

Using the i915 drm driver.
$ glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel® Ivybridge Mobile
OpenGL core profile version string: 3.1 (Core Profile) Mesa 9.2.0-devel
OpenGL core profile shading language version string: 1.40
OpenGL core profile context flags: (none)
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 9.2.0-devel
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:

I rebuild this RPM-package of SDL2:
http://download.fedoraproject.org/pub/fedora/linux/updates/19/SRPMS/SDL2-2.0.3-1.fc19.src.rpm
$ sdl2-config --version
2.0.3

$ gcc -std=c99 -I/usr/include/SDL2 -lSDL2 -lm -lGL cursorTest.c -o
cursorTest
$ ./cursorTest

I recorded running the cursorTest program with SimpleScreenRecorder in
opengl mode,
the resulting video is exactly the same as running cursorTest without
recording.
I attached the resulting video, for you guys to really verify the problem
doesn’t exist here.

Cheers,
EliasOn Wed, Jun 18, 2014 at 1:07 PM, Turo Lamminen < turo.lamminen at alternativegames.net> wrote:

Color cursor transparency appears to be broken with AMD GPUs on Linux
(fglrx driver). There’s a colored box around my cursor where there
should be transparency.

Currently there doesn’t appear to be a test program for this.
test_automation has some code but that doesn’t allow you to actually
see the results. Attached is a small program which allows you to switch
cursors. If you find it useful feel free to add it to tests. Just clean
it up and add error handling first :slight_smile:

This works on Windows, Mac and Linux with Nvidia GPUs (binary driver).
Intel GPUs or free drivers not tested. Could someone with access to them
do that?

This looks like an AMD bug. Quick googling finds similar problem in
Legend of Grimrock:
http://www.grimrock.net/forum/viewtopic.php?f=12&t=4583

Does someone know who ported it and does it use SDL2?
Can SDL do anything about this or is the only recourse for AMD to fix
their driver?

Present in both 2.0.3 and latest Hg.

Also the wiki on SDL_CreateCursor is out of date. It doesn’t mention
SDL_CreateColorCursor and suggests drawing color cursors yourself.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

-------------- next part --------------
A non-text attachment was scrubbed…
Name: cursorTest_capture.mkv
Type: video/x-matroska
Size: 2415008 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20140618/ac07d4c5/attachment-0002.mpv