protonscr

SimCity Societies: Destination won't launch due to strict guards rejecting non-color cubemaps

dxvkclosed d3d9
doitsujin/dxvk#5633 · opened 2026-05-14 by GlennMey · updated 2026-07-19 · 9 comments · github
GGlennMey 2026-05-14 github

SimCity Societies: Destinations D3D9 Crash on newer DXVK versions than 2.3.1

AI Disclaimer: GPT 5.4 XHigh was used to debug this together with GhidraMCP
This text was predominately created by GPT 5.4 XHigh as well.

  • On failing builds, Wine reports a null-read crash in game code at 0x00874076.
  • Older DXVK builds and WineD3D work correctly.
  • DXVK 2.3.1 works.
  • DXVK 2.4 is the first known bad version.
  • DXVK 2.7.1 fails.

Removing two D3D9 checks that reject non-color cubemaps allowed the game to launch successfully.

Software information

System information

  • GPU: AMD Radeon AI PRO R9700 (RADV GFX1201)
  • Driver: radv 26.1.0
  • Wine version: wine-11.8
  • DXVK versions tested:
    • 2.3.1 working
    • 2.4 failing
    • 2.7.1 failing
  • Local DXVK source revision used for workaround build:
    • Commit: 60978eb94c9ae51609b155f4f7e4c7f6f2fb6105
    • Version string from DXVK log: v2.7.1-591-g60978eb9+
  • OS: CachyOS
  • Wine prefix: /home/glenn/.wine
  • Game directory: /home/glenn/.wine/drive_c/SIMCITY

Investigation

The failing code path decompiled into a function associated with texturecube.cpp.

  • The game was dereferencing a cube texture pointer that had not been populated.
  • That strongly suggested that a cubemap creation or cubemap capability check was failing earlier than the game expected.

Two guards were found that reject non-color cubemap formats:

  • In src/d3d9/d3d9_adapter.cpp, inside D3D9Adapter::CheckDeviceFormat
  • In src/d3d9/d3d9_common_texture.cpp, inside D3D9CommonTexture::NormalizeTextureProperties

Workaround

  • Remove the D3D9 adapter check that returns D3DERR_NOTAVAILABLE for cubemaps when mapping.Aspect != VK_IMAGE_ASPECT_COLOR_BIT
  • Remove the D3D9 texture creation check that returns D3DERR_INVALIDCALL for cubemaps when mapping.Aspect != VK_IMAGE_ASPECT_COLOR_BIT

Code changes to fix the crash

diff --git a/src/d3d9/d3d9_adapter.cpp b/src/d3d9/d3d9_adapter.cpp
@@
-    if (RType == D3DRTYPE_CUBETEXTURE && mapping.Aspect != VK_IMAGE_ASPECT_COLOR_BIT)
-      return D3DERR_NOTAVAILABLE;
-
diff --git a/src/d3d9/d3d9_common_texture.cpp b/src/d3d9/d3d9_common_texture.cpp
@@
-    // Cube textures with depth formats are not supported on any native
-    // driver, and allowing them triggers a broken code path in Gothic 3.
-    if (ResourceType == D3DRTYPE_CUBETEXTURE && mapping.Aspect != VK_IMAGE_ASPECT_COLOR_BIT)
-      return D3DERR_INVALIDCALL;
-
Ddoitsujin maintainer 2026-05-14 github

I'm not going to read through this AI-generated wall of gibberish. If there's an actual issue, post the log, post an apitrace, post/show what the issue is in a few words, but please, for the love of fuck, don't waste our time with this garbage.

Edit, ok, skimming through the actual text it seems like GPT wants us to break Gothic 3 again, not gonna do that.

GGlennMey 2026-05-14 github

Ah yes, sorry about that, anyways this can stay here as a guide for future SimCity Societies fans, if they want to get it working with the latest version of DXVK :)

Thanks, and sorry, I cleaned it up quite a bit. Wall of text should be no more.

WWinterSnowfall 2026-05-15 github

@GlennMey Does this game even run on modern Windows?

I've run some tests against both Windows XP/ancient drivers and Windows 11/modern drivers (with help from @Blisto91).

Windows 11/modern drivers don't report any depth format support for cube textures in CheckDeviceFormat, nor do they allow creation of depth format cube textures in CreateCubeTexture.

WineD3D reflects Windows 11/modern drivers behavior, much like DXVK at the moment.

Windows XP/ancient drivers on the other hand do both report support and allow the creation of depth cube textures for D3DFMT_D16, D3DFMT_D24X8 and D3DFMT_D24S8.

... which would indicate some ancient loophole some games perhaps abused.

GGlennMey 2026-05-18 github

@WinterSnowfall I am checking Windows 11, give me a couple of days. (Don't have Windows installed atm)

Qqinlili23333 2026-05-28 github

Tested game with same SecuROMLoader on Win11 25H2 with 11th Intel and 3060 Laptop. Game won't start with or without DXVK. So I suppose this game cannot run with modern GPU drivers (if someone can also test AMD).

Nothing valuable with log.
SCSDestinations_d3d9.log

Game has anti-debugging so x32dbg cannot debug it properly.

Artifact from https://github.com/doitsujin/dxvk/pull/5634 won't work on Windows at least.

Catched dump file without DXVK.
WERABAF.tmp.zip

Some seems useless or not apitrace file
SimCitySocieties.zip

WWinterSnowfall 2026-06-02 github

@GlennMey Windows jank aside, can you confirm that the PR fixes the issue on Wine/Proton for you?

GGlennMey 2026-06-02 github

Can confirm that it runs on the PR! 🤓

Image
WWinterSnowfall 2026-06-02 github

Can confirm that it runs on the PR! 🤓

Thank you for confirming. I guess it will have to do then.

So I suppose this game cannot run with modern GPU drivers (if someone can also test AMD).

Not all that surprising, because no modern drivers will allow the creation of depth format cube textures these days...

Artifact from [#5634](https://github.com/doitsujin/dxvk/pull/5634) won't work on Windows at least.

... but the PR should fix things even on a (Vulkan capable) toaster OS, so I guess it would work if whatever other issue(s) it has on modern Windows are sorted, assuming that's even possible.

YYeldhamDev 2026-07-19 github

Sorry for asking this in an unrelated issue report but:

@GlennMey How did you manage to make this game run? I'm trying on my end but it only results in a black screen followed by an error dialog.

Upstream links