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

nGlide wrapper only displays a black screen. #86

Open KynikossDragonn opened 3 years ago

KynikossDragonn commented 3 years ago

The nGlide glide wrapper which wraps all known Glide API's to Direct3D 9 just seems to black screen on just about anything I've tried it on. I don't get any meaningful output that would tell me what's possibly going wrong.

Other actual Direct3D 9 games work fine, but I have a few specific things in Wine I need to use the nGlide wrapper on.

I am aware of dgvoodoo2 but I've yet to look into DXVK.

Here's some system information:

Kernel: Linux 5.8.8
Wine version: 5.16
CPU: Intel Core i7-6770HQ
GPU: Intel Iris Pro 580
Mesa driver: iris_dri.so
Mesa version: 20.1.7
Wine Nine version: v0.7.0-368-release

Games tested that resulted in a black screen with nGlide:

Unreal (all versions)
Starsiege
Starsiege: Tribes (aka Tribes 1)
Recoil

I presume everything is working in DRI3 as that's what iris_dri.so and Mesa as a whole defaults to.

iris_dri.so is a Gallium driver.

dungeon007 commented 3 years ago

Try gdi wine renderer for nglide apps or some ddraw wrapper. It is probably same bug like in: https://github.com/iXit/Mesa-3D/issues/336 Not solved yet, but at least have workarounds. Seems some sort of collision bug that happens here and there, between wine's gpu accelerated ddraw and nine.

KynikossDragonn commented 3 years ago

Yeah this workaround appears to work in this instance too. Only instead of setting that key globally you can set it in the AppOverrides section even though winecfg never reveals that set of options to you.

That's a pretty odd regression if it's indeed a wine problem.

dungeon007 commented 3 years ago

Sure, you can edit registry per app to force gdi and else. Many ddraw wrappers also workarounding it, like dxgl, dxwrapper, many ddraw wrappers that come with some GoG games, etc... Even running software mesa for windows also workarounds it: https://fdossena.com/?p=mesa/index.frag Copy in game folder and override it with something like WINEDLLOVERRIDES=opengl32=n Weird is that software mesa for windows is also a workaround, but seems just forcing things like LIBGL_ALWAYS_SOFTWARE=true isnt :D Yeah, there are many ways to workaround it, depending if you like editing registry or variables, still nicest would be if it just work by default...

dungeon007 commented 3 years ago

These apps just missies front buffer it seems... dxvk with forced disabled flag like: d3d9.noExplicitFrontBuffer = False Also needs GDI renderer... maybe we are just missing something, maybe some quirk is possible in front/back buffer code.

lorn10 commented 10 months ago

And here follows an update to this topic. I can confirm this behavior also for the GOG version of Rayman 2: The Great Escape and latest nGlide 2.10.

However, in my case the screen output remains black also after applying the above mentioned gdi tweak to the registry:

[HKEY_CURRENT_USER\Software\Wine\Direct3D]
"Renderer"="gdi"

The sole difference is that before the change my screen output was white while now it is black. So it looks that this "gdi" setting doesn't helps in any case. I tried many different resolutions (in the game) from 1920 x 1080 down to 640 x 480 with the same result. Also the color setting of 32 bit versus 16 bit doesn't bring an improvement.

Interestingly there seems to be something strange when Gallium Nine is initialized. It looks that several approaches are needed until Gallium Nine is finally active:

test@test-iMac:~$ cd "/home/test/.wine_GOG/drive_c/GOG Games/Rayman 2"
test@test-iMac:~/.wine_GOG/drive_c/GOG Games/Rayman 2$ WINEPREFIX=~/.wine_GOG wine Rayman2.exe
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0024:err:winediag:wined3d_dll_init Disabling 3D support.
Native Direct3D 9 v0.9.0.396-release is active.
For more information visit https://github.com/iXit/wine-nine-standalone
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0x35e468), stub!
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0x35e468), stub!
0024:err:vulkan:wine_vk_init Failed to load libvulkan.so.1.
0024:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
Native Direct3D 9 v0.9.0.396-release is active.
For more information visit https://github.com/iXit/wine-nine-standalone
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0x10cdd00), stub!
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0x10cdd00), stub!
Native Direct3D 9 v0.9.0.396-release is active.
For more information visit https://github.com/iXit/wine-nine-standalone
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0x10cdd00), stub!
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0x10cdd00), stub!
Native Direct3D 9 v0.9.0.396-release is active.
For more information visit https://github.com/iXit/wine-nine-standalone
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0x10cdd00), stub!
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0x10cdd00), stub!
Native Direct3D 9 v0.9.0.396-release is active.
For more information visit https://github.com/iXit/wine-nine-standalone
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0x10cdd00), stub!
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0x10cdd00), stub!
Native Direct3D 9 v0.9.0.396-release is active.
For more information visit https://github.com/iXit/wine-nine-standalone
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0x10cdd00), stub!
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0x10cdd00), stub!
Native Direct3D 9 v0.9.0.396-release is active.
For more information visit https://github.com/iXit/wine-nine-standalone
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0x10cdd00), stub!
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0x10cdd00), stub!
Native Direct3D 9 v0.9.0.396-release is active.
For more information visit https://github.com/iXit/wine-nine-standalone
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0x10cdd00), stub!
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0x10cdd00), stub!
Native Direct3D 9 v0.9.0.396-release is active.
For more information visit https://github.com/iXit/wine-nine-standalone
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0x10cdd00), stub!
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0x10cdd00), stub!
014c:fixme:keyboard:LoadKeyboardLayoutW name L"00000807", flags 1, semi-stub!
014c:fixme:keyboard:X11DRV_ActivateKeyboardLayout 0x8070807, 0000: semi-stub!

I was able to produce two small apitraces: d3d9_16bit_colors.trace.tar.gz d3d9_32bit_colors.trace.tar.gz

Edit: This seems to be a problem of the r600 Mesa driver because it works fine with the crocus driver on my Intel iGPU. :+1:

Addition: I can confirm that the problem is no longer present on later Mesa builds. So while Mesa 23.0.4 is affected Mesa 23.3 devel works fine. In the end the sole and only needed change for nGlide is the "Renderer"="gdi" modification in the registry which is more a problem of Wine than of Gallium Nine.