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

[util] Re-enable direct buffer mapping for Rayman 3 #4423

Merged
merged 1 commit into from
Nov 2, 2024

Conversation

WinterSnowfall
Copy link
Contributor

@WinterSnowfall WinterSnowfall commented Nov 2, 2024

Fixes #4422. While disabling direct buffer mapping got rid of some queue syncs caused by buffer locks, which improved the game's quirky frame-rate heuristics, it seems to break some in-game effects. Guess it is what it is.

The games's SWVP mode (hackable through the game's ini) seems to rely on disabling direct buffer mapping to render properly, but since it's not recommended or exposed by the game and HWVP now works properly, that's not that big of a problem.

@WinterSnowfall WinterSnowfall marked this pull request as draft November 2, 2024 10:22
@WinterSnowfall
Copy link
Contributor Author

WinterSnowfall commented Nov 2, 2024

Also added a 60 fps lock, since the game appears to break above that, but its internal heuristics seem to rely on the set refresh rate, ergo it will probably still be less than ideal on modes above 60 Hz.

Did I mention the game's hopelessly broken in so many ways?

@WinterSnowfall WinterSnowfall marked this pull request as ready for review November 2, 2024 10:30
@WinterSnowfall WinterSnowfall marked this pull request as draft November 2, 2024 10:46
@WinterSnowfall WinterSnowfall marked this pull request as ready for review November 2, 2024 11:40
@doitsujin doitsujin merged commit c606ab0 into doitsujin:master Nov 2, 2024
4 checks passed
@WinterSnowfall WinterSnowfall deleted the d3d8-rayman3 branch November 2, 2024 15:48
@K0bin
Copy link
Collaborator

K0bin commented Nov 2, 2024

IMO we should look into why it causes visual issues rather than just reenabling direct mapping.

@WinterSnowfall
Copy link
Contributor Author

WinterSnowfall commented Nov 2, 2024

Well, the game writes to buffers outside of Unlock(), so I'm assuming that's messing with a number of things. It would be nice to solve this otherwise, because re-enabling direct mapping has broken SWVP mode (note forcing that is more of a hack, but still).

That being said, HWVP mode is now as good as it can get with this game.

@RibShark
Copy link

RibShark commented Nov 11, 2024

Yeah, this issue is caused by the game writing to certain unlocked buffers due to reference miscounting. I can fix it on the game's side, but not sure what the "correct" fix on the wrapper side would look like. Also worth noting that this happens on Windows without any graphics wrappers (at least on NVIDIA cards) so isn't strictly a dxvk bug.

@WinterSnowfall
Copy link
Contributor Author

WinterSnowfall commented Nov 12, 2024

Yeah, this issue is caused by the game writing to certain unlocked buffers due to reference miscounting. I can fix it on the game's side, but not sure what the "correct" fix on the wrapper side would look like.

Well that is indeed the problem, since we have to cater for the entire breadth and depth of the d3d8/9 spectrum, and making some games happy without breaking others is sometimes nearly impossible. The good news is that the game should be fine now in terms of rendering with its default settings, except for game engine specific jankiness, which is out of our scope to handle, so we have to rely on patches like Better Rayman 3 to address.

Also worth noting that this happens on Windows without any graphics wrappers (at least on NVIDIA cards) so isn't strictly a dxvk bug.

Yeah, I am aware the game is also broken on some modern Windows systems, however it does miraculously work fine on my Windows XP/GeForce 4 retro PC. So at some point, when all the planets were in alignment, it was indeed fully functional.

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.

Rayman 3: visual issue (D3D8)
4 participants