Bug 43879

Summary: (xorg-server 1.11.2-2, xf86-video-ati 6.14.3-1 or git, qt 4.7.4) black pixels instead of transparency from PNGs
Product: Mesa Reporter: Iwan Gabovitch <qubodup>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED NOTOURBUG QA Contact:
Severity: normal    
Priority: medium CC: qubodup
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: The black backgrounds of the letters should be transparent.

Description Iwan Gabovitch 2011-12-16 04:25:49 UTC
Created attachment 54489 [details]
The black backgrounds of the letters should be transparent.

Hello,

Arch Linux, tested xf86-video-ati 6.14.3-1 and -git

When running the foss game Nikki and the Robots http://joyridelabs.de/game/download/ , transparent image data gets displayed as black. This does not happen on the same system when using proprietary ati drivers or when running in software mode.

http://imgur.com/2HW1c shows an example from the menu. The black backgrounds of the letters should be transparent.
Comment 1 Alex Deucher 2011-12-16 06:49:37 UTC
Please attach your xorg log, dmesg output, and the output of glxinfo.  Also what chip are you using?
Comment 2 Michel Dänzer 2011-12-16 07:24:36 UTC
AFAICT from looking at it in apitrace, the game itself seems at least partly to blame:

* It doesn't pass GLX_ALPHA_SIZE with a non-0 value to glXChooseFBConfig, so it can't rely on the FBConfig having an alpha channel.
* It passes GLX_BIND_TO_TEXTURE_RGB_EXT (instead of GLX_BIND_TO_TEXTURE_RGBA_EXT) to glXChooseFBConfig and passes GLX_TEXTURE_FORMAT_RGB_EXT (instead of GLX_TEXTURE_FORMAT_RGBA_EXT) for GLX_TEXTURE_FORMAT_EXT to glXCreatePixmap, so it can't rely on that the FBConfig can be bound to a texture with an alpha channel.

That said, I tried overriding these values in gdb, but the problem was still there, so there could be a Mesa issue as well. Anyway, it doesn't seem to happen with LIBGL_ALWAYS_INDIRECT=1 but does happen with llvmpipe, so reassigning to Mesa core for now.
Comment 3 Iwan Gabovitch 2011-12-16 07:57:09 UTC
What the.. I can not reproduce the display bug any more after replacing catalyst with xf86-video-ati again.
Comment 5 Michel Dänzer 2011-12-20 08:21:16 UTC
(In reply to comment #3)
> What the.. I can not reproduce the display bug any more after replacing
> catalyst with xf86-video-ati again.

According to glxinfo you're not using hardware acceleration anymore but the llvmpipe software rasterizer. Though I was seeing the problem with that as well.


Anyway, as described before, the problem basically looks like the game creates the GLXPixmaps for the characters without an alpha channel, and then tries to use them as textures with alpha blending. This can't work.

Feel free to reopen this report if the problem persists after the above issue has been addressed in the game.
Comment 6 Michel Dänzer 2012-01-17 02:30:34 UTC
This seems to be a Qt bug. It works correctly for me with Qt 4.8.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.