free

News

collapse

User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Recent Posts

Re: Stopping by by Sinister
[June 08, 2025, 01:58:04 pm]


Re: Stopping by by Ehks
[June 04, 2025, 12:25:17 am]


Re: Rest in peace by Stefanrsb
[June 02, 2025, 03:38:02 am]


Re: [SA:MP]House of Sforza | The Elite Power | Estd. 2006 | LS - LV by Stefanrsb
[June 02, 2025, 03:09:22 am]


Re: The Soprano Family | Royal Loyalty by Stefanrsb
[June 02, 2025, 03:00:31 am]


Re: The Gvardia Family || San Fierro's Main Power || Best criminal group of 09/10/11 by Stefanrsb
[June 02, 2025, 02:47:01 am]


Re: BALLAS | In memory of INFERNO 9 and NBA by Stefanrsb
[June 02, 2025, 02:31:29 am]


Re: Count to 1,000,000. by Stefanrsb
[June 02, 2025, 02:15:04 am]


Re: Stopping by by Traser
[June 01, 2025, 10:23:13 pm]


Re: Stopping by by Old Catzu
[May 18, 2025, 07:27:06 pm]


Re: Stopping by by TheRock
[May 18, 2025, 06:44:49 am]


Re: Stopping by by KenAdams
[May 17, 2025, 06:33:45 am]

* Who's Online

  • Dot Guests: 376
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Birthday Calender

June 2025
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 [13] 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30

DXVK - Optimization for games using VULKAN

Surena · 1811

0 Members and 1 Guest are viewing this topic.

Offline SurenaTopic starter

  • Veteran
  • ***
    • Posts: 533
    With us since: 14/07/2015
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYears
    • My YouTube channel
on: August 07, 2023, 03:14:24 pm
Hi there,

As we all know, GTA IV is not the best game when it comes to running on PC.
Advances in hardware technology have made it easier for more people to get on board to play IV but they still have issues sometimes, such as heavy lagspikes or unstable fps.

Until recently I was unaware of this, but there seems to be a trick to get Direct3D calls into VULKAN, essentially running the game on VULKAN for what your graphics card is concerned.
Your graphics card however MUST support VULKAN. More on it below.
This trick is called DXVK. Originally made for use on Linux by translating Direct3D 9/10/11 calls into VULKAN which allowed 3D applications to run on Linux using Wine.

Despite the fact that DXVK was not intented for use on windows, this trick also works well on Windows.
It is not limited to Direct3D 9 games and can be used on Direct3D 10/11 games as well, hence why the post title is generic regardless of me posting this in IV:MP boards.

As I have ran DXVK myself on GTA IV, it seems to make the game run much smoother and in some occasions I get higher fps.

If you want to try it out for yourself you can download DXVK here.
When done downloading, you open the tar.gz file, browse through the x32 folder and copy d3d9.dll and dxgi.dll to your GTA IV root folder. That should be it, start the game and play around for a couple of minutes.
Lagspikes should occur as DXVK is caching data. I would call this the 'loading' phase. After a couple of minutes, the game should run smoothly.



In some cases the GTAIV.exe doesn't pick the d3d9.dll file. I don't know why that is. You can check using MSI Afterburner and Rivatuner Statistics Server (enable FPS view in overlay) which API is being used. You want to see VULKAN and NOT D3d9 in the overlay. If you see D3d9, then close the game, rename the D3D9.dll file in your GTA folder to dxvk.dll and restart game. Now it should be fixed. Usually this is not needed but if for you it is required, here is a simple fix.

Also if you are using GTA Connected and their downgrader Retail folder, drop the same files for DXVK in that Retail folder, so it work on both GTAC and in vanilla game for story mode.



If you notice that you are running on the lowest settings and you cannot change your graphics settings due to being locked to 512mb, do the following:
Create a text file named commandline.txt in GTA IV root folder. Modify the file by adding the following line:

Code: (commandline.txt) [Select]
-norestrictions
Then start your game, set desired settings and play the game. Happy days!



If you still experience some stuttering, you could try downloading dxvk.conf and putting it in your GTA IV root folder.
Then modify the file by removing the # marks at the maxFrameLatency settings and change their values from 0 to 1. Example given below:

Code: (dxvk.conf before/after) [Select]
# dxgi.maxFrameLatency = 0   --->   dxgi.maxFrameLatency = 1
# d3d9.maxFrameLatency = 0   --->   d3d9.maxFrameLatency = 1



Tired of GTA IV's built-in Vsync? Use DXVK's Vsync implementation as this gives less CPU overhead than the game's built-in variant, modify the following in the same dxvk.conf file:

Code: (dxvk.conf before/after) [Select]
# d3d9.presentInterval = -1   --->   d3d9.presentInterval = 1 (This forces the use of DXVK's Vsync implementation)
# d3d9.numBackBuffers = 0     --->   d3d9.numBackBuffers = 3 (This may further improve frametime stability while on Vsync)



Do you desire to use ENB? Then rename the d3d9.dll (from DXVK, NOT your ENB) to dxvk.dll.
This way you can use the original d3d9.dll from your respective ENB in the root folder of GTA IV together with DXVK.
Although I do not recommend running ENB on GTA Connected as of August 2023, the date I am writing this, as it seems to be a hit or miss.
It either works or you load into a blackscreen with only map and icon/blips loading. The latter occurs far more often.



Last but not least, if for any reason you are not happy with the results or want to use vanilla IV again, you can just remove the files for DXVK, including the cache file it created on it's own inside the root folder. No vanilla files will be replaced by installing DXVK so getting rid of it is that simple.

Some mention that version v1.9.4 works best on IV, others mention v2.0, but I have no issues to report running the latest version of DXVK (v2.2 as of now).



Supported Graphics Cards include:

NVIDIA Kepler or newer   (GTX 600 series+)
AMD GCN 1 or newer   (HD 7000 series+)
Intel HD 500 or newer (Skylake+)



Sources:
https://github.com/doitsujin/dxvk
https://www.reddit.com/r/pcgaming/comments/gsn6w8/dxvk_works_magic_on_gta_iv/?rdt=55028
https://www.pcgamingwiki.com/wiki/Grand_Theft_Auto_IV
https://steamcommunity.com/app/12210/discussions/0/3105766250723841082/?l=schinese&ctp=5

Signed,

- Kerrar


Offline Mark

  • rp is in my DNA
  • Board Moderator
  • *****
    • Posts: 1878
    With us since: 13/09/2013
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #1 on: August 10, 2023, 02:50:30 pm
Added this to the Useful Topics thread. Thankss!


Offline SurenaTopic starter

  • Veteran
  • ***
    • Posts: 533
    With us since: 14/07/2015
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYears
    • My YouTube channel
Reply #2 on: August 11, 2023, 04:06:07 am
I hope it will be useful for those interested to try, thanks for adding the link to your thread.

Have you tried it yourself btw? I mean I recall you having a good pc running ENB on IV so getting high FPS is not the problem, however this could smoothen out most of those random stutters at times.

Signed,

- Kerrar


Offline Mark

  • rp is in my DNA
  • Board Moderator
  • *****
    • Posts: 1878
    With us since: 13/09/2013
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #3 on: August 11, 2023, 10:09:45 pm
I hope it will be useful for those interested to try, thanks for adding the link to your thread.

Have you tried it yourself btw? I mean I recall you having a good pc running ENB on IV so getting high FPS is not the problem, however this could smoothen out most of those random stutters at times.

Yeah i used it for single player only though. Gonna try it in mp as soon i can.

In single player it removed stuttering completely for me and it was a game-changer for real


Offline SurenaTopic starter

  • Veteran
  • ***
    • Posts: 533
    With us since: 14/07/2015
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYears
    • My YouTube channel
Reply #4 on: August 12, 2023, 01:39:35 am
Good to hear someone else also having great results.

Signed,

- Kerrar


 


free
SimplePortal 2.3.7 © 2008-2025, SimplePortal