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

VideoCommon: Remember to flush command buffers after multiple EFB copies #10777

Merged
merged 1 commit into from Jul 13, 2022

Conversation

TellowKrinkle
Copy link
Contributor

When using deferred readbacks, there was a system set up to not flush command buffers if multiple EFB copies were issued in succession, but it only ever checked whether it needed to flush when an EFB copy was issued, so things ended up looking like this (CPU/GPU activity traces from Metroid Prime 3 Elysia @ 3x IR):
image

After the change, which also rechecks whether it needs to flush after each draw:
image

Brings the scene in question from 53fps to 60fps on my laptop.

Side note, counter is updated after every EFB copy, so if the cutoff was 10 and the following was issued:
EFB Copy, 4 Draws, EFB Copy, 4 Draws, EFB Copy, 4 Draws, EFB Copy
there would be no flushes in the middle (or at the end).

No flush at the end is definitely a bug, but is no flushes in the middle a bug? I went back and forth on this, and in the end settled on "no" (though the above screenshot is actually from when I was on "yes", you can see one extra command buffer submission in the middle of the readbacks because of it), but some outside input would be nice.

@TellowKrinkle TellowKrinkle force-pushed the EFBFlush branch 2 times, most recently from 087c9f2 to d66c4ff Compare June 26, 2022 06:07
@JMC47
Copy link
Contributor

JMC47 commented Jun 29, 2022

This does seem to generally increase performance in Metroid Prime Trilogy with deferred readbacks, but the gains tend to vary per area. Elysia is the big winner for sure.

@JMC47 JMC47 merged commit e237aa1 into dolphin-emu:master Jul 13, 2022
11 checks passed
@TellowKrinkle TellowKrinkle deleted the EFBFlush branch July 14, 2022 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants