Bug 33066

Summary: [ilk, wine] Crawling artifacts when using GLSL
Product: Mesa Reporter: Tobias Jakobi <liquid.acid>
Component: Drivers/DRI/i965Assignee: Eric Anholt <eric>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: jbarnes
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: screenshot 1
screenshot 2
screenshot 3
screenshot 4
screenshot 5

Description Tobias Jakobi 2011-01-13 08:36:31 UTC
Created attachment 41971 [details]
screenshot 1

Hello,

I noticed some strange rendering artifacts when having GLSL enabled in wine. Going to attach some screenshots showing these errors.

System:
Intel Corporation Arrandale Integrated Graphics Controller

vanilla-kernel 2.6.36.2
libdrm, mesa and xf86-video-intel git master
xorg-server-1.9.3.901

These screenshots were done using the 'FEAR demo' with wine-1.3.11
The demo can be found here:
http://www.gamershell.com/download_10167.shtml

You can also see some screenshots which show transparency/sprite rendering errors. These also disappear when disabling GLSL, so maybe these two artifact types are related.

Greets,
Tobias
Comment 1 Tobias Jakobi 2011-01-13 08:37:04 UTC
Created attachment 41972 [details]
screenshot 2
Comment 2 Tobias Jakobi 2011-01-13 08:37:21 UTC
Created attachment 41973 [details]
screenshot 3
Comment 3 Tobias Jakobi 2011-01-13 08:37:41 UTC
Created attachment 41974 [details]
screenshot 4
Comment 4 Tobias Jakobi 2011-01-13 08:38:05 UTC
Created attachment 41975 [details]
screenshot 5
Comment 5 Tobias Jakobi 2011-01-13 08:43:22 UTC
I forgot to mention that this is i965 classic. I couldn't get wine working with i965 gallium, it instantly crashes.
However I somehow managed to get into the game with the gallium software renderer. The crawling pixel groups disappear then, however I get different rendering errors (however most likely related to volumetric lighting and shadow volume rendering). The classic software renderer also somehow works, at least it doesn't show the errors I described.

The errors are also more apparent when seeing them in motion (then the 'crawling' becomes visible).
Comment 6 Eric Anholt 2011-01-13 16:16:56 UTC
Yeah, never use the intel gallium drivers.

Interesting bug report, I'm grabbing a copy of the demo to see what's going on in the shader compile.
Comment 7 Eric Anholt 2011-01-14 12:11:04 UTC
Disabling compute_to_mrf() in brw_fs.c cleans up some of the artifacts.
Comment 8 Tobias Jakobi 2011-01-14 12:29:57 UTC
Thanks Eric for looking into this. I really appreciate it, since debugging such an issue with the wined3d layer in-between is kind of hard.

What do you mean by disabling? Letting the function exit early? I'd like to test and see the changes to the rendering myself.

Greets,
Tobias
Comment 9 Tobias Jakobi 2011-01-19 00:54:38 UTC
Just wanted to say that after the recent change in compute_to_mrf() I rechecked, but the artifacts are still crawling.

http://cgit.freedesktop.org/mesa/mesa/commit/?id=8ce425f3e3e330bda859c439b915c4e59b1a2bf4
Comment 10 Tobias Jakobi 2011-02-03 04:39:41 UTC
I noticed that the same artifacts are also present in Max Payne 2.

You can download the demo here:
http://www.rockstargames.com/maxpayne2/mp2_downloads.html

Important is to switch 'pixel shader skins' on in the launcher options. I think debugging this one is easier since MP2 doesn't use a lot of pixel shaders. Normally it uses two fullscreen shaders. One for bullet-time (sepia effect) and one for the flashback sequences. Enabling 'pixel shader skins' should give you one more.

The artifacts are limited to the player (and NPC models).

Start the game with
wine MaxPayne2Demo.exe -developer -developerkeys

Then you can use F3 to move the camera around freely.
Comment 11 Tobias Jakobi 2011-02-03 04:53:05 UTC
I just tried out what Eric said in comment #7 and comment out the compute_to_mrf call in brw_wm_fs_emit.

This removes _all_ crawling artifacts in FEAR, at least I can't see a single one anymore. The transparency problems of the windows (and smoke) and the sky problems still hold though.

However removing the compute_to_mrf pass doesn't eliminate all problems in Max Payne 2. The artifacts are much less frequent though and only appear when the camera has a certain distance from the model, where the shader is applied to. When moving close to the model the artifacts disappear.
Comment 12 Tobias Jakobi 2011-04-19 16:03:34 UTC
Reconfirming with latest mesa git master (08d1c91e6c185a186e49189b7ed48629f35a4659)
Comment 13 Tobias Jakobi 2011-05-19 09:22:58 UTC
Looks fixed in recent git master.

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.