• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Development Discussion v
« Previous 1 … 50 51 52 53 54 … 117 Next »

Possible stop-gap to improve framerate with games that require EFB->RAM
View New Posts | View Today's Posts

Pages (7): 1 2 3 4 5 … 7 Next »
Jump to page 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
Possible stop-gap to improve framerate with games that require EFB->RAM
06-07-2012, 05:18 AM
#1
eyeonus Offline
Member
***
Posts: 85
Threads: 7
Joined: Feb 2011
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.
Find
Reply
06-07-2012, 05:49 AM
#2
Squall Leonhart Offline
Friend of local jackass
*******
Posts: 1,177
Threads: 27
Joined: Apr 2009
try skid_au's hashless builds.
[Image: squall_sig2.gif]
[Image: squall4rinoa.png]
VBA-M
Website Find
Reply
06-07-2012, 05:54 AM (This post was last modified: 06-07-2012, 06:05 AM by eyeonus.)
#3
eyeonus Offline
Member
***
Posts: 85
Threads: 7
Joined: Feb 2011
(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.
Find
Reply
06-07-2012, 05:59 AM
#4
NaturalViolence Offline
It's not that I hate people, I just hate stupid people
*******
Posts: 9,013
Threads: 24
Joined: Oct 2009
........why on earth would you do that?

This will defeat the entire point of efb copy to ram.
"Normally if given a choice between doing something and nothing, I’d choose to do nothing. But I would do something if it helps someone else do nothing. I’d work all night if it meant nothing got done."  
-Ron Swanson

"I shall be a good politician, even if it kills me. Or if it kills anyone else for that matter. "
-Mark Antony
Website Find
Reply
06-07-2012, 06:05 AM
#5
eyeonus Offline
Member
***
Posts: 85
Threads: 7
Joined: Feb 2011
(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"?
Find
Reply
06-07-2012, 06:14 AM
#6
NaturalViolence Offline
It's not that I hate people, I just hate stupid people
*******
Posts: 9,013
Threads: 24
Joined: Oct 2009
Because most of your frames aren't being rendered with efb copy to ram. Making this terribly inaccurate.
"Normally if given a choice between doing something and nothing, I’d choose to do nothing. But I would do something if it helps someone else do nothing. I’d work all night if it meant nothing got done."  
-Ron Swanson

"I shall be a good politician, even if it kills me. Or if it kills anyone else for that matter. "
-Mark Antony
Website Find
Reply
06-07-2012, 06:21 AM (This post was last modified: 06-07-2012, 06:30 AM by eyeonus.)
#7
eyeonus Offline
Member
***
Posts: 85
Threads: 7
Joined: Feb 2011
(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.
Find
Reply
06-07-2012, 08:04 AM
#8
skid Offline
skidau / skid_au
**********
Developers (Some Administrators and Super Moderators)
Posts: 2,006
Threads: 8
Joined: Aug 2009
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.
Find
Reply
06-07-2012, 08:22 AM (This post was last modified: 06-07-2012, 08:23 AM by eyeonus.)
#9
eyeonus Offline
Member
***
Posts: 85
Threads: 7
Joined: Feb 2011
(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.
Find
Reply
06-07-2012, 11:36 AM
#10
NaturalViolence Offline
It's not that I hate people, I just hate stupid people
*******
Posts: 9,013
Threads: 24
Joined: Oct 2009
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.
"Normally if given a choice between doing something and nothing, I’d choose to do nothing. But I would do something if it helps someone else do nothing. I’d work all night if it meant nothing got done."  
-Ron Swanson

"I shall be a good politician, even if it kills me. Or if it kills anyone else for that matter. "
-Mark Antony
Website Find
Reply
« Next Oldest | Next Newest »
Pages (7): 1 2 3 4 5 … 7 Next »
Jump to page 


  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma