Bug 78464 - black rectangles when running Battlefield Bad Company 2 on Wine
Summary: black rectangles when running Battlefield Bad Company 2 on Wine
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-09 02:50 UTC by Damian Nowak
Modified: 2015-01-16 07:02 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Damian Nowak 2014-05-09 02:50:36 UTC
Hey,

Today out of curiosity I started Battlefield Bad Company 2 with Wine. It started out of the box. However, graphics are a bit broken. Black rectangles are all over the place. They disappear when I change "Effects quality" to "Low" in advanced video settings (all the rest is on High). I don't know if it's the driver's problem or just Wine/DirectX thing, but please have a look.

http://upload.nowaker.net/nwkr/1399602311_bfbc2-wine.png
http://upload.nowaker.net/nwkr/1399603496_bfbc2-wine-2.png
http://upload.nowaker.net/nwkr/1399603501_bfbc2-wine-3.png
http://upload.nowaker.net/nwkr/1399603507_bfbc2-wine-4-lowest.png

There is also one element on the screen that is supposed to be a marker of where I should go. Instead of the marker, a part of my desktop is shown. The funny thing is, once I move, it rotates. ;) This is probably related to Radeon or Gallium - the game itself wouldn't be able to capture some content of my desktop I think.

I have Radeon 7870. I'm using Arch Linux with mesa 10.1.2. Using Glamor/Gallium.

(Yes, it's weird what I'm doing.)
Comment 1 Michel Dänzer 2014-05-12 07:15:13 UTC
Please attach the corresponding Xorg.0.log and output of dmesg and glxinfo.

Are your 32-bit Mesa binaries the same version as the 64-bit ones?

Do you have the 32-bit version of the txc-dxtn or S2TC library installed?
Comment 2 Damian Nowak 2014-05-12 14:59:44 UTC
Thank you for digging into my case. Both Mesa and texture compression are installed for both architectures and have the same version.

ati-dri 10.1.3-1 [installed]
lib32-ati-dri 10.1.3-1 [installed]
libtxc_dxtn 1.0.1-5 [installed]
lib32-libtxc_dxtn 1.0.1-5 [installed]

Logs soon to come.
Comment 3 Damian Nowak 2014-05-12 17:54:44 UTC
http://upload.nowaker.net/nwkr/1399916681_glxinfo
http://upload.nowaker.net/nwkr/1399916610_Xorg.0.log
http://upload.nowaker.net/nwkr/1399916620_dmesg

This dmesg is from my linux-grsec kernel, but the same thing happens on vanilla kernel as well.

Another interesting screenshot. Two textures leaking to the game. On the minimap there is a part of my desktop (letters "u" and bold "d" visible). On the right there is something I didn't have on my screen, I don't know what this is.

http://upload.nowaker.net/nwkr/1399916714_bfbc2.png
Comment 4 Michel Dänzer 2014-05-13 07:57:36 UTC
Please attach files here directly instead of referencing external sites.

Can you create an apitrace which demonstrates the problem?
Comment 5 Damian Nowak 2014-05-14 17:40:16 UTC
@Michel, lib32-apitrace is broken in my distro. I will take my time to fix it, and then return to it.
Comment 6 Laurent carlier 2014-05-14 18:36:20 UTC
(In reply to comment #5)
> @Michel, lib32-apitrace is broken in my distro. I will take my time to fix
> it, and then return to it.

package fixed!
Comment 7 Damian Nowak 2014-05-14 18:37:58 UTC
OK, got the apitrace dump. I also captured a second dump where I set "Effects quality" to "Low" to get rid of the rectangles. Maybe this will help you locate broken GL calls by filtering out good ones from the latter.

You are interested in the calls just from the end of the dump. It takes a while to go through the intro, main menu, game loading etc. to play the game. In each run I did the same - after starting the real game I rotate and take a look at the buggy tree. Then I hit ALT+F4 to immediately close the game. This way the tree, on which rectangles appear in the first dump, is more or less the last thing that happened.

I had to upload it to my server - the files are 1.3GB in total.
http://upload.nowaker.net/nwkr/1400091988_bfbc2.trace (rectangles)
http://upload.nowaker.net/nwkr/1400092320_bfbc2-low.trace (no rects)
Comment 8 Damian Nowak 2014-05-14 18:38:41 UTC
@Laurent carlier, good to know - thanks! I used lib32-apitrace-git instead. ;)
Comment 9 Damian Nowak 2014-07-03 21:28:26 UTC
@Michel, I also found this bug in Tappy Chicken, an Unreal Engine Linux build demo.

http://upload.nowaker.net/nwkr/1404422235_tappy.png
http://upload.nowaker.net/nwkr/1404422288_tappy2.png

Since the game is dead simple, apitrace will probably more usable than from BFBC2. You can find it here:

https://wiki.unrealengine.com/Linux_Demos
http://ue4linux.raxxy.com/tappy_chicken.zip
Comment 10 Damian Nowak 2014-07-03 22:20:11 UTC
BTW, now using Mesa 10.2.2.
Comment 11 Michel Dänzer 2015-01-16 01:57:51 UTC
The apitrace plays back fine for me now, probably thanks to Marek's recent NaN fixes.
Comment 12 darkbasic 2015-01-16 07:02:58 UTC
I had the very same bug in The Witcher 2 (wine) but unfortunately with current stack it hangs while starting it.


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.