The game "Anomaly Warzone Earth" from the previous Humble Android Bundle does not work with Mesa. There's two problems, at least the second is a bug in the game: • The game segfaults at start 9/10 times. When it does start it's only to segfault a short while later. Backtraces only point to the game, but it does work with fglrx. • GLSL in the game fails to compile: "error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'" this is out of spec behaviour, but apparently working with blobs from Nvidia/AMD. (This is probably not the reason for the segfaults, as modifing the shaders to compile still results in crashes). I have used ApiTrace to grab traces of the game, but I'm not sure if that's of any help. The trace made with fglrx plays back with Mesa, with no problems except a warning: "could not infer drawable size (glViewport never called)" http://dl.dropbox.com/u/28577999/anomalywarzoneearth-no-start.trace (trace with mesa, game segfaulting, 2.7M) http://dl.dropbox.com/u/28577999/anomalywarzoneearth-working.trace (trace with fglrx 170M) So far the developers of the game have shown very little interest in anything not related to Nvidia/AMD blobs, so I'm filing this bug in the hope that they would be more likely to listen to a Mesa developer rather than a random user. * Mozilla used to have an advocacy bug keyword used for broken websites where someone would contact and try to convince the operators of a buggy website to support Firefox, rather than adding workarounds in the browser. Maybe Mesa needs something similar?
(In reply to comment #0) > • GLSL in the game fails to compile: "error: no matching function for call to > `texture2DLod(sampler2D, vec2, float)'" this is out of spec behaviour, but > apparently working with blobs from Nvidia/AMD. (This is probably not the reason > for the segfaults, as modifing the shaders to compile still results in > crashes). This is indeed out of spec behavior that can be fixed in the application by either using #version 130 or specifying #extension GL_ARB_shader_texture_lod : warn. You can also work around this by setting the force_glsl_extensions_warn driconf option. (Either run "force_glsl_extensions_warn=true ./AnomalyWarzoneEarth" or set it in ~/.drirc or /etc/drirc. The driconf GUI can help with that.) If they absolutely won't fix it, we might have to add the game to our blacklist. Not sure about the other issues.
(In reply to comment #1) > You can also work around this by setting the force_glsl_extensions_warn driconf > option. (Either run "force_glsl_extensions_warn=true ./AnomalyWarzoneEarth" or > set it in ~/.drirc or /etc/drirc. The driconf GUI can help with that.) Thanks, that's good to know! > Not sure about the other issues. Yeah, I suppose only the game devs know for sure what's causing the segfault, but there seems to be zero interest in supporting Intel GPUs or Mesa overall.
I think Eric was working on similar Humble Bundle issues in the past, so CC'ing him as well. I have this bundle myself, but I haven't tried it on anything except real android. I'll give it a try and see if I can find something wrong there.
same with GMA 4500, but Windows version runs fine in Windows.
does not work with Intel HD either even with glsl extension behavior warn Tested On: Ubuntu 12.10 Linux 3.5 (both 32 and 64 bit) X.Org X Server 1.13.0 xf86-video-intel 2.20.15 libdrm 2.4.40 Mesa 8, 9 and git (both 32 and 64 bit) Hardware: Intel GMA 4500 MHD (device id 2a42) Hardware: Intel HD (device id 0106)
When diffing the traces it's obvious that the only substantial difference before the crash is in the uniform locations numbering: fglrx returns tightly-packed 0, 1, 2 ... while Mesa likes to return bigger numbers like 65536 for some kinds. I bet it overflows a fixed-size buffer in the game. It's possible to test this theory by injecting a renumbering hack.
Created attachment 77166 [details] LD_PRELOAD hack to renumber uniform locations in a dense manner To follow up to my previous comment, attaching a quick'n'dirty LD_PRELOAD interposer that avoids exposing uniform locations such as 655360 to the game. With this, the game doesn't segfault, but I think I'm getting rendering errors in map view (IVB, Mesa-9.0). (if anyone wants to try: compile command is at the first line of the .cpp file, to use: export LD_PRELOAD=/path/to/compiled/anomalyhack.so ./AnomalyWarzoneEarth)
(In reply to comment #0) > The game "Anomaly Warzone Earth" from the previous Humble Android Bundle > does not work with Mesa. > Guys, we solved the crash and updated the Steam version first. If you own the game as a part of Humble Bundle you should have received a Steam code. Could you please check if it's ok now? If so, we'll update the installer package as well.
fixed with steam version on my Intel GMA 4500, please update the installer. Cheers
Great to hear it's fixed -- closing this bug for us.
I wanted to add one note. The game now works for me with Mesa 9.0.3 via Steam, but it is crashing for me with Mesa 9.1.1 after the intro movie. I'll work with the game developer on this...
(In reply to comment #11) > I wanted to add one note. The game now works for me with > Mesa 9.0.3 via Steam, but it is crashing for me with Mesa 9.1.1 > after the intro movie. I'll work with the game developer on > this... I cherry-picked f5a80846 to the 9.1 branch as 4f441462 to fix this.
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.