Dolphin, the GameCube and Wii emulator - Forums

Full Version: Possible stop-gap to improve framerate with games that require EFB->RAM
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
I recently had an idea for improving framerate with EFB->RAM. I have no idea what the side effects would be for every game that needs EFB->RAM to work properly. Basically, it would be a setting where Dolphin does EFB->Texture (n-1)/n frames, and EFB->RAM 1/n frames.

I tested my idea on Metroid Prime Trilogy: MP1. Normally I get ~37fps with EFB->Texture, and ~8fps with EFB->RAM. With the 4:1 switching, I get ~25fps. There is a noticeable lag (a slight jerkiness) when using the x-ray visor, which is the only time MP1 /needs/ EFB->RAM, but it's still better than the 8fps I'm getting with the current build. I also tried it at a 9:1, and the result was ~33fps with no noticeable increase in the lag on the x-ray visor (compared to the 4:1 ratio).

The way I implemented my idea isn't the best- there's no way to make it not switch between EFB->Texture and EFB->RAM except by disabling it, but I think it's a useful idea. Possibly a developer with a better understanding of the code could implement it better.

In any case, this is what I did to test it out:

In "Source/Plugins/Plugin_VideoOGL/Src/Render.cpp" (starting at line 1420):
Code:
    frameCount++;
    //EFB switching test:
    g_Config.bCopyEFBToTexture = true;
    if (frameCount % 10 == 0) {
        g_Config.bCopyEFBToTexture = false;
    }

I realize that even if this idea were put into the code, it would merely be a stop-gap measure until the devs. figured out a way to make EFB->RAM comparably fast to EFB->Texture. I just really hate not being to play my favourite series because my computer can't do better than 8fps with EFB->RAM, and this idea works well enough for me until that does happen.
try skid_au's hashless builds.
(06-07-2012, 05:49 AM)Squall Leonhart Wrote: [ -> ]try skid_au's hashless builds.

No improvement. I do my own builds, and I'm using the hashless branch. The only difference between skid's builds and mine- at least as far as the source code is concerned- is that I also use the ES_LAUNCH branch. As far as the build, my builds are built on the computer I run Dolphin on, so they are optimized for the computer Dolphin is run on. skid's aren't, so they can't be better- only as good.
........why on earth would you do that?

This will defeat the entire point of efb copy to ram.
(06-07-2012, 05:59 AM)NaturalViolence Wrote: [ -> ]........why on earth would you do that?

This will defeat the entire point of efb copy to ram.

Because when I play Metroid Prime on Dolphin, the x-ray visor doesn't work unless EFB is copied to RAM, and when EFB is copied to RAM, I only get ~8fps.

By having Dolphin do EFB->RAM every tenth frame, and EFB->Texture the other nine, I have a decent framerate of ~33fps, and I can still use the x-ray visor. It's basically doing the same thing that repeatedly pressing 5 does when you have hotkeys enabled, except it does it faster, automatically, and skips EFB Disabled.

What makes you think this option defeats "the entire point of efb copy to ram"?
Because most of your frames aren't being rendered with efb copy to ram. Making this terribly inaccurate.
(06-07-2012, 06:14 AM)NaturalViolence Wrote: [ -> ]Because most of your frames aren't being rendered with efb copy to ram. Making this terribly inaccurate.

Less inaccurate than pure EFB->Texture, and with a (much) better framerate than pure EFB->RAM. And while it is true that I've only tested it in MP1 and MP2 on Metroid Prime Trilogy, the results are better than pure either, since 1) It actually works, unlike EFB->Texture, and 2) it's actually at a playable framerate, unlike EFB->RAM.

Obviously I would rather be using EFB->RAM, but at least with my computer- which, by the way, is no slouch- I can't get a framerate high enough to be playable at this point. Which is why I called this idea a stop-gap, i.e. something to use while EFB->RAM is too slow to be worthwhile.
Yes, i have tried this before. If i remember correctly, this technique makes the spinning coins in New super Mario bros jerky.

I have also tried putting it on a thread. That broke super Mario sunshine.
(06-07-2012, 08:04 AM)skid Wrote: [ -> ]Yes, i have tried this before. If i remember correctly, this technique makes the spinning coins in New super Mario bros jerky.

I have also tried putting it on a thread. That broke super Mario sunshine.

Well, I was thinking having it be an option, not replacing the current methods. That way, for games it helps, like MPT, we can have it on, and for the rest, we can just not use it.

I don't have NSMW, so I don't know how much it affects that game, but if that game needs EFB->RAM and has a horrible framerate using it as well, well, personally, I can deal with jerky coins.
Yet another game specific hack. I'm sure they'll love that. Get on irc and tell them about it so you can receive the love.
Pages: 1 2 3 4 5 6 7