iXit / wine-nine-standalone

Build Gallium Nine support on top of an existing WINE installation
GNU Lesser General Public License v2.1
272 stars 23 forks source link

Use gallium nine with Proton FullScreen hack patch... #131

Open Castro-Fidel opened 2 years ago

Castro-Fidel commented 2 years ago

Hello. Is it possible to run G9 under the version of wine with FullScreen hack patch?

Castro-Fidel commented 2 years ago

Native Direct3D 9 v0.8.0.385-release is active. For more information visit https://github.com/iXit/wine-nine-standalone fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0xb456d0), stub! fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0xb456d0), stub! X Error of failed request: BadDrawable (invalid Pixmap or Window parameter) Major opcode of failed request: 14 (X_GetGeometry) Resource id in failed request: 0x0 Serial number of failed request: 14 Current serial number in output stream: 14

lorn10 commented 2 years ago

Maybe you should check the information available in #125. Last version of proton which was official compatible to Gallium Nine was 4.2-9 from Jun 2019.

It may be possible to get Gallium Nine working again on newer Proton versions but you may have to "hack this together" at your own. :wink:

I think a good source for this project will be the blog of Mike Blumenkrantz, the Zink developer, here: https://www.supergoodcode.com/the-finale/

niobium93 commented 2 years ago

@lorn10 AFAIK #125 is talking about a different and unrelated problem to this and that blog post talks about using nine in native games with d3d9 renderers, not Proton/Wine.

This is a different problem which causes Gallium Nine to crash in any version of Wine patched with various patches from Proton. This is a known bug in wine-tkg for example.

This includes most any Wine version used by gamers, including lutris runners. The only people who can still use Gallium Nine are those running vanilla Wine or vanilla Wine Staging.

niobium93 commented 2 years ago

Can confirm it also crashes with wine-ge. wine-ge gallium-nine.log

lorn10 commented 2 years ago

Okay, I see... Now I understand.

Whatever, for me Gallium Nine worked almost perfectly well in Wine Stable and Wine Devel in conjunction with the CXBX-R Xbox emulator.

Maybe these incompatibility problems will became better when also Gallium Nine is finally converted into a true PE module, see #130. I hope that this transition will simplify the integration process of Gallium Nine into Wine, Proton, Lutris and so on. :wink:

Addition: Unfortunately it looks that this simply cannot work so easy. The reason is DXVK which is at all those special Wine forks deeply integrated. So since DXVK comes with its own Direct3D9 functionality it was most likely decided to only use that one.

So the whole matter here is in the end not so easy to solve. Maybe this will change at some point in the far future when Gallium Nine and the new state tracker d3d10umd (which should be expanded to d3d11umd) are once fully integrated into Wine.:smile: Seriously, If I understand this topic correctly then this would help a lot. The biggest stumbling block for an integration of native D3D state-trackers into Wine is effectively the lack of a WDDM DDI (Windows Display Driver Model) implementation in Wine.

axeldavy commented 2 years ago

Gallium nine is compatible with the fullscreen hack, but it is indeed not covered by Proton.

So far we are stuck to using wine directly.

niobium93 commented 2 years ago

@axeldavy are you sure about that? I just built wine-tkg a bunch of times with various patches enabled or disabled and every time I have either _proton_fs_hack or _childwindow_fix set to true Gallium Nine crashes. Maybe it used to be compatible, but the fullscreen hack changed and now it isn't? Could you please re-test this to make sure. These are the patches from tkg that cause me issues: valve_proton_fullscreen_hack-staging.patch childwindow-proton.patch

Kethen commented 2 years ago

I managed to build proton 7.2 ge-2 that allows nine standalone to work with @niobium93's findings, by commenting the following lines to skip fshack related patches https://github.com/GloriousEggroll/proton-ge-custom/blob/b7dcda35ddb5c2a37f84ffcf194528e7bde49e3f/patches/protonprep.sh#L354 https://github.com/GloriousEggroll/proton-ge-custom/blob/b7dcda35ddb5c2a37f84ffcf194528e7bde49e3f/patches/protonprep.sh#L357 https://github.com/GloriousEggroll/proton-ge-custom/blob/b7dcda35ddb5c2a37f84ffcf194528e7bde49e3f/patches/protonprep.sh#L483

axeldavy commented 2 years ago

the part of the patch "[PATCH] winex11.drv: Remove unused X11DRV_GET_DRAWABLE ExtEscape" removes something nine uses and totally requires. Nine has no way to possibly work without this (besides using internal wine structures directly, which would require to be in-tree to be ABI compatible).

niobium93 commented 2 years ago

Maybe we could ask Proton upstream to just remove that commit? If all it does is remove unused functionality, they should have no problem just keeping it instead?

axeldavy commented 2 years ago

Before that it would be appropriate to see if reverting just that part is enough to make the whole work again as it did in the past.

niobium93 commented 2 years ago

I made a patch that reverts that commit and used the wine-tkg build system to apply it to a build which also had fshack enabled. This resulted in a build where Gallium Nine fully works.

Here's the patch in case someone wants an easy way to try.