http://bugs.winehq.org/show_bug.cgi?id=15738
Summary: Max Payne 2: Ingame windows rendered incorrect with nvts pipe Product: Wine Version: 1.1.3 Platform: PC-x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: liquid.acid@gmx.net
When using (or forcing) the nvts_fragment_pipeline implementation (directx.c), ingame windows are rendered incorrectly. Going to attach screenshots later.
With the arbfp pipe rendering is correct, I didn't yet try with other pipes.
Effect can be reproduced with the demo version. Start game and let cutscenes finish (wait until you gain control of the character), then take a look at the windows in the hospital room. With nvts they're completly transparent, nearly like they weren't even there. Recheck with arbfp and see how they should look like (you should see a "sprinkled-by-rain-from-outside" effect on them).
Exit first room and look left for another window. It has the same issues, however I found out that it was possible to trigger correct rendering when the scene is rendered from a certain position (again going to do screenshots).
http://bugs.winehq.org/show_bug.cgi?id=15738
Tobias Jakobi liquid.acid@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |http://www.rockstargames.com | |/maxpayne2/mp2_downloads.htm | |l Severity|enhancement |minor Keywords| |download
http://bugs.winehq.org/show_bug.cgi?id=15738
--- Comment #1 from Austin English austinenglish@gmail.com 2008-10-23 16:33:43 --- Please attach terminal output.
http://bugs.winehq.org/show_bug.cgi?id=15738
--- Comment #2 from Tobias Jakobi liquid.acid@gmx.net 2008-10-23 16:41:04 --- What do you expect to find?
http://bugs.winehq.org/show_bug.cgi?id=15738
--- Comment #3 from Austin English austinenglish@gmail.com 2008-10-23 16:55:37 --- Hopefully a clue as to where to look. Terminal output is (almost) always the first step in debugging.
http://bugs.winehq.org/show_bug.cgi?id=15738
--- Comment #4 from Tobias Jakobi liquid.acid@gmx.net 2008-10-23 17:19:26 --- OK... I can post the output tomorrow.
But I can already tell you that there is no interesting output from wined3d nor from d3d8. In fact the only thing I remember popping up here and there are the usual EvictManagedResources fixmes. Really nothing critical there.
As soon as I have the screenshots and the console output ready I'm also going to CC stefand since he wrote the arbfp pipeline.
http://bugs.winehq.org/show_bug.cgi?id=15738
--- Comment #5 from Tobias Jakobi liquid.acid@gmx.net 2008-10-26 03:53:10 --- Created an attachment (id=16891) --> (http://bugs.winehq.org/attachment.cgi?id=16891) Max Payne 2: nvts_fragment_pipeline forced
This is Max Payne 2 demo on a recent wine git master checkout (last commit is 503972980e150f9eda348962f437484d7c9daa43), further patched with: http://bugs.winehq.org/attachment.cgi?id=16829
Wine settings: ORM=fbo GLSL=off
Ingame settings:
Video Settings: resolution=800x600, 32bits AntiAliasing=off TextureColorDepth=high TextureResolution=high TextureFiltering=trilinear TripleScreenBuffers=off AllowWindowsKeys=off
Content Scalability: First 5 settings: all medium Checkbox: all switched on except "Mirrors" and "Pixel Shader Skins"
http://bugs.winehq.org/show_bug.cgi?id=15738
--- Comment #6 from Tobias Jakobi liquid.acid@gmx.net 2008-10-26 04:24:49 --- Created an attachment (id=16892) --> (http://bugs.winehq.org/attachment.cgi?id=16892) First room / hospital room: windows (fully) transparent
http://bugs.winehq.org/show_bug.cgi?id=15738
--- Comment #7 from Tobias Jakobi liquid.acid@gmx.net 2008-10-26 04:26:01 --- Created an attachment (id=16893) --> (http://bugs.winehq.org/attachment.cgi?id=16893) Another window: direct view and rendered correct
To find this window leave the first room and look right
http://bugs.winehq.org/show_bug.cgi?id=15738
--- Comment #8 from Tobias Jakobi liquid.acid@gmx.net 2008-10-26 04:26:53 --- Created an attachment (id=16894) --> (http://bugs.winehq.org/attachment.cgi?id=16894) Another window: Look from the side and it's rendered wrong
http://bugs.winehq.org/show_bug.cgi?id=15738
--- Comment #9 from Tobias Jakobi liquid.acid@gmx.net 2008-10-26 04:27:37 --- (From update of attachment 16894) Same window like in http://bugs.winehq.org/attachment.cgi?id=16893, only rendered from a different point of view
http://bugs.winehq.org/show_bug.cgi?id=15738
Tobias Jakobi liquid.acid@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |stefan@codeweavers.com
--- Comment #10 from Tobias Jakobi liquid.acid@gmx.net 2008-10-26 04:29:09 --- And last but not least...
http://bugs.winehq.org/show_bug.cgi?id=15738
--- Comment #11 from Tobias Jakobi liquid.acid@gmx.net 2008-11-22 16:17:04 --- Reconfirming with wine-1.1.9
http://bugs.winehq.org/show_bug.cgi?id=15738
--- Comment #12 from Tobias Jakobi liquid.acid@gmx.net 2009-01-29 16:38:46 --- Reconfirming with wine-1.1.13
http://bugs.winehq.org/show_bug.cgi?id=15738
--- Comment #13 from Tobias Jakobi liquid.acid@gmx.net 2009-04-26 09:05:01 --- Reconfirming with wine-1.1.20
http://bugs.winehq.org/show_bug.cgi?id=15738
--- Comment #14 from Stefan Dösinger stefandoesinger@gmx.at 2009-04-26 10:24:19 --- I remember that this game made troubles with the ARB pipeline at first, just in an opposite way, by showing completely opaque windows. The problem back then was incorrect clamping behavior. Ie, the game uses D3DTOP_ADD, then D3DTOP_MODULATE. The ADD could produce a temporary result > 1.0. The FFP pipeline always clamps values to [0.0; 1.0]. So I changed the operations that could go above 1.0 or below 0.0 to use the _SAT version of the instruction, which fixed the bug.
As far as I know NVTS doesn't support values > 1.0. However, one might have to make sure that values stay > 0.0(I think the supported range is [-1.0;1.0]). I don't know for sure what happens if an ADD produces something > 1.0, maybe it is undefined.
http://bugs.winehq.org/show_bug.cgi?id=15738
--- Comment #15 from Tobias Jakobi liquid.acid@gmx.net 2009-04-26 11:56:26 ---
From the extensions docs:
"The spec is written as if the computations are done on floating point values ranging from -1.0 to 1.0 (clamping is specified where this range is exceeded). The fact that NV10 does the computations as 9-bit signed fixed point is not mentioned in the spec. This permits a future design to support more precision or use a floating pointing representation."
Looks like you only need to clamp to zero here, if that really is the problem.
http://bugs.winehq.org/show_bug.cgi?id=15738
--- Comment #16 from Tobias Jakobi liquid.acid@gmx.net 2009-04-26 11:59:50 --- The docs (in case someone wants to take a look): http://www.opengl.org/registry/specs/NV/register_combiners.txt http://www.opengl.org/registry/specs/NV/register_combiners2.txt http://www.opengl.org/registry/specs/NV/texture_shader.txt http://www.opengl.org/registry/specs/NV/texture_shader2.txt
My previous quote is from the RC1 specs.
http://bugs.winehq.org/show_bug.cgi?id=15738
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #16891|maxpayne2_demo.log |maxpayne2_demo.txt filename| | Attachment #16891|1 |0 is patch| |
http://bugs.winehq.org/show_bug.cgi?id=15738
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #17 from joaopa jeremielapuree@yahoo.fr 2011-07-08 03:32:07 CDT --- still a bug in current wine?
http://bugs.winehq.org/show_bug.cgi?id=15738
faris faris.shahab_2050@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |faris.shahab_2050@hotmail.c | |om
http://bugs.winehq.org/show_bug.cgi?id=15738
Alexander Dorofeyev alexd4@inbox.lv changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |alexd4@inbox.lv Ever Confirmed|0 |1
--- Comment #18 from Alexander Dorofeyev alexd4@inbox.lv 2013-10-21 09:10:12 CDT --- (In reply to comment #17)
still a bug in current wine?
Yes, with NVidia card & prop. drivers and nvts pipeline forced by a hack in wined3d/directx.c, this bug can be reproduced in wine 1.7.4
http://bugs.winehq.org/show_bug.cgi?id=15738
Alexander Dorofeyev alexd4@inbox.lv changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #19 from Alexander Dorofeyev alexd4@inbox.lv 2013-11-05 19:07:22 CST --- Bugfix is in: http://source.winehq.org/git/wine.git/commit/a14793f50ba3acb0b99bb166b8534b2...
http://bugs.winehq.org/show_bug.cgi?id=15738
Henri Verbeet hverbeet@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |a14793f50ba3acb0b99bb166b85 | |34b255ff09ca2
http://bugs.winehq.org/show_bug.cgi?id=15738
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #20 from Alexandre Julliard julliard@winehq.org 2013-11-08 12:32:30 CST --- Closing bugs fixed in 1.7.6.
https://bugs.winehq.org/show_bug.cgi?id=15738
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.6.x
https://bugs.winehq.org/show_bug.cgi?id=15738
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.6.x |---
--- Comment #21 from Alexandre Julliard julliard@winehq.org --- Removing 1.6.x milestone from bugs included in 1.6.2.