ValveSoftware / ValveSoftware/Proton

Shattered Union (3960)

Open
#3,008 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Game compatibility - Unofficial
Dominant language
C++
Stars
32.8k
Forks
1.6k
PR merge metrics
PR metrics pending

Description

Compatibility Report

  • Name of the game with compatibility issues: Shattered Union
  • Steam AppID of the game: 3960

System Information

I confirm:

  • that I haven't found an existing compatibility report for this game.
  • that I have checked whether there are updates for my system available.

steam-3960.log

Symptoms

Systems that report more than 2066MB of texture memory trigger a bug in the game that causes it to crash. This happens on Windows. If you use Intel integrated graphics, you are fine. If you boot with your system set to 2048MB of RAM, you are fine. The PC Gaming Wiki says to use a "Blurry Texture Fix" designed for Railroad Tycoon 3 that has the side effect of making IDirect3DDevice8::GetAvailableTextureMem() return 512MB. This fixes things on Windows and presumably, also on Linux.

https://pcgamingwiki.com/wiki/Shattered_Union#Issues_fixed
http://hawkdawg.com/txt/rt3/RT3-texture_fix_README.txt
https://steamcommunity.com/app/3960/discussions/0/530645961937729857/

Rather than downloading their binary, I added a compatibility profile for the game to the registry via protontricks -c 'wine cmd /C reg add "HKEY_CURRENT_USER\Software\Wine\AppDefaults\ShatteredUnion.exe\Direct3D" /v "VideoMemorySize" /t REG_SZ /d "2066"' 3960, which made it work. I determined the 2066 value was the upper limit after doing a binary search.

Reproduction

  1. Install Steam.
  2. Set Steamplay to apply to all games.
  3. Install Shattered Union.
  4. Start Shattered Union.
  5. Observe black screen and alt tab to find an additional dialog:

image

Proposed solution

We should modify Wine to implement a MaxVideoMemorySize that we can then set to 2066 in HKEY_CURRENT_USER\Software\Wine\AppDefaults\ShatteredUnion.exe\Direct3D. The current workaround works on systems that are broken by the bug in the original software. However, reporting more texture memory than is actually available on systems with less texture memory seems like a way of introducing a regression. A MaxVideoMemorySize quirk to enforce the minimum of the current texture memory and the MaxVideoMemorySize setting would be ideal.

Alternatively, we could just force it to 512MB (which is known to work for this game) and hope that nothing ever goes wrong should hardware with less texture memory be used with this game. Given that drivers should fallback on system memory for overcommit, that could be fine.

@aeikum What would you like to do here?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing Shattered Union (Steam AppID 3960) with Proton 4.11-2 and inspect the attached steam-3960.log. No source file or test is named, so trace the Direct3D8::GetAvailableTextureMem behavior and the VideoMemorySize registry workaround first. Done means the game no longer crashes from reporting more than 2066MB of texture memory without regressing systems with less available memory.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.