protonscr

C&C Generals Zero Hour determinism issue between DX8.1 & DXVK clients

dxvkclosed questiond3d8
doitsujin/dxvk#5007 · opened 2025-06-13 by doomx85 · updated 2025-06-17 · 8 comments · github
Ddoomx85 2025-06-13 github

Eyo guys. There are issues between clients using native dx8.1 & dxvk when playing online. There have been reports that people playing with dxvk cause more mismatches. Personally I've noticed that when we all use dxvk its mostly fine but when someone with a different GPU arch, CPU or dx8.1 joins, the games mismatch before 10-15minutes. If there are any suggestions i'm willing to test things if you guys have and insights on how to go about it.

The online C&C GEN/ZH community heavily relies on dxvk since most players use laptops and the game chooses the iGPU first regardless of driver/windows settings which usually have many issues unrelated to dxvk (eg. Intel iGPUs).

The "GenPatcher" dev doesn't advise people use dxvk unless they don't have an option to disable the iGPU in BIOS which is undesirable for laptops but OK for PCs.

I've added a custom config that I use across different games while knowing some probably don't apply to GEN&ZH.

If you guys have any insights on how to create a config file that would make the online games between dx8.1 & dxvk clients 'deterministic at all costs' regardless of performance penalties, it would be greatly appreciated by the generals online community.

If any more info is needed I'm willing to provide it.

PS: Even if you recommend everyone migrate to dxvk :D

Software information

C&C Generals & Zero Hour, DX8.1, x86, GenTool + GenPatcher, max details except heat effects which don't work with MSAA & SSAA

System information

  • GPU: RX 6800
  • Driver: 25.6.1
  • DXVK version: 2.6.2

Log files

info: dxvk.hideIntegratedGraphics = True
info: d3d9.seamlessCubes = True
info: d3d9.maxFrameLatency = 1
info: d3d9.sincosEmulation = True
info: d3d9.samplerAnisotropy = 16
info: dxvk.enableGraphicsPipelineLibrary = False
info: d3d9.strictPow = True
info: d3d9.floatEmulation = Strict
info: d3d9.deviceLocalConstantBuffers = True
info: dxvk.trackPipelineLifetime = False
info: dxvk.enableMemoryDefrag = False
info: d3d9.lenientClear = False
info: d3d8.forceLegacyDiscard = True
info: d3d9.invariantPosition = True
info: d3d9.strictConstantCopies = True
info: d3d9.cachedDynamicBuffers = True
info: d3d9.forceSwapchainMSAA = 8

BBlisto91 2025-06-13 github

What is a mismatch? You mean desync?
Also have you tried without all the random configs?

Ddoomx85 2025-06-13 github

What is a mismatch? You mean desync? Also have you tried without all the random configs?

Ohh yes the game calls desyncs mismatches 😄 The reports have all been from defaults. I suspect sincosemulation & floatemulation interefere with gamelogic the most.

I posted config logs so people could suggest which settings specifically could be used to mimic dx8.1 the closest for online play.

The game is extremely buggy and any little thing makes it go kaboom.

If you have any suggestions we'd really appreciate it 😊

Ddoomx85 2025-06-13 github

PS: no errors or warnings on default or custom in d3d9.log only 1 warning in d3d8.log which was noted in 2.6.1 & fixed in 2.6.2 😄

WWinterSnowfall 2025-06-13 github

Eyo guys. There are issues between clients using native dx8.1 & dxvk when playing online. There have been reports that people playing with dxvk cause more mismatches.

There's no reason for anything in dxvk or the graphics side of things to influence the game's netcode. I am aware that the game ties physics and pathfinding to framerate, but it's not like dxvk has any say in that. Perhaps there is a problem, as you say, but the blame is misplaced.

I've added a custom config that I use across different games while knowing some probably don't apply to GEN&ZH.

There's no reason to use any custom config options with dxvk, the defaults are optimal 99.9% of the time. I know this goes against a tinkerer's ethos, but I'd strongly advise to refrain from changing anything unless you absolutely have a reason to do so.

If you guys have any insights on how to create a config file that would make the online games between dx8.1 & dxvk clients 'deterministic at all costs' regardless of performance penalties, it would be greatly appreciated by the generals online community.

Again, dxvk has no say in any "determinism" when it comes to the game's netcode, at least not any more than native d3d8 has. It will behave as a native d3d8 implementation would. This is even one of the goals of the projects, namely an accurate emulation of graphical capabilities offered by native d3d.

I suspect sincosemulation & floatemulation interefere with gamelogic the most.

These are purely graphical options and don't feed back into game code in any way, so the assumption is invalid. They won't affect a game's mathematical calculations in any way and are only considered for rendering, which is entirely transparent to the game.

P.S.: I guess you can give d3d8to9 a go on Windows and see if that behaves any better in multiplayer? Though, as I've said before, I seriously doubt anything on the graphical side of things is causing the issues you are seeing.

Ddoomx85 2025-06-13 github

Thanks so much for the response & clarification. Much appreciated! 😁

PS: you def hit with the tinkerers ethos 🤣

Ddoomx85 2025-06-13 github

If I get a hold of a replay file that mismatches using dxvk but doesn't on dx8.1 i'll post it here for you guys, maybe that will give you more insight into the desync issue between clients.

WWinterSnowfall 2025-06-13 github

maybe that will give you more insight into the desync issue between clients.

Even if that provides some level of detail, I'd expect it to be useful only for GenTool/any open-source project based on the game, not for dxvk. The game will always make the same d3d calls regardless of other factors (and only those are visible or matter as far as dxvk is concerned).

Ddoomx85 2025-06-13 github

Thanks for the clarification WinterSnowfall! 😄 Wish you all the best 😁

Nothing extracted yet.