Skip to content

Version 2.0

Latest

Choose a tag to compare

@WinterSnowfall WinterSnowfall released this 18 Jul 06:01
d849777

We've had one round of performance improvements, yes, but what about the second round of performance improvements?, an inquisitive hobbit might ask. Well, that time is now, and it comes from partially unexpected sources.

This release rounds up quite a few bug fixes and general performance boosts, and although it is mostly a symbolic version tag, it does quite literally come with a 2x(+) performance increase in some CPU limited scenarios, so it only seems fitting to bump the major versioning at this point.

Further improvements to ProcessVertices

The previously delayed improvements to ProcessVertices call handling have now landed, thanks to @CkNoSFeRaTU, who put in a lot of effort to devise handrolled SSE helpers for all our CPU intensive calculations. Together with some tweaks/workarounds in the area of buffer access and uploads in such scenarios, the improvements are quite noticeable in affected games*.

Half-Life - D7VK v1.12 Half-Life - D7VK v2.0
HL_12 HL_20
Toy Story 2 - D7VK v1.12 Toy Story 2 - D7VK v2.0
Toy2_12 Toy2_20

*Note: Half-Life is capped to 60 FPS by default, and Toy Story 2 has an enforced cap of 30 FPS, but both can easily exceed those numbers with v2.0 (not without hitting various engine issues/limitations however).

Debug logging - there's no free lunch

After the previous round of CPU bottleneck removal, dealing with wrapped surface lookups (see the v1.12 release for more details), and an interesting discussion with @CkNoSFeRaTU, I decided to see if our many debug loggers, which were plastered all over some very hot paths as well, actually had a measurable impact on performance. Mind you, these are loggers which weren't shown/printed normally, however did perform various string operations anyway, which isn't exactly free real estate.

There's no better way to showcase the difference than with the usual benchmarks, and with Unreal Tournament, our go to uncapped D3D7 game, so basically a repeat of the benchmarks I ran for the v1.12 release:

3DMark '99 Max - D7VK v1.12 3DMark '99 Max - D7VK v2.0
99_v112 3DMark99_20
3DMark 2000 - D7VK v1.12 3DMark 2000 - D7VK v2.0
2000_v112 3DMark2000_20
Unreal Tournament - D7VK v1.12 Unreal Tournament - D7VK v2.0
v112 v20

Mind you, the debug loggers in question have been trimmed down and kept away from the hot paths, but not entirely removed, because, well... we still need them for debugging. Though to a lesser degree now, since thanks to @CkNoSFeRaTU apitrace has been brought up to snuff for early D3D. As a result, most of the 3DMark individual benchmarks are now entirely GPU limited, which is a very good sign indeed.

You might ask: Benchmarks are nice and all, but what does that mean for VSync-limited games, which represent the majority of the early D3D population? Well, in truth not much really, only lower CPU usage, which is still a nice improvement when you consider the fact almost all these games are single-threaded and need the CPU cycles for things outside of rendering, such as game logic.

Fixes/additions:

  • Rebased on top of the upstream DXVK 3.0.2 release.
  • Improved the performance of CPU ProcessVertices calls with handrolled SSE helpers, and fixed a few minor regressions, thanks to @CkNoSFeRaTU.
  • Added a workaround for (D3D9) MANAGED pool buffer placement targeted at DEFAULT buffers, which drastically help with upload performance when said buffers are used for SWVP/ProcessVertices calls as well. This has had a positive effect on performance in Toy Story 2: Buzz Lightyear to the Rescue, SCP - Containment Breach and practically all GoldSrc engine titles, such as Half-Life.
  • Stripped most debug loggers, and moved others away from hot paths, which apparently has had a drastic effect on performance in CPU limited scenarios.
  • Worked around a WineD3D limitation concerning video memory bump luminance format surfaces, which has fixed minor rendering issues in Dungeon Keeper 2 and the Matrox G400 TechDemo.
  • After a careful analysis of age accurate GPUs such as the Matrox G400, Nvidia Riva TNT2 and ATI Rage 128 on Windows XP, we're now reporting the POW2 and non-POW2 conditional surface dimension caps globally. This has fixed clipping issues in various games, such as Empire Earth and removed the need for specific workarounds in Total Annihilation: Kingdoms, Revenant and a few other titles.
  • Worked around projected light terrain Z-fighting on night tracks in Need for Speed: Porsche. Thanks to @CkNoSFeRaTU for helping out in determining the root cause of this game bug.
  • Addressed several oversights and potential problems in the D7VK codebase (thanks to @hourianto for spending their tokens on an LLM-driven review pass, which was mostly useful).
  • Create a HAL device in situations where a game passes an unknown GUID. This works around texture filtering issues in Revenant.
  • Simplify surface attachment handling thanks to an upstream WineD3D DDraw bug being fixed, which speeds up all surface Flip calls.
  • Fixed a black screen regression affecting The Sims: Complete Collection.
  • Added a frame limit for Dungeon Keeper 2, to prevent runaway flame/water surface animations.
  • Fixed a regression which caused some materials to be erroneously updated as if they were the currently set device material.
  • Finalized the removal of stipple caps from reported device features, also based on observed values reported by age-accurate video cards.
  • Only report D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT as a device FSAA capability, as per observed behavior of age-accurate video cards.

That's it, enjoy! And sorry for gutting performance with excessive logging up until now, but those loggers were quite essential in the early development of D7VK, though their impact on performance was largely underestimated (so I was extra generous in sprinkling them everywhere 😅). Things are more streamlined now that they're retired and we'll thank them for their service.

P.S.: Note that games running uncapped will now generally incur a higher GPU usage, since the CPU has more cycles at its disposal to drive rendering - it's a feature, not a bug.