• 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 ... 67 68 69 70 71 ... 356 Next »

What exactly causes shader cache stuttering?
View New Posts | View Today's Posts

Pages (4): « Previous 1 2 3 4 Next »
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
What exactly causes shader cache stuttering?
04-08-2015, 04:33 AM
#11
Rikimaru Offline
Junior Member
**
Posts: 17
Threads: 0
Joined: Mar 2014
Would it be possible to write SPIR-V (Vulkan's Intermediate Language for Native Representation of Graphical Shaders and Compute Kernels) instead of shader's source?
Find
Reply
04-08-2015, 06:58 AM
#12
Fiora Offline
x86 JIT Princess
**********
Developers (Some Administrators and Super Moderators)
Posts: 238
Threads: 0
Joined: Aug 2014
SPIR-V still needs to be compiled; it's just an IR.
Website Find
Reply
04-08-2015, 08:31 PM
#13
Rikimaru Offline
Junior Member
**
Posts: 17
Threads: 0
Joined: Mar 2014
Is not compiling IR much faster?
Find
Reply
04-08-2015, 09:33 PM (This post was last modified: 04-08-2015, 09:45 PM by Fiora.)
#14
Fiora Offline
x86 JIT Princess
**********
Developers (Some Administrators and Super Moderators)
Posts: 238
Threads: 0
Joined: Aug 2014
Parsing/lexing should take negligible time compared to the actual compilation process, in almost any language. I think the main purpose of SPIRV is to help eliminate all the bugginess caused by the proliferation of awful frontends, plus allow the creation of common optimization passes that aren't specific to a particular GPU. But those still have to run, and still take time, I think.
Website Find
Reply
04-08-2015, 09:58 PM
#15
tueidj Offline
Senior Member
****
Posts: 555
Threads: 0
Joined: Apr 2013
(04-03-2015, 12:29 PM)NaturalViolence Wrote: Wait the compiling is done by the drivers not dolphin?  There are many games where the stutters often last several seconds, is that entire time seriously spent with the application waiting for the drivers to compile a shader?  What on earth could the drivers possibly be doing specifically that would take that long?
One does not question compilation speed.
[Image: compiling.png]
Find
Reply
04-09-2015, 01:04 AM
#16
mimimi Offline
Senior Member
****
Posts: 706
Threads: 1
Joined: May 2014
What about the "quick and dirty" alternative of sharing the source code for the shaders? And then Dolphin compiles all missing shaders for the game when it's started?

Also, just to be sure, Dolphin writes the shaders async to HDD, right? If it doesn't/wouldn't that would be one major source for stuttering.
Find
Reply
04-09-2015, 01:42 AM
#17
Fiora Offline
x86 JIT Princess
**********
Developers (Some Administrators and Super Moderators)
Posts: 238
Threads: 0
Joined: Aug 2014
Writing to the disk is always async unless you flush afterwards; the OS handles buffers in between and will often write it seconds later than you actually requested the write. it's reading that's inherently synchronous by default.

Sharing shader sources might be possible, but they can change significantly between Dolphin versions, and Dolphin has many workarounds in its shader generation that depend on the precise features supported by a given graphics driver, or even based on the current graphics settings (e.g. "per pixel lighting" changes shader generation, IIRC).
Website Find
Reply
01-15-2016, 01:11 AM
#18
phly95 Offline
Member
***
Posts: 72
Threads: 18
Joined: Apr 2013
(04-08-2015, 03:57 AM)JosJuice Wrote:
(04-08-2015, 03:47 AM)bomblord Wrote: What about pre-compiled shaders? I would be willing to play through a few games and then upload my shader cache. Get enough people and you could have shader packs that people could download. How big do the shader caches typically run? If their not too big you could download them when it detects said game in your library similar to how it downloads a picture that represents the game.
The compiled shaders are different not only between games but also between Dolphin versions, graphics cards and graphics backends. A shader pack would be useful for so few people that it's not worthwhile. (Also, the pictures for the games are not downloaded.)

Couldn't this be solved by creating a compile list that is downloaded, and on first run, the computer will compile all the shaders before starting the game? Before compiling, the code is the same for every gpu, so just cache the code and store it in a shader pack for future use.
MOBO/case: Dell XPS Desktop
OS: Windows 10 Pro, 64-Bit
CPU: Intel i7-920 Bloomfield (1st Generation)
GPU: AMD HD 7850
RAM: 6 GB DDR3
Find
Reply
01-15-2016, 03:52 AM
#19
leolam Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 1,489
Threads: 5
Joined: Sep 2015
The problem is that Dolphin doesn't know which shaders it will have to compile ahead of time, until the game needs it. So no, Dolphin cannot compile all shaders before starting the game. And the code would not always be the same: it can still change depending on the graphical settings, backend and Dolphin version, and also if you've changed your GPU.
Website Find
Reply
01-15-2016, 04:09 PM
#20
mbc07 Offline
Wiki Caretaker
*******
Content Creators (Moderators)
Posts: 3,291
Threads: 27
Joined: Dec 2010
And BTW, phire already started working on uber shaders. It's still WIP and it hadn't received updates for a while but as far as I tested most (if not all) stuttering are gone...
HP ENVY dv6-7300 Notebook PC                 ASRock Z97M OC Formula
CPU: Intel Core i7-3630QM @ 2.4 GHz          Intel Pentium G3258 @ 4.2 GHz (OC)
GPU: NVIDIA GeForce GT 650M @ 2 GB GDDR5     NVIDIA GeForce GT 440 @ 1 GB DDR3
RAM: 16 GB @ DDR3-1600 (2x8 GB)              16 GB @ DDR3-1600 (4x4 GB)
OS:  Windows 10 (Insider Preview)            Windows 10 (version 20H2)
Find
Reply
« Next Oldest | Next Newest »
Pages (4): « Previous 1 2 3 4 Next »


  • 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