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

rsx/vk: Rework MSAA implementation #11665

Merged
merged 2 commits into from
Mar 17, 2022
Merged

rsx/vk: Rework MSAA implementation #11665

merged 2 commits into from
Mar 17, 2022

Conversation

kd-11
Copy link
Contributor

@kd-11 kd-11 commented Mar 16, 2022

Reimplements MSAA texturing to speed up ping-pong fbo usage by games. This causes an excessive amount of GPU<->GPU transfers and an unreasonable amount of context switches between graphics and compute on the same queue with full barriers. The old implementation we had in the past just ignored these complex situations completely as a hack, but that obviously has limits.
This new implementation treats MSAA input as a regular texture input, with the restriction that filtering is not enabled and sampling is implemented in software. This approach completely eliminates the inline graphics->transfer->compute->transfer->graphics cycle that we had for every draw call when rendering some effects at the cost of violating spec in corner cases when self-referencing fbos are found. For cases where this is a problem, we have strict rendering mode which keeps the previous compliant-but-slow behaviour.

Fixes #11642

rpcs3/Emu/RSX/Program/program_util.h Show resolved Hide resolved
rpcs3/Emu/RSX/Common/texture_cache_helpers.h Outdated Show resolved Hide resolved
rpcs3/Emu/RSX/Common/texture_cache_helpers.h Outdated Show resolved Hide resolved
rpcs3/Emu/RSX/VK/VKDraw.cpp Outdated Show resolved Hide resolved
@jeremybris
Copy link

jeremybris commented Mar 16, 2022

Might fix #7078 . I can't test. I don't have an Nvidia GPU anymore. For anyone with an RTX GPU, at high resolutions and Anti-Aliasing on "Auto", basically what happened was you would have a huge slowdown, 50% or more, when looking at multiple vehicles, so at the beginning of every race.

@kd-11
Copy link
Contributor Author

kd-11 commented Mar 16, 2022

A fair point indeed. NVIDIA is disproportionately affected when MSAA resolve and unresolve is required due to hardware limitations. This should improve things for some other titles such as GT HD as well.

@JimScript
Copy link

Well LBP has been fixed, but motorstorm still has a large gpu requirement on my RTX 2070 super. I don't think that the problem is related to AA, because I Turned it on and off with no noticeable gpu differences. Strangely, the gpu usage basically halves when a race is paused.

@Yahfz
Copy link
Contributor

Yahfz commented Mar 16, 2022

Well LBP has been fixed, but motorstorm still has a large gpu requirement on my RTX 2070 super. I don't think that the problem is related to AA, because I Turned it on and off with no noticeable gpu differences. Strangely, the gpu usage basically halves when a race is paused.

Is that a regression though?

@Darkhost1999
Copy link
Contributor

Is that a regression though?

Looks like it was a reply to the might fix.
#7078

@JimScript
Copy link

JimScript commented Mar 16, 2022

Yes, I was replying that in my experience, this pull does not fix or affect #7078. It might help a little, but I am still gpu bottlenecked at higher resolutions.

@Darkhost1999
Copy link
Contributor

At first got a fatal error. Nothing clearing cache couldn't fix though.
YEEHAW!
image
RPCS3.log

@hoholee12
Copy link

This introduces alpha transparency issue on Gran Turismo 5. Strict rendering mode fixes it but performance suffers.

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

Successfully merging this pull request may close these issues.

MSAA Performance Regression
7 participants