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


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › General Discussion v
« Previous 1 ... 152 153 154 155 156 ... 366 Next »

Why do some games run faster the second time around?
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Why do some games run faster the second time around?
11-11-2013, 10:09 AM
#1
drhycodan Offline
Senior Member
****
Posts: 740
Threads: 160
Joined: Apr 2013
During specific areas of some games, it'll run noticeably jerkier the first time (especially after a couple hours). But after closing Dolphin and restarting the game at that spot, the speed will be back to normal. I've noticed games that usually do this are set to EFB to RAM. Anyone know what the issue is?
Find
Reply
11-11-2013, 10:49 AM
#2
NaturalViolence Offline
It's not that I hate people, I just hate stupid people
*******
Posts: 9,012
Threads: 24
Joined: Oct 2009
Shader caching. After the shader is compiled the first time the compiled code is stored in a cache. On subsequent function calls the emulator can pull code directly from the cache instead of compiling the shader again.
"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
11-11-2013, 11:19 AM (This post was last modified: 11-11-2013, 11:19 AM by slax65.)
#3
slax65 Offline
Senior Member
****
Posts: 319
Threads: 56
Joined: Jan 2011
Is there a function, that Dolphin looks through the game-datas and caches every shader?
Find
Reply
11-11-2013, 12:29 PM
#4
Shonumi Offline
Linux User/Tester
**********
Administrators
Posts: 6,480
Threads: 54
Joined: Dec 2011
(11-11-2013, 11:19 AM)slax65 Wrote: Is there a function, that Dolphin looks through the game-datas and caches every shader?

I'm pretty sure the only way to generate those shaders is to run Dolphin. It's probably not as simple as having the data Dolphin needs conveniently stored in a predictable place on the ISO or game file.
Website Find
Reply
11-11-2013, 12:32 PM
#5
pauldacheez Offline
hot take: fascism is bad
*******
Posts: 1,527
Threads: 1
Joined: Apr 2012
Dolphin doesn't look through the game to find shaders to cache, it generates the shaders depending on what parameters the game asks the GPU to render with. The GameCube/Wii GPUs don't use shaders and are not shader-based in any way, and neither do the games ever use/generate shaders; Dolphin uses shaders to emulate various parts of those GPUs. The shaders are cached after compilation because, naturally, compilation isn't instant – gotta shave every cycle we can off the CPU's massive workload.

Preemptively generating/compiling/caching shaders is kinda ridiculous/impossible since you'd have to figure out every combination of parameters a game would want the GPU to render with. It's kinda similar to why you can't just pre-recompile a game's executable and instead have to use a JIT that recompiles the code as it's given to the CPU – you can't easily know everything a piece of software will want to do before you run it, and if you *do* figure out a way, there can be either an infinite or finite-but-really-fucking-huge amount of results that you'd have to generate and cache by brute-force, by which point the long waits for generation and the amount of disk space and the ever-increasing cache-lookup-and-fetch time easily kill off any benefits of caching all this shit anyway.
<@skid_au> fishing resort is still broken: http://i.imgur.com/dvPiQKg.png
<@neobrain> dafuq
<+JMC47> no dude, you're just holding the postcard upside down
----------------------------------------
<@Lioncash> pauldachz in charge of shitposting :^)
Website Find
Reply
11-12-2013, 09:26 AM
#6
drhycodan Offline
Senior Member
****
Posts: 740
Threads: 160
Joined: Apr 2013
So is there any way to speed up the cache process? Would lowering the IR help? Or is using EFB to texture the only way to avoid this?
Find
Reply
11-12-2013, 09:36 AM (This post was last modified: 11-12-2013, 09:36 AM by DJBarry004.)
#7
DJBarry004 Offline
Don't even bother...
*******
Posts: 2,456
Threads: 33
Joined: Sep 2013
Lowering IR helps, but not by too much. It adds about 5-25 FPS (depending on the game).
Rig 1: Windows 10 Home | AMD A6-1450 @ 600/1000/1400 MHz | AMD Radeon HD Graphics 8250 | 4GB RAM | HP Pavilion TouchSmart 11.

Rig 2: Windows 10 Pro | Intel Core i7-2640M @ 780/2800/3500 MHz | Intel HD 3000 Mobile | 8GB RAM | Dell Latitude 6320.
Find
Reply
11-12-2013, 12:04 PM
#8
NaturalViolence Offline
It's not that I hate people, I just hate stupid people
*******
Posts: 9,012
Threads: 24
Joined: Oct 2009
Lowering IR should not boost fps by that much if your cpu is the bottleneck. Which in most systems it is.

I can't think of why it would speed up shader caching.

drhycodan Wrote:Or is using EFB to texture the only way to avoid this?

Using Efb copy to texture will not prevent shader caching from occurring. There is no way to prevent shader caching from occurring. And there would be no reason to do it even if there was a way as it would greatly reduce performance for no real benefit.
"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 »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode