Bug 91117 - Nimbus (running in wine) has rendering issues, objects are semi-transparent
Summary: Nimbus (running in wine) has rendering issues, objects are semi-transparent
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/nouveau (show other bugs)
Version: 10.5
Hardware: Other All
: medium normal
Assignee: Nouveau Project
QA Contact: Nouveau Project
URL: http://store.steampowered.com/app/50000/
Whiteboard:
Keywords: bisected, regression
Depends on:
Blocks:
 
Reported: 2015-06-26 16:40 UTC by Béla Gyebrószki
Modified: 2015-06-26 22:45 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Béla Gyebrószki 2015-06-26 16:40:38 UTC
The game is available on Steam and needs Wine to run.
The main menu and all the objects in the game appear transparently, see this screenshot for comparison (images on the right show the correct behaviour, images on the left is the current state): http://imgur.com/aDhYehq

The problem doesn't occur with the binary Nvidia drivers (340.76).

Regression introduced by

commit 9e94b87b6012450d714edc6d0c46b15a89d5ce61
Author: Ilia Mirkin <imirkin@alum.mit.edu>
Date:   Thu Jan 1 01:01:13 2015 -0500

    nv50/ir: fold MAD when one of the multiplicands is const
    
    Fold MAD dst, src0, immed, src2 (or src0/immed swapped) when
     - immed = 0 -> MOV dst, src2
     - immed = +/- 1 -> ADD dst, src0, src2
    
    These types of MAD patterns were observed in some st/nine shaders.

Reverting the commit on current git fixes the problem for me.

Trace file generated by apitrace:
https://drive.google.com/open?id=0B-tTbLKBl-tObmNTbmZLV08xMzA&authuser=0

To reproduce the problem in the demo version you need Wine (preferably the latest development version) and a Steam account. The game needs native d3dx9_36 ('winetricks d3dx9_36').

Fedora 22 32-bit
Mesa 10.6-branchpoint-676-g7de8569
VGA compatible controller: NVIDIA Corporation G92 [GeForce GTS 250] (rev a2) (prog-if 00 [VGA controller])
Kernel 4.0.5-300.fc22.i686+PAE
xorg-x11-server-Xorg-1.17.2-1.fc22.i686
Comment 1 Ilia Mirkin 2015-06-26 19:07:18 UTC
The trace starts working when applying

http://patchwork.freedesktop.org/patch/53049/

Note that the bisected commit merely enables the code fixed by the above to operate on the shaders in question rather than actually having a problem by itself. The resulting code ended up as "b - a" instead of "a - b".
Comment 2 Ilia Mirkin 2015-06-26 22:45:12 UTC
Fix pushed. If this trace still gives you issues, feel free to reopen.

commit ad62ec8316a926682958e7ab52639992867c3755
Author: Ilia Mirkin <imirkin@alum.mit.edu>
Date:   Fri Jun 26 15:01:22 2015 -0400

    nv50/ir: propagate modifier to right arg when const-folding mad
    
    An immediate has to be the second arg of an ADD operation. However we
    were mistakenly propagating the modifier of the non-folded value to the
    folded immediate argument.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91117
    Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
    Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>


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.