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):
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.
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.