Skip to content

rsx: Avoid data loss in blit engine when WCB/WDB + RCB/RDB is active #14907

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

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

kd-11
Copy link
Contributor

@kd-11 kd-11 commented Dec 17, 2023

There is a data loss path if WCB is enabled when CELL writes to RSX mem, or RSX commands do a write that causes a flush from GPU to CPU then is overwritten. If we don't detect it in the surface "test" method (very likely due to low sample count) we just lock the memory again and the writes are lost forever. This is extremely bad in some cases because we can lose shaders and other important RSX data causing all kinds of problems and crashes.

Closes #14901
Relates to #9133

@kd-11
Copy link
Contributor Author

kd-11 commented Dec 17, 2023

Tbh all these workarounds don't solve the root cause here, but I don't think PC GPUs will ever fully adopt a page sharing setup. Even though we have userptr import support on some drivers, it seems it will never be a thing in mesa and windows support is spotty especially on NVIDIA.

Obviously none of this is a problem for a software renderer but the performance implications of that are dire. I think that is still going to be required for 100% compatibility in the end, but for now we just try to send appropriate signals to cover edge cases.

@Triticum0
Copy link

Triticum0 commented Dec 18, 2023

Retested #13358, MotoGP08, and pes 2016 and there was no change in behavior

@Augusto7743
Copy link

Thanks very much.

@Augusto7743
Copy link

Augusto7743 commented Dec 20, 2023

That PR14907 does any optimization ?
Updated from 0.0.29-15780 to 0.0.29-15827 now in some games the frame rate is more faster and freed 10 % gpu usage having the same cpu usage.
Haves others PRs between both versions being PR 14884 (asm.hpp: fix usage of _mm_prefetch) and PR 14870 (Update Vulkan to 1.3.268.0).
Host OS only was done an Linux kernel update to 6.6.5.

In any way another good optimization was done.
Thanks.

@Triticum0
Copy link

Retest MotoGP08, and pes 2016. MotoGP08 seems to be fixed when RDB +WDB is enabled. Thought PES games are still broken, even with (WCB+WDB+RCB+RDB+CPU blit)

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.

[Task] Texture load -> writeback results in corrupted data without rendering on top of the data
3 participants