Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[d3d9] Total War: MEDIEVAL II: ridiculously high system memory usage when loading battles #2264

Closed
DadSchoorse opened this issue Aug 25, 2021 · 1 comment · Fixed by #2282

Comments

@DadSchoorse
Copy link
Contributor

When starting any field battle, dxvk runs out of address space on the end of the loading screen. When replaying the wined3d trace with 64bit d3dretrace and dxvk it peaks at ~9.2GB system heap usage.

Software information

Total War: MEDIEVAL II, all settings are affected.

System information

  • GPU: GTX 1060
  • Driver: 470.56.05
  • Wine version: Proton 6.3 experimental
  • DXVK version: 1.7.3 - master

Apitrace file(s)

Log files

@K0bin
Copy link
Collaborator

K0bin commented Aug 26, 2021

CME found out that this is caused by SWVP constants.
Josh suggested allocating smaller constant buffers based on either the highest accessed constant in the shader (if dynamic indexing is not used) or the highest changed constant the game sets. We would rely on robustness2 if the shader accesses constants that haven't been set, so we have to keep the 256 alignment on Nvidia GPUs in mind.

This change would also allow us to get rid of the app configs for Track Mania Nations, Sims 2 and various other games.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants