Valheim

Valheim

Performance DX vs Vulkan
Did some short benchmarks to compare DX vs Vulkan performance today, and it would seem that Vulkan is the way to go if you want more frames.
Running at 1440p on a GTX 1080, i7 7700k @ 4.79 GHz, 32 GB 3200MHz 15-18-18-34 1T
[EDIT] Running on Windows 10. Game quality settings set to highest; DOF, motion blur, and bloom off.
DX, VK
Avg FPS: 54.1, 63.4
Min FPS: 16.7, 17.7
Max FPS: 81.6, 114.4
90th percentile: 43.1, 52.4
95th percentile: 39.5, 48.8
99th percentile: 32.6, 42.7

MsUntilDisplayed: Time spent inside the Present() API call
DX VK
Avg MsUntilDisplayed: 33.8ms, 11.5 ms
Max MsUntilDisplayed: 74.7ms, 19.1 ms
RenderPresentLatency: 7.7 ms, 11.5 ms

I noticed that on DX the GPU utilization was lower, 64.9% on average vs 75.2% with VK. Also the CPU usage was higher with DX at 55.9%, vs 43.4% VK

Of course this is just some preliminary testing but running with Vulkan seems better with my hardware anyways.
Last edited by Derpy McDerpyson; Mar 13, 2021 @ 9:44pm
< >
Showing 1-15 of 44 comments
Kaziklu78 Mar 13, 2021 @ 1:29pm 
Vulkan does give more frames but isn't as stable.
I have never had a crash under DX and Vulkan crashed consistently anytime their was a rain storm and I tried to use a smelter (outside) suggesting it doesn't like the fire or smoke effect.

If Vulkan were more stable I'd use that it just isn't ready just yet.
a passerby Mar 13, 2021 @ 1:34pm 
Originally posted by Kaziklu78:
If Vulkan were more stable I'd use that it just isn't ready just yet.

That's probably subjective to you. I've played solely using Vulkan since it was released and not once has the game ever crashed on me
Macdallan Mar 13, 2021 @ 1:39pm 
Originally posted by a passerby:
Originally posted by Kaziklu78:
If Vulkan were more stable I'd use that it just isn't ready just yet.

That's probably subjective to you. I've played solely using Vulkan since it was released and not once has the game ever crashed on me

It is. I'm using Vulkan all the time and I have never had a crash with it. I'm generally seeing a boost of at least 15 FPS with Vulkan and often more than that. The VSync also works properly with Vulkan so I'm not limited to 30 fps when I turn it on.
Shure Iam Mar 13, 2021 @ 1:43pm 
Originally posted by a passerby:
Originally posted by Kaziklu78:
If Vulkan were more stable I'd use that it just isn't ready just yet.

That's probably subjective to you. I've played solely using Vulkan since it was released and not once has the game ever crashed on me

Purely subjective, Usually as far as I know Backends are only as good as they are implemented (The same can be said about DRM)

Some games dx11 can just be... Better than dx12

A real good example of a situation where Vulkan is just hands down better is Doom as far as I know.

an example of where older DirectX implementation are better is TF2 is I remember right. Though that's partly because Weapon Skins aren't function in Older backends therefor vastly improving performance because it doesn't have to load them.

And in an example where dx12 is just barely better than 11 would be Vermintide 2
Jᴧgᴧ Mar 13, 2021 @ 1:44pm 
Originally posted by Kaziklu78:
Vulkan does give more frames but isn't as stable.
This, though I believe it may rely on GPU type and current driver. Especially on Nvidia cards, DX is (right now) much more stable overall for a lot of people. Right after Vulkan was turned on for Valheim, there were a rash of instability reports.

Originally posted by Macdallan:
The VSync also works properly with Vulkan so I'm not limited to 30 fps when I turn it on.
Vsync works fine with DX in Valheim as well, you simply have to use Alt-Enter twice to force true fullscreen while it's running.
Last edited by Jᴧgᴧ; Mar 13, 2021 @ 2:43pm
Derpy McDerpyson Mar 13, 2021 @ 1:45pm 
Originally posted by Kaziklu78:
Vulkan does give more frames but isn't as stable.
I have never had a crash under DX and Vulkan crashed consistently anytime their was a rain storm and I tried to use a smelter (outside) suggesting it doesn't like the fire or smoke effect.
Interesting. I also have had no crashes on either DX or VK.
Maybe VK just does not get along with your specific setup?
Macdallan Mar 13, 2021 @ 1:46pm 
Originally posted by Jᴧgᴧ:
Originally posted by Kaziklu78:
The VSync also works properly with Vulkan so I'm not limited to 30 fps when I turn it on.
Vsync works fine with DX in Valheim as well, you simply have to use Alt-Enter twice to force true fullscreen while it's running.

I'll have to give that a try. I think I saw someone else post that before but I didn't try it because Vulkan seemed to work well for me.

Odd that the game doesn't go proper full screen when you select it from the menu. Something else for them to tweak as development progresses, I guess.

Edit: Yep, the alt-enter thing in DirectX mode worked for me. It seems like the FPS jumps around more, has a larger low/high range than with Vulkan, but it's hitting the 60 FPS limit with VSync once in a while so it seems that the top end is a bit better. I'm usually looking at 45-ish or so on the top end with Vulkan.

Edit again: Okay, I just went back in again and loaded up in Vulkan mode. Now Vulkan is in the true fullscreen mode instead of windowed full screen. Vulkan is giving me FPS that's at or very near my VSync cap of 60 fps almost all the time, so for me it appears to be the superior option as long as it remains stable for me.
Last edited by Macdallan; Mar 13, 2021 @ 2:16pm
Jᴧgᴧ Mar 13, 2021 @ 1:50pm 
Originally posted by Macdallan:
Odd that the game doesn't go proper full screen when you select it from the menu. Something else for them to tweak as development progresses, I guess.
Yeah, it's using Borderless fullscreen instead of exclusive fullscreen when you toggle the switch in the Settings. Alt-Enter twice fixes that. It would be nice for the developers to actually add a dropdown in Settings that has all the different types to choose from. Simply saying "Fullscreen" in this case is a pseudo-lie, since it still uses the Desktop-forced Vsync on.
q9c9p Mar 13, 2021 @ 1:50pm 
I suppose you did the tests on windows, for windows, just to clarify since this game runs native on linux, and windows isn't "the pc". ;P
7700K+3080FE

Both API are stable but DX giving up to 30% more fps for me.
Macdallan Mar 13, 2021 @ 1:52pm 
Originally posted by q9c9p:
I suppose you did the tests on windows, for windows, just to clarify since this game runs native on linux, and windows isn't "the pc". ;P

Yeah, for all seven of you using Linux to run Valheim - most of us do our testing on a Windows PC.
Shure Iam Mar 13, 2021 @ 1:52pm 
Originally posted by Shaurian:
Originally posted by a passerby:

That's probably subjective to you. I've played solely using Vulkan since it was released and not once has the game ever crashed on me

Purely subjective, Usually as far as I know Backends are only as good as they are implemented (The same can be said about DRM)

Some games dx11 can just be... Better than dx12

A real good example of a situation where Vulkan is just hands down better is Doom as far as I know.

an example of where older DirectX implementation are better is TF2 is I remember right. Though that's partly because Weapon Skins aren't function in Older backends therefor vastly improving performance because it doesn't have to load them.

And in an example where dx12 is just barely better than 11 would be Vermintide 2

Just took these two screenshots, one using DX and the other using Vulkan. don't know if specific camera angle really matters much, either way Vulkan ran just a tad worse.

With DX, fps didn't go below 60 (Until I hit the screenshot button), but with Vulkan is sat between 55-60

https://steamcommunity.com/sharedfiles/filedetails/?id=2423899513
https://steamcommunity.com/sharedfiles/filedetails/?id=2423899365
Jᴧgᴧ Mar 13, 2021 @ 1:53pm 
Originally posted by q9c9p:
I suppose you did the tests on windows, for windows, just to clarify since this game runs native on linux, and windows isn't "the pc". ;P
True, Windows isn't "the PC", though it has a 95% market share on Steam[www.statista.com], so it's understandable why most people would call it "the PC". :hee:
Shure Iam Mar 13, 2021 @ 1:55pm 
Originally posted by Stinky Meatbag:
7700K+3080FE

Both API are stable but DX giving up to 30% more fps for me.

Sounds about right, from what I heard DX for PC's with good CPU, Vulkan for PC's with not so good CPU's.

Though I might be getting it mixed up. maybe it was GPU and not CPU, so in that case it'd be Vulkan for lower end GPU's and DX for higher end ones.

For reference I have Ryzen 7 3700x and rtx 2080 Super.
Nesahat Mar 13, 2021 @ 2:05pm 
i5-4670K + 1060 6GB, slightly more fps (like 5 in general) in DX in exclusive fullscreen.
< >
Showing 1-15 of 44 comments
Per page: 1530 50

Date Posted: Mar 13, 2021 @ 1:22pm
Posts: 44