Wrappers, fix Low FPS

Discussion in 'Videocards - AMD Radeon Drivers Section' started by neil78, Feb 19, 2022.

  1. neil78

    neil78 Member

    Messages:
    19
    Likes Received:
    6
    GPU:
    RX 7900 XTX Vapor-X
    Recently, I found some old dx9 games run on low frame rate (23 FPS), I search keyword “Low FPS” and “d3d9” many times.
    finally, I found something useful.

    https://www.pcgamingwiki.com/wiki/Glossary:Display_wrapper
    https://emulation.gametechwiki.com/index.php/Wrappers

    https://github.com/ThirteenAG/d3d8-wrapper
    https://github.com/ThirteenAG/d3d9-wrapper

    https://github.com/elishacloud/dxwrapper (d3d8 wrapping to d3d9, etc)
    https://github.com/doitsujin/dxvk (d3d9-11 wrapping to Vulkan, not working on some games)
    https://github.com/doitsujin/elf-auf-zwoelf (d3d11 wrapping to d3d12, I don't test it)
     
    Neo Cyrus and elaganza like this.
  2. Astyanax

    Astyanax Ancient Guru

    Messages:
    16,996
    Likes Received:
    7,337
    GPU:
    GTX 1080ti
    what games?
     
  3. Neo Cyrus and Truder like this.
  4. Valken

    Valken Ancient Guru

    Messages:
    2,922
    Likes Received:
    903
    GPU:
    Forsa 1060 3GB Temp GPU
    Can someone with W10/W11 and a DX12 game do a test for me using Steam's PROTON DX12 to Vulkan wrapper here:

    https://github.com/GloriousEggroll/proton-ge-custom/releases

    "This is running on a 750Ti which is a unsupported GPU (game will not run). The game requires DX12 level 12_0, which quite a lot of DX12 compatible GPUs do not support like Kepler and GCN 1. VKD3D bypasses this issue by running it through Vulkan instead.

    The video there is demonstrating the game running in Steam for Linux (Proton), but I've gotten the VKD3D wrapper to run under Windows too. However I've done very little testing, so no guarantees it'll work as well as in Linux.

    To use VKD3D on Windows you'll need Proton.

    You'll need two DLLs from the archive. Dxgi.dll (dxvk folder) and d3d12.dll (vkd3d-proton folder) from the archive. Put them inside the folder with your game's executable.

    Use the right bit versions for your game DX12 game, otherwise it won't work. The are 32-bit and 64-bit versions (lib and lib64 folders in the archive).

    Needless to say this is unsupported. This can get potentially get you banned with online play, so I don't recommend using it with multiplayer games.

    You'll know it works if MSI Afterburner is reporting the game as using Vulkan instead of DX12.

    This is not my video. I simply find Vulkan wrappers interesting, and this is something that might come in handy for older GPU owners."

    Source reddit

    I have W7 and my HW is too old for me to do an upgrade just to enable DX12 for one game.
     

  5. neil78

    neil78 Member

    Messages:
    19
    Likes Received:
    6
    GPU:
    RX 7900 XTX Vapor-X
  6. Astyanax

    Astyanax Ancient Guru

    Messages:
    16,996
    Likes Received:
    7,337
    GPU:
    GTX 1080ti
    cannot confirm with either, theres also no correlating posts or information on the pcgw wiki for either title with settlers 7,

    COH has parameter workarounds for stuttering and wrong refresh rate application.
     
  7. Cryio

    Cryio Master Guru

    Messages:
    679
    Likes Received:
    289
    GPU:
    Nitro+ 7900 XTX
    Does the OpenGL thing actually work on Windows? As far as I know, only DXVK works as a wrapper on Windows, given the and work and dependacies on Linux projects.
     
  8. Cryio

    Cryio Master Guru

    Messages:
    679
    Likes Received:
    289
    GPU:
    Nitro+ 7900 XTX
    For DirectX 6 - 9.0c, DgVodoo does a tremendous job converting to DX12 as well.
     
  9. Cryio

    Cryio Master Guru

    Messages:
    679
    Likes Received:
    289
    GPU:
    Nitro+ 7900 XTX
    Valken likes this.
  10. Cryio

    Cryio Master Guru

    Messages:
    679
    Likes Received:
    289
    GPU:
    Nitro+ 7900 XTX
    DgVodoo for example is extremely helpful for Splinter Cell 1 and Pandora Tomorrow, given it fully restored buffer soft shadows.

    I also recently found out DgVodoo actually fully emulates DirectX 9.0c Pixel Shader 3.0, not just DX9.0 Pixel Shader 2.0.

    Therefore, I found out DgVodoo also fully restored functional soft shadows on Splinter Cell Double Agent, which is funny, because high resolution soft shadows have ALWAYS been broken on Splinter Cell Double Agent. You still need to tweak the ini for proper resolutions and Shadow draw distance (and use the widescreen made for UI elements), but the game has never looked or ran better than now.
     
    Trunks0 likes this.

  11. AsiJu

    AsiJu Ancient Guru

    Messages:
    8,773
    Likes Received:
    3,353
    GPU:
    KFA2 4070Ti EXG.v2
  12. Astyanax

    Astyanax Ancient Guru

    Messages:
    16,996
    Likes Received:
    7,337
    GPU:
    GTX 1080ti
    there isn't one.
     
    Last edited: Jun 4, 2022
    mirh likes this.
  13. AsiJu

    AsiJu Ancient Guru

    Messages:
    8,773
    Likes Received:
    3,353
    GPU:
    KFA2 4070Ti EXG.v2
  14. Astyanax

    Astyanax Ancient Guru

    Messages:
    16,996
    Likes Received:
    7,337
    GPU:
    GTX 1080ti
    A driver.
     
  15. Truder

    Truder Ancient Guru

    Messages:
    2,388
    Likes Received:
    1,423
    GPU:
    RX 6700XT Nitro+
    I've been looking for something like this for a long while, so far so good.

    Citra, a 3DS emulator runs with OpenGL and performance on Windows is abysmal with AMD GPUs, on Linux however, performance is fantastic.... But naturally, I don't want to load Linux just for one program....

    Here are some screenshots, resolution is set to 5x and xBRZ freescale texture filtering applied
    citra linux.jpg

    So uncapped framerate, you can see in this example, FPS on Linux is 268

    On windows without any modded drivers/wrappers etc (so just normally running the software)....
    citra windows.jpg
    Uncapped, it's nowhere near the Linux performance

    So now, after reading the windows mesa open source driver, and setting the environment variable so that it's wrapped using zink (Vulkan), this is the result
    citra windows mesavulkan.jpg

    211 FPS!!! Of course it's not as good as Linux, but it's a huge improvement over the regular drivers, this is a fantastic result!

    (If you don't use Zink and just use the OpenGL3.3 mesa driver, performance is still better than AMD driver at ~120fps but still much slower than it can be).

    It's a driver with a wrapper......

    Edit:

    So if anyone is wondering how I set it up to run with citra, this is what I did. First I used the msvc package (this is the package necessary if you want to use OGL on D3D12 - I initially tried the dx12 wrapper and while it did improve performance, it wasn't a great improvement). I ran the perappdeploy.cmd file and gave it the following instructions:-

    First it asks the location of the program (copied and pasted the file directory into the cmd prompt and then it asked the next set of questions (and my answers).

    Code:
    Do you want Desktop OpenGL drivers (y/n, defaults to yes): y
    
    Do you want swr driver - the new desktop OpenGL driver made by Intel (y/n): n
    
    Do you need OpenGL ES support (y/n): n
    
    Deploy Mesa3D OpenCL clover driver as the only OpenCL driver for this program hiding all other drivers registered system-wide (y/n): n
    
    Do you need off-screen rendering (y/n): n
    
    Do you need graw library (y/n): n
    
    More Mesa deployment? (y=yes): y
    After that, in the directory with the citra emulator, I made the following text file containing the following variables:-

    Code:
    set MESA_GL_VERSION_OVERRIDE=3.3COMPAT
    set GALLIUM_DRIVER=zink
    citra-qt.exe
    and named the file citra.bat (so that it's a batch file that will set the variables and run the program).

    And there you have it, Mesa drivers running in a Vulkan wrapper bypassing the awful AMD OGL driver.
     
    Last edited: Mar 5, 2022
    xvt, XOWNY, aeiouuoiea and 9 others like this.

  16. Romulus_ut3

    Romulus_ut3 Master Guru

    Messages:
    780
    Likes Received:
    252
    GPU:
    NITRO+ RX5700 XT 8G
    I took the plunge and went on to install Pop!_OS and so far, my results have been interesting.
    Cyberpunk 2077 on Linux runs a hair faster than it does on Windows, at least for my configuration. But it comes with a couple of caveats.
    If you change a single setting in the game, be it audio, controls, etc. you have to restart the game or otherwise your performance is halved. This happens on Linux, not on Windows.
    Linux has higher framerate, but the framepacing is slightly off. So, the game doesn't feel as smooth as it does on Windows, despite windows having slightly lower framerate.
    I have a work in progress video for it, if anyone wishes to take a look:



    Medium settings were used at 1080p, with slow HDD mode set to off, crowd set to Medium, and RCAS set to on.
    The footage was captured using OBS and intel's QuickSync, the Linux footage might look a bit choppy because OBS on Linux is really under developed.
    Also, MangoHud, software used for viewing FPS/Frametime data has a weird auto scaling function for the frametime graph, that makes things look worse than it actually is.
    Other games that I am gonna test: Dying Light 2, Resident Evil 3, and Shadow of The Tomb Raider.
    So far, my experience with Steam/Proton/Wine/Lutris has been very positive. Getting games installed on NTFS partitions might prove to be challenging on Linux, but creating Symlinks to those folders and having the compatdata generate on an ext4 drive solves the issue.
    Also, manually updating to the latest DXVK/VKD3D helps tremendously. I have been using the latest "Proton Experimental" version that Steamplay recommends.
     
    Last edited: Mar 6, 2022
    Cryio, Noisiv and Valken like this.
  17. Cryio

    Cryio Master Guru

    Messages:
    679
    Likes Received:
    289
    GPU:
    Nitro+ 7900 XTX
    Outstanding work my dude. My mind is blown away by this improvement. I know there was a way to do it and I expected someone would finally do it one day, but this is an extraordinary achievement. Almost 300% performance boost. Well done. Thank you very much for this test and your tutorial. Now to figure out to use it for anything else OpenGL based, lol.

    Maybe this fixes the god awful performance of Wolfenstein New Order / Old Blood. What else uses OpenGL and is relevant, lol?

    SOMA and Amnesia Rebirth are both OpenGL, but performance is surprisingly fine in both of them.

    Could this wrapper be used for PCSX2/XEMU the same way you used for Citra I wonder.
     
    Yoshinatsu Ryou and Truder like this.
  18. Cryio

    Cryio Master Guru

    Messages:
    679
    Likes Received:
    289
    GPU:
    Nitro+ 7900 XTX
    I'd call a ~10% improvement more than just "a hair faster" for just an OS switch.
     
  19. Shadow_Death

    Shadow_Death Active Member

    Messages:
    91
    Likes Received:
    0
    GPU:
    MSI R9 290x Gaming 4G
  20. aeiouuoiea

    aeiouuoiea Guest

    Messages:
    2
    Likes Received:
    4
    GPU:
    RX 5500
    This is awesome dude. Do you mind if I make a YouTube video showing other people how to do this?
     
    Cryio likes this.

Share This Page