Bug 94043

Summary: Distorted graphics when running Battle.net app under Wine with Radeon hardware
Product: Mesa Reporter: Erik Brangs <erik.brangs>
Component: Drivers/Gallium/r300Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED MOVED QA Contact: Default DRI bug account <dri-devel>
Severity: normal    
Priority: medium CC: mike
Version: 11.2   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Screenshot of the distortion
Xorg.0.log from a session where the problem occurred
Output of glxinfo
Output of dmesg
dumped state from apitrace (from bug 87496) at index 13655
dumped state from apitrace (from bug 87496) at index 14156

Description Erik Brangs 2016-02-08 11:28:29 UTC
When running the Battle.net Application on Ubuntu 15.10 via Wine 1.6.2 (from the official Ubuntu packages) with the normal Ubuntu X server packages, after logging in into the application, the graphics are distorted to the point of unreadability.

I've searched the bugzilla and the symptoms seem to be similar to https://bugs.freedesktop.org/show_bug.cgi?id=84651 . Even the workaround with LIBGL_ALWAYS_SOFTWARE=1 works. The difference is that I have a Radeon card:

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV515/M54 [Mobility Radeon X1400]
Comment 1 Alex Deucher 2016-02-08 14:41:30 UTC
Please attach your xorg log, glxinfo output, and dmesg output.  Can you attach a picture of the distortion?
Comment 2 Erik Brangs 2016-02-08 15:16:30 UTC
Created attachment 121592 [details]
Screenshot of the distortion

The graphics in the problematic window flicker while the problem occurs. The graphics in the window alternate between completely blank (i.e. black) and distorted graphics as in the screenshot.
Comment 3 Erik Brangs 2016-02-08 15:17:25 UTC
Created attachment 121593 [details]
Xorg.0.log from a session where the problem occurred
Comment 4 Erik Brangs 2016-02-08 15:17:48 UTC
Created attachment 121594 [details]
Output of glxinfo
Comment 5 Erik Brangs 2016-02-08 15:18:30 UTC
Created attachment 121595 [details]
Output of dmesg
Comment 6 Erik Brangs 2016-02-16 15:38:39 UTC
Is there anything I can do to increase the chances that this gets fixed?
Comment 7 Mike Lothian 2016-02-17 00:26:52 UTC
If this is a regression try and find which part of the stack that's regressed. It could be the kernel, mesa, wine or Battle.net itself.  Once you've found which component run a git bisect - there's plenty of instructions on how to do so.

When you've found which commit that's caused the regression report back here.

Hopefully from there a solution can be found -obv is the issue is in wine you'll need to report there and if it's in Battle.net itself - good luck...
Comment 8 Erik Brangs 2016-02-17 09:43:26 UTC
Thanks for your help.

I don't think that it's a regression but I don't actually know for sure. I don't have a working version of the stack that I could revert to. I can't try reverting the Battle.net App because it's proprietary and automatically updates to the latest version.

What I was able to find out is the following:
On the Wine side, bug #37347 ( https://bugs.winehq.org/show_bug.cgi?id=37347 ) describes the same problem that I'm having. Although the bug title mentions only Intel, comment #16 by Peter Harris says that he has the problem with an ATI Radeon X1600. As mentioned above, I've got a Radeon X1400. Later, somebody from the Wine community reported Freedesktop bug #84651 ( https://bugs.freedesktop.org/show_bug.cgi?id=84651 ) which I linked above. A fix for Intel drivers was produced and according to comment #18 at the freedesktop bug it is in commit 0008d0e59eff365079323918508ffc87355a6bfd . AFAIK the associated mesa version has long been released to distributions (at least ones updating as often as Ubuntu, which I'm using). Wine closed the bug and all its duplicates as resolved upstream. Unfortunately, there wasn't any feedback on the Wine bug from Peter Harris or anybody else with a non-Intel graphics cards. That's why I have the strong suspicion that a very similar problem to the one in the Intel driver exists in whatever part is responsible for this when using my graphics cards. I'm not sure if it's helpful but there are some duplicates of the Wine bug ( https://bugs.winehq.org/show_bug.cgi?id=37786 , https://bugs.winehq.org/show_bug.cgi?id=37289 ) where Anastasius Focht mentions that "All apps built with MSVC Qt5 SDK using ANGLE graphics layer were affected." .
Comment 9 Erik Brangs 2016-02-20 09:56:40 UTC
AFAIK this affects Mesa 11.0.2 because that's what Ubuntu 15.10 ships.
Comment 10 Pavel Ondračka 2016-02-20 18:34:05 UTC
Duplicate of bug 87496, however this one maybe has more info?
Comment 11 Erik Brangs 2016-04-06 09:21:44 UTC
When I replay the trace from bug 87496 with qapitrace, there are two message about an incomplete FBO:

13655: message: api issue 1: FBO incomplete: driver marked FBO as incomplete [-1]
14156: message: api issue 1: FBO incomplete: driver marked FBO as incomplete [-1]

Enabling thumbnails shows that all frames are broken. Frames either don't have useful content (only colored rectangles) or the content is distorted as described above.
Comment 12 Erik Brangs 2016-04-06 09:23:06 UTC
Created attachment 122755 [details]
dumped state from apitrace (from bug 87496) at index 13655
Comment 13 Erik Brangs 2016-04-06 09:24:15 UTC
Created attachment 122756 [details]
dumped state from apitrace (from bug 87496) at index 14156
Comment 14 Erik Brangs 2016-04-29 16:09:31 UTC
Still happening in Ubuntu 16.04 LTS which ships Mesa 11.2.0.
Comment 15 Richard Thier 2019-05-28 11:27:42 UTC
I have seen really similar scrambled graphics when trying to play Rome: Total War (rtw 1). In my case however the glitch seems to have more simmetry: it looks like the screen is tiled into tiles all of which has bad scratched images like here.
Comment 16 Mike Lothian 2019-05-28 11:54:02 UTC
Unless you're running an old r300 card I recommend you open your own bug

Make sure you state what versions of Mesa you're using and which versions (if any) worked and take a look at https://www.mesa3d.org/bugs.html first
Comment 17 GitLab Migration User 2019-09-18 18:53:16 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/370.

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.