Jump to content

D9VK might make direct3d 9 games perform better

D9VK is a fork of DXVK that reimplements Direct3D 9 in Vulkan (DXVK does Direct3D 10/11). Its development is funded by Valve. It is not yet feature complete as the fixed function stuff used by older games is not yet implemented, but many games work on it. I have heard from the D9VK developer and others that D9VK is outperforming the native Windows Direct3D 9 implementation both in Wine on Linux and on Windows itself. A Hat In Time was explicitly named, but other games reportedly perform better with it too.

 

You can use D9VK on Windows by getting the DLLs and dropping them into the game directory before launching it. If you set the DXVK_HUD environment variable to 1 on your system, it will add a HUD to the game that will indicate that it is working:

 

https://www.techjunkie.com/environment-variables-windows-10/

 

I only run Linux, so I can not confirm those claims. Would someone playing Direct3D 9 games on Windows try it out to see if it really performs better? Here is a link to the downloads page for the binaries:

 

https://github.com/Joshua-Ashton/d9vk/releases

 

Using it requires a vulkan capable GPU such as the Radeon HD 77xx–7900 Series and later for AMD, a Kepler or later GPU for Nvidia or a Skylake or later iGPU for Intel. That is on Windows. In the case of Intel graphics on Linux, Broadwell should be compatible. You should make sure that you have the latest drivers before trying this.

Link to comment
Share on other sites

Link to post
Share on other sites

I might give it a try using 3DMark 06.

 

The only reason I can see it making games work better than the native solution is simply because DX9 still had a lot of limitations compared to modern API, so it's likely the wrapper is taking advantage of Vulkan's features where possible

 

It's the same reason why you can run GCN/Wii games on Dolphin much better than the original hardware.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Mira Yurizaki said:

I might give it a try using 3DMark 06.

 

The only reason I can see it making games work better than the native solution is simply because DX9 still had a lot of limitations compared to modern API, so it's likely the wrapper is taking advantage of Vulkan's features where possible

 

It's the same reason why you can run GCN/Wii games on Dolphin much better than the original hardware.

It is more that Microsoft found ways to improve how Direct3D was implemented that did not require the changes that they made in Direct3D 10, but they intentionally omitted them from their Direct3D 9 code to encourage game developers to use Direct3D 10 so that people would upgrade to Vista. At least, that is what people seem to think. 

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, ryao said:

It is more that Microsoft found ways to improve how Direct3D was implemented that did not require the changes that they made in Direct3D 10, but they intentionally omitted them from their Direct3D 9 code to encourage game developers to use Direct3D 10 so that people would upgrade to Vista. At least, that is what people seem to think. 

Well, it's important to keep in mind that Vista introduced a new driver model designed to be more robust. I don't think an API designed around an older driver model was going to translate 1:1 there 

 

Also there were actual limitations in the shader model that DX9 used that weren't there or as limiting in DX10 https://en.m.wikipedia.org/wiki/High-Level_Shading_Language

 

(Though I don't know if this really matters)

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, Mira Yurizaki said:

Well, it's important to keep in mind that Vista introduced a new driver model designed to be more robust. I don't think an API designed around an older driver model was going to translate 1:1 there 

 

Also there were actual limitations in the shader model that DX9 used that weren't there or as limiting in DX10 https://en.m.wikipedia.org/wiki/High-Level_Shading_Language

 

(Though I don't know if this really matters)

The game is still using the D3D9 API and shader model with D9VK. Whatever limitations that are inherent to D3D9 also affect D9VK. It is not changing game code. Just the D3D9 implementation.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, ryao said:

The game is still using the D3D9 API and shader model with D9VK. Whatever limitations that are inherent to D3D9 also affect D9VK. It is not changing game code. Just the D3D9 implementation.

I'm not saying it's modifying the game code. 

 

What D9VK is likely doing is what every emulator from the 5th gen of game consoles on is doing: intercepting API calls and translating them into something the host machine can process. This is how said emulators can do things beyond what the original hardware was capable of doing and/or allowing emulation of said systems without needing vastly superior hardware. In some cases this has led to the emulator performing better than the original system.

 

So to me, if someone is trying to claim that the GPU manufacturer's implementation of the API is worse than D9VK, I'd argue it's more complicated than that. 

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, Mira Yurizaki said:

I'm not saying it's modifying the game code. 

 

What D9VK is likely doing is what every emulator from the 5th gen of game consoles on is doing: intercepting API calls and translating them into something the host machine can process. This is how said emulators can do things beyond what the original hardware was capable of doing and/or allowing emulation of said systems without needing vastly superior hardware. In some cases this has led to the emulator performing better than the original system.

 

So to me, if someone is trying to claim that the GPU manufacturer's implementation of the API is worse than D9VK, I'd argue it's more complicated than that. 

That is what Microsoft's Direct3D 9 library does too, except it is in a privileged position where everything was able to be modified to suit it.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, ryao said:

That is what Microsoft's Direct3D 9 library does too, except it is in a privileged position where everything was able to be modified to suit it.

No it's not. The D3D runtime in Windows since Vista runs in userland space

 

dx10arch.png

I'd imagine D9VK and DXVK sit between the runtime and its entry point into kernel mode space.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Mira Yurizaki said:

No it's not. The D3D runtime in Windows since Vista runs in userland space

 

dx10arch.png

I'd imagine D9VK and DXVK sit between the runtime and its entry point into kernel mode space.

D9VK and DXVK both run in userspace too. It would be something like this:

Application -> D9VK -> Vulkan Runtime -> Vulkan ICD -> Kernel-mode access (gdi32.dll) -> Kernel Mode graphics driver.

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Mira Yurizaki said:

I just said that. ?

You claimed that Direct3D was somehow at a disadvantage. It isn't. They both run in userspace (and there really isn't a penalty to doing that given that the game itself is in userspace). The code just isn't as good. Microsoft likely could make it better if they wanted.

Link to comment
Share on other sites

Link to post
Share on other sites

Okay, so is there a list of "compatible" D3D9 games? I'm not entirely convinced it's wholly necessary since I'm pretty sure I've had no troubles running any DX9 games I have.

#Muricaparrotgang

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, JZStudios said:

Okay, so is there a list of "compatible" D3D9 games? I'm not entirely convinced it's wholly necessary since I'm pretty sure I've had no troubles running any DX9 games I have.

I don't think anyone has made an explicit list as it is still in early development. Honestly, I had asked here because I wanted to find out from people with Windows systems whether what I had heard was correct. My guess is anything marked direct3d 9.0c would have a good chance of working though.

 

Edit: I just realized that there is a list of videos of games that are known to work here:
 

https://www.reddit.com/r/D9VK/

Link to comment
Share on other sites

Link to post
Share on other sites

38 minutes ago, Mira Yurizaki said:

I might give it a try using 3DMark 06.

 

The only reason I can see it making games work better than the native solution is simply because DX9 still had a lot of limitations compared to modern API, so it's likely the wrapper is taking advantage of Vulkan's features where possible

 

It's the same reason why you can run GCN/Wii games on Dolphin much better than the original hardware.

The entire ideology behind D3D9 was found to be flawed and inefficient in comparison to DirectX10/11.

 

Firaxis with their Lore engine discovered that when you apply D3D11 ideology/thinking to a D3D9 interface you get massive performance improvements. So by programming DirectX9 like it was 10 or 11 you get significantly higher performance. 

 

So its only natural that being able to completely redevelop the back end of D3D9 will yield massive improvements.

CPU: Intel i7 - 5820k @ 4.5GHz, Cooler: Corsair H80i, Motherboard: MSI X99S Gaming 7, RAM: Corsair Vengeance LPX 32GB DDR4 2666MHz CL16,

GPU: ASUS GTX 980 Strix, Case: Corsair 900D, PSU: Corsair AX860i 860W, Keyboard: Logitech G19, Mouse: Corsair M95, Storage: Intel 730 Series 480GB SSD, WD 1.5TB Black

Display: BenQ XL2730Z 2560x1440 144Hz

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, trag1c said:

The entire ideology behind D3D9 was found to be flawed and inefficient in comparison to DirectX10/11.

  

Firaxis with their Lore engine discovered that when you apply D3D11 ideology/thinking to a D3D9 interface you get massive performance improvements. So by programming DirectX9 like it was 10 or 11 you get significantly higher performance. 

 

So its only natural that being able to completely redevelop the back end of D3D9 will yield massive improvements.

I heard that the benefits come from reducing CPU overhead. D3D9 games tend to be CPU bound, so lower CPU overhead increases performance.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, ryao said:

I don't think anyone has made an explicit list as it is still in early development. Honestly, I had asked here because I wanted to find out from people with Windows systems whether what I had heard was correct. My guess is anything marked direct3d 9.0c would have a good chance of working though.

Well then I'd have to check my list of games against a database somewhere. I do have some older games installed.

#Muricaparrotgang

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, JZStudios said:

Well then I'd have to check my list of games against a database somewhere. I do have some older games installed.

See my edit. The D9VK subreddit has videos of various games that are known to work.

Link to comment
Share on other sites

Link to post
Share on other sites

9 minutes ago, ryao said:

See my edit. The D9VK subreddit has videos of various games that are known to work.

Nice. I saw Driver Parallel Lines in there and the first thing is that it's Spanish, quickly followed by downloading a cracked copy. Hell yeah. Couldn't have done that off screen.

Also shows no comparison before and after using d9vk.

#Muricaparrotgang

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, JZStudios said:

Nice. I saw Driver Parallel Lines in there and the first thing is that it's Spanish, quickly followed by downloading a cracked copy. Hell yeah. Couldn't have done that off screen.

Also shows no comparison before and after using d9vk.

Those videos are supposed to show that D9VK renders it. Almost no one is comparing D9VK to regular Windows performance. It is used mostly on Linux because the alternative there is WineD3D, which is practically guaranteed to be slower.

 

As for using a cracked copy, that is probably because the anticheat/DRM isn't compatible with Wine. You don't need that on Windows.

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, ryao said:

Those videos are supposed to show that D9VK renders it. Almost no one is comparing D9VK to regular Windows performance. It is used mostly on Linux because the alternative there is WineD3D, which is practically guaranteed to be slower.

 

As for using a cracked copy, that is probably because the anticheat/DRM isn't compatible with Wine. You don't need that on Windows.

Yeah, I'll go with "probably."

Anyways I'll look through my installed games and give it a whirl. I'll edit this post with results.

#Muricaparrotgang

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, JZStudios said:

Yeah, I'll go with "probably."

Anyways I'll look through my installed games and give it a whirl. I'll edit this post with results.

Feel free to do a new reply. I'd get a notification for that rather than for an edit. I am curious to see how things go for people.

Link to comment
Share on other sites

Link to post
Share on other sites

Well what I'm curious to about now is the readme on the Github gives instructions for installing it on Linux. So I'll try doing as you suggested and just dropping it in the game directory, if that fails find somewhere in the syswow to drop it.

#Muricaparrotgang

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, JZStudios said:

Well what I'm curious to about now is the readme on the Github gives instructions for installing it on Linux. So I'll try doing as you suggested and just dropping it in the game directory, if that fails find somewhere in the syswow to drop it.

Don’t drop it into a system directory. I don’t know what will happen if you do, but dropping DXVK into a system directory on Windows is known to cause problems due to Windows internally relying on things that are not compatible with DXVK. It might not be the same for D9VK (given how much Microsoft has marginalized Direct3D 9), but you would be going into uncharted territory there. I really must stress the “no warranty” part of the D9VK license if you decide to put it into a system directory.

 

There are a small number of games that do not allow direct3d DLLs to be loaded from the program directory (where the .exe lives), but in general, it should just work.

Link to comment
Share on other sites

Link to post
Share on other sites

On the Github it says it may cause VAC bans... so.. I'm going to skip Insurgency. The real issue is A. Most of the games I have aren't DX9, and B. half the ones I do have are like Hacknet or FTL and... what's the point? Some of the other ones have FPS limits in place that I pretty much already hit.

So current available games to me for testing are:

Age of Wonders 3

Dirt 2

Halo Custom Edition

Lego The Hobbit

Mount & Blade

Satellite Reign (FPS locked to 100, but I now only get 40-50)

The Bureau XCOM declassified

Torchlight

 

Seems like Splinter Cell is DX8... most of those are also not DX9,0c.

#Muricaparrotgang

Link to comment
Share on other sites

Link to post
Share on other sites

11 minutes ago, JZStudios said:

On the Github it says it may cause VAC bans... so.. I'm going to skip Insurgency. The real issue is A. Most of the games I have aren't DX9, and B. half the ones I do have are like Hacknet or FTL and... what's the point? Some of the other ones have FPS limits in place that I pretty much already hit.

So current available games to me for testing are:

Age of Wonders 3

Dirt 2

Halo Custom Edition

Lego The Hobbit

Mount & Blade

Satellite Reign (FPS locked to 100, but I now only get 40-50)

The Bureau XCOM declassified

Torchlight

 

Seems like Splinter Cell is DX8... most of those are also not DX9,0c.

What matters is whether they used fixed function shaders or programmable shaders. The fixed function shaders are mostly not implemented yet. Anyway, you could just drop the files into the directory and boot the game.

 

As for VAC bans, if you are concerned, then it is better not to risk it. However, it would be really strange if Valve banned someone for using D9VK or DXVK. They not only pay for their development, but also ship them for use on Linux as part of Proton. Banning someone for using software on Windows that they tell people to use on Linux would be really weird.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×