http://bugs.winehq.org/show_bug.cgi?id=22684
Summary: Jedi Knight: Dark Forces II screen flips when picking up an item Product: Wine Version: 1.1.41 Platform: x86 URL: http://www.filefront.com/845549/jedidemo.exe OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: wylda@volny.cz
1. When an item is picked up in Jedi Knight: Dark Forces II, screen should blue flicker for a short time. Instead it looks like, that normal picture is interleaved with blue and upside down picture of the screen.
2. I did a regression test between 1.1.40 and 1.1.41:
commit fb8812db8945c23eeb6655cc94f6c36d7d15d05f Author: Roderick Colenbrander thunderbird2k@gmail.com Date: Thu Mar 18 23:59:02 2010 +0100
wined3d: Get rid of d3dfmt_get_conv in RealizePalette.
:040000 040000 a6e92a0eb31fd2ef3327b5fdbe3c8f52e2df64be 985592ba3a21105d8f56fd9899eef0215ee84250 M dlls
3. No other bug report suffers from this commit.
4. Revert of this patch after git checkout makes that problem go away.
5. Adding author of this patch to CC.
--private keyword: bisected
Other bug reports in this saga: bug 22683, bug 22356.
http://bugs.winehq.org/show_bug.cgi?id=22684
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, regression CC| |thunderbird2k@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=22684
Jeff Zaroyko jeffz@jeffz.name changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #1 from Jeff Zaroyko jeffz@jeffz.name 2010-05-14 01:56:30 --- Confirming. Thanks for doing the regression test Wylda.
http://bugs.winehq.org/show_bug.cgi?id=22684
--- Comment #2 from Roderick Colenbrander thunderbird2k@gmail.com 2010-05-16 15:37:51 --- A while ago I noticed some upside down issue but not sure when (think it was somewhere at the start of the level in the demo). I tried to reproduce this issue here by picking up a weapon (can you check if it also happens for a weapon). The screen flickers blue and the weapon is shown. The image doesn't look upside down. Like usual I can't reproduce this issue :( (This was on my ATI laptop which had this game installed; haven't tried NV yet)
It sounds like some call uses incorrect coordinates or the image was read back upside down. I think the previous test apps I used for RealizePalette (the ddtex / donut samples from the DX7 SDK and Red Alert) are single buffered or don't use the 'BltOverride back -> front flip' path which Jedi Knight uses. I think that before the change RealizePalette was only used on the front buffer because d3dfmt_get_conv
Hopefully I can find something on my nvidia based laptop. BTW could you try to run the game with OffscreenRenderingMode=backbuffer? I don't think it matters but you never know.
http://bugs.winehq.org/show_bug.cgi?id=22684
--- Comment #3 from Wylda wylda@volny.cz 2010-05-16 16:08:40 --- Created an attachment (id=28022) --> (http://bugs.winehq.org/attachment.cgi?id=28022) Unwanted effects on weapon pickup.
...can you check if it also happens for a weapon). The screen flickers blue...
Yes, i actually tested on weapon pickup. I made a save game in front of weapon and load this save during the regression test. I can post savegame here, but it's first gun i found in demo.
BTW could you try to run the game with OffscreenRenderingMode=backbuffer? I don't think it matters but you never know.
No change wit backbuffer.
Picture attached. (by luck i got the interleaved upside down) Also notice, that the gun is missing.
http://bugs.winehq.org/show_bug.cgi?id=22684
--- Comment #4 from Roderick Colenbrander thunderbird2k@gmail.com 2010-05-16 16:56:54 --- Created an attachment (id=28027) --> (http://bugs.winehq.org/attachment.cgi?id=28027) RealizePalette front buffer patch
Could you check if this helps? The patch disables a certain path in RealizePalette. I'm not sure sure whether this path makes sense for the back buffer since it might unneeded downloads/uploads (I mean the contents of the framebuffer might not contain the new frame yet but on the other hand you don't know this before hand; it might also just be called when the frame is done).
Anyway just try the patch. If it works I might have a better idea where to look.
http://bugs.winehq.org/show_bug.cgi?id=22684
--- Comment #5 from Wylda wylda@volny.cz 2010-05-16 17:15:57 ---
RealizePalette front buffer patch
Could you check if this helps?
No change, still upside down. (maybe flickering is faster, but the problem remains)
http://bugs.winehq.org/show_bug.cgi?id=22684
Zdeněk Kopřivík zdenek.koprivik@post.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zdenek.koprivik@post.cz
--- Comment #6 from Zdeněk Kopřivík zdenek.koprivik@post.cz 2010-05-16 20:30:09 --- I'm not 100% sure if it is related to this bug but I noticed a similar looking bug in Worms World Party recently. Everytime during a "fade-to-black" animation in menu the whole screen is rendered upsidedown.
http://bugs.winehq.org/show_bug.cgi?id=22684
--- Comment #7 from Roderick Colenbrander thunderbird2k@gmail.com 2010-05-17 08:54:11 --- I can confirm the issue on Nvidia. I have absolutely no idea why it occurs on Nvidia and not on ATI since the opengl functionality since I would expect that the same code paths will get entered since the GPUs offer the same opengl extensions.
http://bugs.winehq.org/show_bug.cgi?id=22684
--- Comment #8 from Roderick Colenbrander thunderbird2k@gmail.com 2010-05-17 14:55:47 --- I now know when it goes wrong. It seems to happen when RealizePalette is called for the front buffer.
http://bugs.winehq.org/show_bug.cgi?id=22684
--- Comment #9 from Wylda wylda@volny.cz 2010-05-17 16:10:48 --- (In reply to comment #8)
I now know when it goes wrong. It seems to happen when RealizePalette is called for the front buffer.
Perfect :) I'm waiting for some patch ;)
http://bugs.winehq.org/show_bug.cgi?id=22684
--- Comment #10 from Roderick Colenbrander thunderbird2k@gmail.com 2010-05-17 17:36:22 --- The issue is read_from_framebuffer_texture which doesn't flip the front buffer contents on read back. There is a comment as well which mentions that this specific case should be avoided and that it is unimplemented. I should think what should be done about it. The fun is that FBOs are useless (we need a RGBA -> A download).
I'm not sure how I should fix it yet. In case of hw accelerated 8-bit conversion the only thing really needed is a palette refresh. The whole download step is not really needed assuming the texture is up to date (apparently it isn't else this issue wouldn't be around).
http://bugs.winehq.org/show_bug.cgi?id=22684
--- Comment #11 from Zdeněk Kopřivík zdenek.koprivik@post.cz 2010-05-18 10:12:22 --- In my case (Worms World Party) I can see the menu upside down during fade-to-black animation on ATI Mobility HD 4650 with fglrx driver. So it is not the same bug (though it seems very similar) or it is not ralated to nVidia only.
http://bugs.winehq.org/show_bug.cgi?id=22684
--- Comment #12 from Roderick Colenbrander thunderbird2k@gmail.com 2010-05-18 10:22:26 --- The fade to black bug is likely the same. Either it uses RealizePalette as well (it is quite common for fading effects) but even if it is not the real bug is read_from_framebuffer_texture which just doesn't flip the surface which it has to do. The issue is not gpu / driver specific at all.
http://bugs.winehq.org/show_bug.cgi?id=22684
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23274
http://bugs.winehq.org/show_bug.cgi?id=22684
--- Comment #13 from Henri Verbeet hverbeet@gmail.com 2010-06-22 12:03:22 --- Should be fixed by b769c912cc457cc4de2bfbb739c3284de1668320.
http://bugs.winehq.org/show_bug.cgi?id=22684
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #14 from Wylda wylda@volny.cz 2010-06-22 14:57:37 ---
Thanks both of you - fixed in wine-1.2-rc4-70-g802c4de.
http://bugs.winehq.org/show_bug.cgi?id=22684
Bug 22684 depends on bug 23274, which changed state.
Bug 23274 Summary: Jedi Knight: Dark Forces II screen blue-tearing when picking up an item http://bugs.winehq.org/show_bug.cgi?id=23274
What |Old Value |New Value ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
http://bugs.winehq.org/show_bug.cgi?id=22684
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #15 from Alexandre Julliard julliard@winehq.org 2010-06-25 12:41:33 --- Closing bugs fixed in 1.2-rc5.
http://bugs.winehq.org/show_bug.cgi?id=22684
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |b769c912cc457cc4de2bfbb739c | |3284de1668320 Regression SHA1| |fb8812db8945c23eeb6655cc94f | |6c36d7d15d05f