Skip to content

Conversation

@abaire
Copy link
Member

@abaire abaire commented Nov 4, 2025

This change prevents direct memory buffer access to callback protected regions, forcing them to take the slow path that is protected by the callbacks. As a result, DMA access to GPU surfaces will properly trigger synchronization with the associated GPU buffer.

Fixes #1238
Fixes #583
Fixes #1264

Apparently fixes #2333

@Triticum0

This comment was marked as outdated.

@Triticum0

This comment was marked as outdated.

@abaire
Copy link
Member Author

abaire commented Nov 5, 2025

@abaire I hope you test it as well as we know that game can be really flaky so you have to verify it for me.

Edit: Tested Brothers in Arms Earned in Blood and also made it ingame

Confirmed Hill 30 makes it into the game on M3/macOS, I don't recall ever getting past the main menu without playing around in the debugger (likely changing timing enough to bypass the bug).
The game is definitely not rendered properly, I can get the pause menu to show up but nothing else (in renderdoc I can see that it has correct input textures but the output meshes are unreadable by RD).

Once this PR is merged it'd be good to get issues filed for those games, but it does indeed seem that this resolves the currently reported problem.
Edit, I guess you've already covered that in #1096

@abaire abaire marked this pull request as ready for review November 5, 2025 02:05
@abaire
Copy link
Member Author

abaire commented Nov 8, 2025

Fixes #1264 as well based on testing by @GiladN1

@antoniodesousa
Copy link

I just tested Fatal Frame II and it does goes in-game with this build. Sadly, I can't see to do much progress due a different error on both OpenGL and Vulkan. And when I say different I mean each backend crashes with a different error.

OpenGL

Microsoft Visual C++ Runtime Library 11_8_2025 6_43_18 PM

Vulkan

ERROR:../hw/xbox/nv2a/pfifo.c:426:pfifo_run_pusher: assertion failed: (0)
Bail out! ERROR:../hw/xbox/nv2a/pfifo.c:426:pfifo_run_pusher: assertion failed: (0)

Still progress considering the game gets stuck on the first loading screen on master.

@Triticum0
Copy link
Collaborator

Triticum0 commented Nov 9, 2025

Fixes #2333 and #2035 only tested first 3 level so needs more testing.

Note: I tested it on master and still experinced crash on first level so seems fixed at least on NVIDIA

@Triticum0

This comment was marked as off-topic.

@Triticum0
Copy link
Collaborator

@antoniodesousa Do you have Steel Battalion

@abaire
Copy link
Member Author

abaire commented Nov 9, 2025

Other issues with same assertion from antoniodesousa testing as not fixed on amd. Hope this helps #326, #559.

Let's keep this comment thread focused on the deadlocks/crashes that appear to be fixed by this PR; if fixing an existing deadlock allows the game to progress and exposes other issues let's file new bugs (making note that this PR is necessary to repro) or just add comments to the existing bugs. It gets very confusing if we start trying to chase down multiple issues that (hopefully) are not directly related to this change.

@Triticum0
Copy link
Collaborator

Ok, no problem it was just in case a related to issues 326 as you already have a pr fix for it. The 2 pr together could resolve assertion on amd i don't know. I hide the comment and post on respective issue about the assertion.

@abaire
Copy link
Member Author

abaire commented Nov 9, 2025

No need to hide the comment, I just don't want the PR thread to turn into a debugging discussion for issues (unless they're suspected to be caused by the PR)

@antoniodesousa
Copy link

About my previous report, it only crashes when using the M8+ bios. Still not related to the current PR.

@Triticum0
Copy link
Collaborator

Thank for confirmation. As when you mention the crashing on amd, I ask around and you where the only one matching that behaviour, amd or not

@abaire
Copy link
Member Author

abaire commented Dec 15, 2025

May resolve #1471 as well

This change prevents direct memory buffer access to callback protected regions,
forcing them to take the slow path that is protected by the callbacks. As a
result, DMA access to GPU surfaces will properly trigger synchronization with
the associated GPU buffer.

Fixes xemu-project#1238
@abaire abaire force-pushed the fix_1238_handle_dma_writes_to_surface branch from 60057f9 to a226b82 Compare January 19, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants