[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: dxvk.jpg (162 KB, 1280x720)
162 KB
162 KB JPG
Why is running a emulation layer on Windows so much faster than running native DirectX9-11?
>>
>>106457603
DirectX is made by pajeetas at Microsoft, DXVK was created by a German and is developed by white males funded by Valve.
>>
>>106457701
/thread
>>
>>106457603
Modern GPUs and drivers are optimized for DX12, leading to better performance than trying to natively run older, less efficient calls.

Also, hardware vendors like Intel divert their driver development resources to optimizing for the latest APIs like DX12. The gap gets wider over time.

In some cases, if the emulation layer is particularly heavy or resource-intensive, it could introduce new bottlenecks, especially in CPU-bound scenarios, where a direct native path with a more efficient driver could theoretically perform better.
>>
File: Azusa Sipping Juice.jpg (88 KB, 700x699)
88 KB
88 KB JPG
GTA IV is one of the worst pc ports of all time so not really a fair example desu
>>
>>106457815
Not Saints Row 2?
>>
>>106457815
dark souls 1 original was so bad it was locked to 30fps and broke ladders if you uncapped it
>>
>>106457766
GTA IV ran like shit back in the day as well. Your opinion is so invalid as to be most likely AI generated.
>>
>>106457815
And yet dxvk fixes it entirely.
>>
>>106457866
I played GTA IV after GTA V. I was too young for GTA IV when it first came out. So I can't comment on what GTA IV was like.
>>
>>106457603
last time i checked, it was because of btrfs vs ntfs, not dxvk.
>>
>>106457603
I've tried dxvk on many games and never had any improvement, much to my chagrin.
>>
>>106457939
OP is talking about using DXVK on Windows, not on Linux, so it’d be NTFS regardless. Even if it were on Linux, WINE replicates NTs shit file handling, so I’m not convinced it’d make a huge difference.

Realistically, I imagine it’s cause DXVK has a lot less technical debt, is actively maintained, and can largely ignore hardware specific quirks by just translating everything into Vulkan.
>>
>>106457603
I assume older APIs aren't particularly optimized for anymore in newer drivers, on newer GPU architectures. DXVK on the other hand not only translates to modern stuff, but since its whole purpose is translation you can be sure they do actually care about optimizing for performance.
>>
>>106457859
A lot of jap games are fps locked and break when unlocked. No idea why they do this. It's easier maybe?
>>
>>106458055
The easiest and simplest way to make a game is to just make the main loop do everything. Take input, update the game state, render a new frame, all tied together, one after the other, running at some fixed rate. This means the frame rate is the same as the update rate. Back in the day, on consoles especially, this was done quite a lot. It's actually kind of fine to do it this way when you only have 1 CPU anyway, plus you're on fixed hardware and know exactly what your game is going to be doing. Everyone is going to be running the same game and the exact same console hardware, if it works, it works. It's very convenient in terms of timing too, if you know you always have 60FPS, then you can just time things in terms of frames (iterations of your main loop), in a more complicated system where things run independently from one another you need to actually take the wall clock into account in order to ensure the game doesn't run faster or slower depending on game performance. Also if you attempt to do this but kinda fuck it up, that's when you get funky behavior in games depending on how fast they're running. There are plenty of very old PC games with problems like this too. They were made for super ancient PCs and anything faster just breaks them.
>>
>>106457603
Because modern GPUs no longer include drivers for old stuff. I have to use dgVoodoo to play fucking Settlers 4 because they are removing more and more DirectDraw shit. DX9 getting shafted sounds normal too since it's a 20+ year old API. I think there was some recent article about the Nvidia 5000 cards doing 2-3x worse than an equivalent 4000 card too because they stopped supporting old things (I think it was 32bit PhysX?).

>>106457701
there's this too, but this is probably one of those rare instances where the problem is not Microsoft, but GPU drivers.
>>
>>106458055
The last time I made a game, I did a main loop where on every frame update, I count how much time elapsed since the last frame, then move everything according to that much time. It's probably a horrible idea and would fuck you big time but it was a simple javascript thing with no actual AI logic, just a few things going in a fixed direction. I never got to test it on anything that didn't run on 60fps so I've no clue what it would have done, but I did have everything running at a fixed "speed" so on 120Hz it probably would've just moved everything half as much.

So basically the game logic was tied to the framerate.
Wouldn't even know how to decouple the main loop from the rendering stage. Probably not even possible on javascript.

>>106458131
>There are plenty of very old PC games with problems like this too. They were made for super ancient PCs and anything faster just breaks them.
I remember we had an incredible old "wheel of fortune" style game that we played a ton in the mid 90s, but on anything Pentium 1 and above it was unplayable fast. We had to find a tool that intentionally slows down execution for just one single app.

There was also the Turbo button on old PCs that did this in hardware, because the 286/386/486 ran too fast for apps designed for the first IBM PC using a 8086.
>>
>>106458158
>>106458024
>>106457766
It has NOTHING to do with modern GPUs or backwards compatibilit and everything to do with GTA IV's bad code. GTA IV was widely regarded upon release as one of the worst PC ports of all time and could not run okay on ANY hardware configuration. Years went by, GPUs got orders of magnitude more powerful, yet there was not a single day before the release of dxvk where GTA IV ran okay on anybody's PC.
>>
>>106458216
This doesn't explain anything. Why can DXVK do while translating into another API the the driver wouldn't also be able to do while executing the original API calls? DXVK doesn't change GTA4 itself, it just changes how it interacts with the GPU driver. Anything that DXVK can do as a middle layer could also be done inside the GPU driver while serving the original API calls, it just isn't.

>>106458211
I remember people even doing shit like disabling CPU caches to get really old DOS stuff working properly and that was on "fast" CPUs like 486s and early Pentiums.
>>
>>106458512
>Why can DXVK do while translating into another API the the driver wouldn't also be able to do while executing the original API calls?

Because DXVK is made by a competent person and it works on a far higher level and on a different OS and for a different use case. It could possibly do an optimization like "only allow XY to be called 1000 times a second instead of 99999999" which happens to fix GTA4 but may potentially break, I dunno, some gpgpu call which relies on calling XY 99999999 times per second. That's just one possible explanation.
Another explanation is that the native code does some operation that has a latency of Z but dxvk found a way to do it with a latency of Z/3.
You'd need to deep dive into profiling the game code to see what it does badly.
>>
I've always wondered why GTA IV runs so poorly... Is D3D9 just not suited to handle the massive amount of drawcalls that an open world game like GTA IV would give you or what?
>>
>>106458619
>and on a different OS
dxvk is on Windows and achieves the same performance gains in GTA IV when used on Windows.
>>
>>106458733
GTA4 came out when people were running Windows XP 32bit with DX9.0, today we use Windows 10/11 64bit with DX12/Vulkan.
>>
>>106458619
>and on a different OS
DXVK works on Windows and that's literally what this thread is about, running GTA4 using DXVK on Windows.
>It could possibly do an optimization like "only allow XY to be called 1000 times a second
>native code does some operation that has a latency of Z but dxvk found a way to do it with a latency of Z/3
Right, but these literally fall within what I just said, all that shit could be done directly in the driver when running GTA4 (the driver already has per-game profiles, optimizations and fixes) but it just isn't actually done, likely because nobody gives a shit anymore about optimizing old APIs and old games for very new GPUs.
>>
>>106457603
>GTAIV
its a fucking 17 goddamn year old game what do you fucking think you fucking goddamn imbecile.
>>
>>106458216
even with DXVK it's still not great
>>
>>106458512
dxvk can optimally send draw commands to the GPU since it actually submit "native" API calls late (slow frame encoding is most likely why the game ran like shit in the first place; I would also guess that Rockstar used the shitty deferred d3d11 context or some weird multithreading implementation that worked on Xbox360 but not on PC)
>>
>>106458761
????????????????????????????????????????????????????????????? dxvk lets modest PC's get 0.1% lows above 100fps on GTA IV
>>
>>106458755
>Right, but these literally fall within what I just said, all that shit could be done directly in the driver when running GTA4 (the driver already has per-game profiles, optimizations and fixes) but it just isn't actually done, likely because nobody gives a shit anymore about optimizing old APIs and old games for very new GPUs.

People buy new machines to run new games, there's only a finite amount of manpower they can do do drivers, so most of it goes into new games because that's what people buy new hardware for.
They don't give a rats ass about old APIs because few people play those and no 10 billion subscriber youtube influencer is making videos of it, while for every other new game, there are.
Hell there are places like the windows services.msc console which run like ASS on modern hardware because they use some NT4.0 era UI code, and I have some apps that use old ass GDI calls that actually slow down tons of operations, but neither of these are really important to optimize because they still run fast enough for their intended jobs. They are EDGE CASES, and the drivers have to run for 99.99% of the most popular games, not some random as fuck edge case.

And DXVK got it optimized because it's a dude whose entire hobby is optimizing edge cases for old games.
>>
>>106458005
it made a huge difference for borderlands 2.
>>
>>106458796
I've never been able to get more than like a spotty 70 fps, currently using 5600X/6700XT
>>
>>106458833
Wait what? You can actually get Borderlands 2 to run fine with this? I remember that game being unable to run faster than 40-50fps on a lot of the open space scenes, even on 2020 hardware.
>>
>>106457603
>Why is running a emulation layer on Windows so much faster than running native DirectX9-11?
Because when DX12/Vulkan came out, one of the big deals was that it added extreme parallelization to make the hardware used more efficiently. Back then AMD cards supported it better and it was the only way they could get decent speeds against Geforce cards. It was this whole big deal with even /g/ trolling nonstop back and forth about it.

So if someone got DX9 code to run massively parallelized on DX12 hardware, that can lead to massive speed ups.
>>
>>106458882
Is that max framerates or 0.1% lows?
>>
Too bad GTA IV will still shit itself above 60 and even 30 fps at times. Oh and too bad no amount of frames will make the game fun and not a movie :/
>>
>>106457603
modern GPUs don't support dx9-dx11 natively they run it through internal emulation
>>
truth is, GTA 4 IS poorly optimized in the first place.
Look at the PS3 version.
>>
I was blew away when dual core cpu was announced, game simply run twice faster. Nothing else today get close to this.
>>
>>106457701
A German with a FUCKING anime profile picture. How is this acceptable?
>>
>>106460663
You can't be taken seriously as a dev if you don't have an anime pp
>>
>>106457701
fpbp
>>
>>106460618
That’s why I always buy the latest 96 cores Threadripper Pro every time I make my new gaming rig. Literally 96 times faster, I can then buy a lot weaker graphics card (less than a 100 bucks) and at the end even factoring in the mobo and cpu costs I end up saving lots of money
>>
>>106460663
>>106460734
>FUCKING anime profile picture
It's called Autism not a white male, normal white people don't do that.
>>
>>106460663
He's simply honoring the alliance. Fuck italy though.
>>
>>106461236
unfortunately many normal people have anime profiles now, the west has fallen
>>
>>106461265
https://youtu.be/F0zb5S9DGYQ
>>
>>106457908
the gta iv pc port was notoriously bad. Games for Windows Live integration was a pain in the ass, and performance was abysmal. it seemed like no matter what you had you'd get mediocre, stuttery performance.
there's a ton of patches and mods to try to mitigate things, but it seems that whatever dxvk does just does wonders for this game specifically. it runs much better using dxvk /even on windows/
>>
File: 1745194635207247.jpg (907 KB, 2000x2500)
907 KB
907 KB JPG
>>106457603
I wouldn't say DXVK runs better than native DX11, but for 9 and 10, sure, modern drivers just aren't optimized for DX9/10 anymore. I use DXVK for almost all my DX9/10 games.
>>
>>106457603
>Why is running a emulation layer on Windows so much faster than running native DirectX9-11?
Because it isn't emulation you retard.
>>
>>106461365
>wrapper that's translating instructions isn't emulation
what do emulators do then? like CPU emulators... don't the translate instructions?
>>
>>106461380
>what do emulators do then? like CPU emulators... don't the translate instructions?
So then tell me is a virtual machine an computer emulator then?
>>
>>106461417
not as far as the CPU is concerned, hence it's a virtual machine and not an emulator
>>
File: 72hz.webm (3 MB, 1600x900)
3 MB
3 MB WEBM
>>106458882
clip related i recorded in linux using an rx580 (72Hz vsync)
>>
>>106458005
>OP is talking about using DXVK on Windows, not on Linux, so it’d be NTFS regardless.
I wouldn't be so categorical.
Windows supports btrfs and can be installed on btrfs.
>>
>>106458740
this isn't a regression in windows, gta iv /never/ ran well on windows
>>
Why doesn't Microsoft just implement DXVK in Windows OS wide for all pre-DX11 games/software at this point? It seems to have literally no downsides, only benefits and it would save them from having to support the old DirectX versions.
>>
>>106457701
Why do brown "people" have to ruin everything?
>>
>>106458795
gta iv (pc) is older than d3d11
>>
>>106458795
GTA IV uses DX9.
>>
>zoomers
>youtube thumbnail
>retarded pseudo-opinions and shilling
Yeah it's /g/entoomen.
>>
>>106459781
I don't remember exactly it's been a long time

>>106461508
would be funny if 70~ fps was just an engine problem
>>
>>106457766
/thread
>>
>>106461597
Jews
>>
>>106461742
no, his post suggests gta iv's performance has regressed in modern windows, but that's not true. it was always bad
>>
should directx be completely abandoned and amd nvidia just integrate dxvk directly in kernel
add specific asic riskv module to handle calls on gpu instead of waiting for cpu conversion.
i dont think dx11 will drop as new devs are too incompetent to use vulkan
>>
>>106458935
mantle and async will always be better than whatever vulkan and opengl is now
nvidia ruined khronos project
>>
>>106458005
>Even if it were on Linux, WINE replicates NTs shit file handling, so I’m not convinced it’d make a huge difference.
ever tried installing emacs on mingw and wsl? the difference is absolutely massive, even though both are stored on ntfs in the end regardless
>>
>>106457603
Reminder that this shit ran at 20-30fps on consoles when it launched
>>
>>106461508
Cool it with the antisemitism.
>>
File: 1737579242212593.gif (1.96 MB, 640x560)
1.96 MB
1.96 MB GIF
>>106457603
>needing to watch a youtube video to show you how to drop a DLL file into a folder
>>
>>106461508
god it's an ugly fucking game though isn't it

>>106466315
heh
>>
>>106468772
>god it's an ugly fucking game though isn't it
it was made during the brown = real era so the colours tend to be a bit dull. but it makes up for it in other areas. that clip doesn't do it much justice of course, it's very heavily compressed.

for me, i used to hate the driving physics when it first came out. compared to previous games i felt like it was trying too hard to be realistic and that it was at the cost of fun, but i've since grown to appreciate it. driving in gta iv is more of a skill than in previous titles and it's much more satisfying to drive fast/well in gta iv
>>
>>106468819
(then gta v ruined it again, or rather, driving in gta v is less realistic than iv, so it feels more arcadey like the older games)
>>
>>106460663
why are you on 4chan if you do not like anime....?



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.