ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
24.47k stars 1.07k forks source link

Add dgVoodoo2 for old DirectX and Glide games #3516

Closed Arucard1983 closed 4 years ago

Arucard1983 commented 4 years ago

Feature Request

I confirm:

Description

On original Windows 7 and 10 operating systems, the freeware but closed-sourced dgVoodoo2 wrapper emulated the old DirectX games (specially the ones using DirectDraw), until the earlier DirectX 9 games that had mixed DirectDraw and Direct3D 8 code. dgVoodoo2 also supports the Glide API, including the Glide Napalm API. The wrapper uses computing shaders from DirectX 11 to emulated the old API to Direct3D 11, requiring on Linux to use DXVK (the dxgi.dll and d3d11.dll are enough) to make the wrapper working.

Justification [optional]

The major advantage to integrate dgVoodoo2 (it could be a third-party folder to avoid mixture of open-source code) on Proton is to enable the wrapper with a single variable to enable the overrides, and runs the game. Even using a double layer, due to the Glide/DirectX > DirectX 11 > DXVK > Vulkan, it gives more performance related to the OpenGL based WineD3D on modern systems, due to the use of GPU-level multithreading, and the required features of DirectX 11 by dgVoodoo2 was implemented on DXVK Vulkan wrapper. Many older games using the dgVoodoo2 + DXVK combo gains better framerates (matching the Windows original performance), and stability. Other major feature is the screen upscaling, and simple post-processing image filtering (requires Reshade to enables better algorithms), making possible to play games at higher resolutions that was even unsupported by the original games. In a nutshell, makes a full Vulkan emulation of ancient games bypassing the OpenGL emulation entirely.

Risks [optional]

The wrapper are a work in progress, and the author are very strictly to give permission to use their software on bundles. One of rare cases are the permission granted to Lutris to store some versions, and using to some game installing scripts. The lack of a centralized bug report (The Vogons forums are the main place to report problems!) makes difficult to track issues, and solve compatibility problems. The dgVoodoo2 was not intended to run on Linux, but on Windows 7, 8.x and 10 machines, and the program's author once taught that would be unnecessary, or difficult, since the emulation code relies on GPU computing cores delivered by DirectX 11, and WineD3D emulation of DX11 was and it is abysmal. When DXVK arrives, it was one the first non-gaming tools actively tested by Linux gamers, and when DXVK runs the wrapper, it becomes a option to Vulkan supported GPU to bypass OpenGL entirely.

For my own testings, dgVoodoo2 + DXVK requires recent drivers to work properly, since using older drivers may cause GPU hangs, requiring to switch to a terminal console and kill the game. On my Debian 10 laptop, some games that would hang in less than a minute, are now working when the Debian 10 repositories finally upgrades the Nvidia drivers from 418 to 430. Basically it should be always an optional setting, and should be warned to the users that option are devised to modern CPU and GPU with full Vulkan support, and avoid old drivers that can cause stability problems.

To beginners it should be a command like: PROTON_DGVOODOO2 = 1 Or to use special macros to auto-edit the global dgVoodoo2.conf file, and run the game, such as: PROTON_DGVOODOO2 = upscale,msaa8,af16 To upscale the image to full desktop resolution, and override the MSAA to 8x and AF to 16x.

But advanced users will wants to open the dgVoodoo2 Config Utility to change the wrapper settings, which would require some GUI tweaking to open the program adequately. Currently, the utility can run on any WINEPREFIX and save the configuration file, and can be copied to the game's directory without problem since it don't have absolute paths.

dgVoodoo2 also emulates the DirectX 9 over DX11, but it is limited and more optimized for the earliest DX9 games that have exports to DirectDraw and DX8. This means that require only to load the d3d11.dll and dxgi.dll for DXVK and disabling the DX9 and DX10 internal emulation to avoid conflicts.

References [optional]

Some reports that was testing dgVoodoo2 + DXVK:

https://github.com/ValveSoftware/Proton/issues/3287 https://github.com/ValveSoftware/Proton/issues/3398 https://github.com/ValveSoftware/Proton/issues/3271 https://github.com/ValveSoftware/Proton/issues/3270

shoober420 commented 4 years ago

I fully support this. Have it enabled under “Properties”. It would be treated as a Tool, that installs in the games directory when requested via “Properties”, as long as “Dege”, the programmer is cool with it.

ghost commented 4 years ago

While I agree to support older game renderers, I feel an open-source alternative should be developed instead.

shoober420 commented 4 years ago

nGlide should be treated the same as well. It should be a downloadable tool and Steam fetches the latest version, and installs or uninstalls when checked and unchecked under the games “Properties”.

@LucesEnBabel I understand the benefits of open source development, but it should not limit the software choices of the user, and force certain programs on others. Especially users who already use proprietary drivers and software.

Arucard1983 commented 4 years ago

@shoober420 agree that this wrapper should be bundled with Proton.

Several tests of old games on Protondb also reveals that even require to use dgVoodoo2 to play, or the game will not work. The Omikron are a prime example: https://www.protondb.com/app/243000

Or the GOG release of Diablo 1, that on modern Wine versions requires dgVoodoo2 + DXVK to play the game with the old engine, or it simply crashes: https://appdb.winehq.org/objectManager.php?sClass=version&iId=37759

Zamundaaa commented 4 years ago

This isn't even really limited to Linux / Proton - if it's a separate tool then it could improve old games for people on Windows as well. I agree that an open source alternative, preferrably directly over Vulkan would be better but if there's no such project already it could also be a lot more effort than it's worth.

Ruedii commented 4 years ago

This isn't even really limited to Linux / Proton - if it's a separate tool then it could improve old games for people on Windows as well. I agree that an open source alternative, preferably directly over Vulkan would be better but if there's no such project already it could also be a lot more effort than it's worth.

Yes, I am thinking Valve should start porting over the entire SteamPlay stack to other platforms, and use it to build compatibility environments for standard old game profiles. This would go in one of the standard profiles.

This would provide out of box support.

mozo78 commented 4 years ago

Other platforms don't give a fuck for us and I don't see why we should care for them.

aeikum commented 4 years ago

This is out of scope for Proton.