https://bugs.winehq.org/show_bug.cgi?id=45278
Bug ID: 45278 Summary: Vietcong: invisible objects (staging 3.9) Product: Wine-staging Version: 3.9 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: havran.jan@email.cz CC: leslie_alistair@hotmail.com, z.figura12@gmail.com Distribution: ArchLinux
Created attachment 61538 --> https://bugs.winehq.org/attachment.cgi?id=61538 Wine staging 3.9 rendering issues in Vietcong
Wine-staging 3.9 has an issue with rendering objects in Vietcong - some parts of soldier models are invisible (see attachment).
This problem does not exist in Wine-testing and all other Wine-staging versions (so its only Wine-staging 3.9 issue).
Reproducible in Vietcong full [1] and demo [2] versions. See notes in AppDB how to run the game.
Tested SW Kernel 4.16.11 Mesa 18.0.4
Tested HW Processor: Intel(R) Core(TM) i5-4210M CPU @ 2.60GHz GPU 1: Intel HD Graphics 4600 GPU 2: AMD Radeon R7 M265
PS: Different Vietcong rendering bug occured also in Wine-staging 3.3, but it has been fixed: bug #44712 PPS: Also note that some missions will crash without stagged "wined3d-Indexed_Vertex_Blending" patch, see bug #39057 or #9337
[1] https://appdb.winehq.org/objectManager.php?sClass=version&iId=8864 [2] https://appdb.winehq.org/objectManager.php?sClass=version&iId=35621
https://bugs.winehq.org/show_bug.cgi?id=45278
--- Comment #1 from Zebediah Figura z.figura12@gmail.com --- Thanks for the report. There aren't any differences between staging 3.8 and 3.9 as far as Direct3D is concerned, so it's not obvious which patch is to blame. Would it be possible for you to perform a regression test between upstream 3.9 and Staging 3.9 to find out which patch breaks the game?
https://bugs.winehq.org/show_bug.cgi?id=45278
--- Comment #2 from Jan Havran havran.jan@email.cz --- Hello Zebediah,
usually I could do some regressions tests as I did with previous bugs, unfortunately I will be extremely busy for following 14 days... So yes, I can do it after 2 weeks, if someone else will not do it in the meantime (the demo is available on moddb for example [1]).
I am sorry for the inconvenience.
[1] https://www.moddb.com/games/vietcong/downloads/vietcong-singleplayer-demo
https://bugs.winehq.org/show_bug.cgi?id=45278
--- Comment #3 from Jan Havran havran.jan@email.cz --- Hello,
I finally had some time and successfully found the problematic patch. It is the patch "wined3d-Indexed_Vertex_Blending" as I expected, applied from wine-staging-3.9 to wine-3.9 by script "patches/patchinstall.sh".
Why I focused on this patch you ask? Well, because this patch prevents game from crashing in certain missions (but the patch is not necessary for all missions). For more info about crashing, see bug #9337 [1]. There was also one regression bug in this patchset in Wine-Staging 3.3 (fixed by Zebediah Figura), see bug #44712 [2].
Tested both demo and full version of Vietcong.
[1] https://bugs.winehq.org/show_bug.cgi?id=9337 [2] https://bugs.winehq.org/show_bug.cgi?id=44712
https://bugs.winehq.org/show_bug.cgi?id=45278
--- Comment #4 from Jan Havran havran.jan@email.cz --- Created attachment 61820 --> https://bugs.winehq.org/attachment.cgi?id=61820 wine-staging 3.8 log
https://bugs.winehq.org/show_bug.cgi?id=45278
--- Comment #5 from Jan Havran havran.jan@email.cz --- Created attachment 61821 --> https://bugs.winehq.org/attachment.cgi?id=61821 wine-staging 3.9 log
"GL_INVALID_OPERATION" spam in log since Wine-staging 3.9
https://bugs.winehq.org/show_bug.cgi?id=45278
inferrna@gmail.com inferrna@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |inferrna@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=45278
--- Comment #6 from Zebediah Figura z.figura12@gmail.com --- Sorry about my quietness on this bug. Problem is, I've gone over the IVB patch with a fine toothed comb at least twice now, and while I've fixed problematic rebases, the problematic parts only ever affected the tests. I don't know why this is failing for you, and I don't immediately have the D3D knowledge to figure out. If one of the D3D devs could take a look at this, I'd be grateful, but I understand there's not a lot of incentive to do so.
https://bugs.winehq.org/show_bug.cgi?id=45278
--- Comment #7 from Henri Verbeet hverbeet@gmail.com --- (In reply to Zebediah Figura from comment #6)
Sorry about my quietness on this bug. Problem is, I've gone over the IVB patch with a fine toothed comb at least twice now, and while I've fixed problematic rebases, the problematic parts only ever affected the tests. I don't know why this is failing for you, and I don't immediately have the D3D knowledge to figure out. If one of the D3D devs could take a look at this, I'd be grateful, but I understand there's not a lot of incentive to do so.
I found some time to look a little bit into this, and while I didn't see anything obviously broken in the patchset at first sight (but github is just terrible for review—I may just have missed it), one thing to note is that we started defaulting to core contexts in Wine 3.9. You may just be hitting a different (broken) path in an otherwise unchanged patch. Does setting "MaxVersionGL" to 0x00010000 help? The GL_INVALID_OPERATION messages in the log would be consistent with this being related to core contexts somehow. It may be interesting to put a breakpoint on wined3d_debug_callback() and get a backtrace, to see which call is causing those.
https://bugs.winehq.org/show_bug.cgi?id=45278
--- Comment #8 from Jan Havran havran.jan@email.cz --- (In reply to Henri Verbeet from comment #7)
Does setting "MaxVersionGL" to 0x00010000 help?
It does indeed. There appeared new line on standard output (this workaround helped in wine-staging 3.9 and also wine-staging 3.18):
0009:err:winediag:wined3d_dll_init Setting maximum allowed wined3d GL version to 1.0.
https://bugs.winehq.org/show_bug.cgi?id=45278
--- Comment #9 from Jan Havran havran.jan@email.cz --- Created attachment 62604 --> https://bugs.winehq.org/attachment.cgi?id=62604 Wine-staging 3.18 backtrace
Here is backtrace/stack info from Wine staging 3.18 (captured from full version, but bug is reproducible also in demo version)
https://bugs.winehq.org/show_bug.cgi?id=45278
--- Comment #10 from Henri Verbeet hverbeet@gmail.com --- (In reply to Jan Havran from comment #9)
Here is backtrace/stack info from Wine staging 3.18 (captured from full version, but bug is reproducible also in demo version)
Looks like it's calling draw_primitive_immediate_mode(), which isn't going to work with core contexts. Looking over the patch set, I think it may be doing that because in draw_primitive() it sets "emulation = TRUE;" if "use_indexed_vertex_blending(state, stream_info) && use_software_vertex_processing(context->device)".
https://bugs.winehq.org/show_bug.cgi?id=45278
Paul Gofman gofmanp@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gofmanp@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=45278
--- Comment #11 from Gijs Vermeulen gijsvrm@gmail.com --- Does this bug still occur with the new version of the Indexed_Vertex_Blending patchset?
See: https://github.com/wine-staging/wine-staging/commit/b02bd9c4465d24203d849d1c43def56d6596609c
https://bugs.winehq.org/show_bug.cgi?id=45278
--- Comment #12 from Jan Havran havran.jan@email.cz --- Created attachment 63907 --> https://bugs.winehq.org/attachment.cgi?id=63907 other invisible objects
Does this bug still occur with the new version of the Indexed_Vertex_Blending patchset?
See: https://github.com/wine-staging/wine-staging/commit/b02bd9c4465d24203d849d1c43def56d6596609c
Not really, this bug somehow inverts which objects are invisible. In previous screenshot only faces, guns and equipment were visible, while in this patch these objects are invisible, while body parts are visible. I guess there were some minor issues in staging patch based on patch from bug #39057, because when I applied that patch manually on Wine 4.2, it worked fine.
But, the bug is fully fixed by commit 06fbe73760eea15c358acdb67a36242355930339 (Wine staging 4.4).
https://bugs.winehq.org/show_bug.cgi?id=45278
Jan Havran havran.jan@email.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |06fbe73760eea15c358acdb67a3 | |6242355930339
--- Comment #13 from Jan Havran havran.jan@email.cz --- Fixed in staging 4.4
https://bugs.winehq.org/show_bug.cgi?id=45278
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #14 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Closing Fixed Staging bugs.