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

[d3d8] Add a framecap for Chrome: Gold Edition #4260

Merged
merged 1 commit into from
Sep 14, 2024

Conversation

WinterSnowfall
Copy link
Contributor

@WinterSnowfall WinterSnowfall commented Sep 14, 2024

Chrome has regressed at some point prior to the d8vk merge, during the last rebase we did.

The game is weird. It calls CopyRects on a X8R8G8B8 surface (D3DPOOL_DEFAULT) as source and a R8G8B8 off-screen surface (D3DPOOL_SCRATCH) as target. This would never work in practice (and the game indeed crashes during start-up), because CopyRects doesn't perform format conversions, especially not on unsupported formats, so I can only assume that the game relied on hardware R8G8B8 support originally.

As a workaround, we can do the opposite and force convert the target surface to X8R8G8B8 when it gets created. This seems to work fine with a minor annoyance: the screenshots captured by the game alongside save games are corrupted.

WineD3D works fine on both accounts, but unfortunately I can't quite figure out why, because the game crashes on apitrace capture.

I'll open an issue to track the screenshot problem separately, but this should be fine for now and makes the game completely playable. We probably need to implement a proper format conversion for these situations.

@WinterSnowfall
Copy link
Contributor Author

Turns out the game works fine with dxvk master on Windows 🐸. I'll draft this until we can figure out what in tarnation is going on.

@WinterSnowfall WinterSnowfall marked this pull request as draft September 14, 2024 18:33
@WinterSnowfall WinterSnowfall changed the title [d3d8] Add a R8G8B8 workaround for Chrome [d3d8] Add a framecap for Chrome: Gold Edition Sep 14, 2024
@WinterSnowfall WinterSnowfall marked this pull request as ready for review September 14, 2024 20:21
@WinterSnowfall
Copy link
Contributor Author

Well, working around issues caused by native msvcp60 has been... fun. I've kept the framecap, otherwise the game is fine in all regards 🐸.

@doitsujin doitsujin merged commit 0a2f227 into doitsujin:master Sep 14, 2024
4 checks passed
@WinterSnowfall WinterSnowfall deleted the d3d8-chrome branch September 14, 2024 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants