• 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 ... 115 Next »

OpenGL performance
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
OpenGL performance
05-17-2012, 08:03 PM
#1
degasus Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 1,827
Threads: 10
Joined: May 2012
Hello

I wonder, why the OpenGL performance is so slow, but my slow gfx card is only 20% busy. So I started to debug:

With apitrace (nice tool, also working with d3d, try it), I sniffed all opengl calls while rendering one frame of the mario galaxy intro and save it here: http://markus.members.selfnet.de/dolphin/
There is also an short version with the typical rendering of some polygons.

In this typical rendering, 3 operations are done:
- overriding all texture parameters
- overriding all shader parameters
- rendering mostly 30 vertexes

Ok, I see, the last is importent. The shader parameters also often changes. But why changing the texture every 10 polygons to the same texture?

Is it possible only to set the texture parameters on changing the texture? I think this would speed up the opengl plugin enormously.

Markus
Find
Reply
05-17-2012, 11:41 PM (This post was last modified: 05-18-2012, 12:02 AM by Starscream.)
#2
Starscream Away
Above and Beyond
*******
Posts: 4,052
Threads: 213
Joined: Jun 2009
Trying to get to the bottom of issues like this is a good idea, unfortunately you looked right passed the most important thing, your PC. It's far too weak to play anything well enough.
Asus Laptop: K53TA
OS: Windows 7 Home Premium, 64-Bit - SP1
CPU: AMD Llano A6-3400M, Quad-Core, 1.4GHz-2.6GHz (Overclocked)
GPU: AMD Radeon HD6650M, 1GB GDDR3 (Catalyst 13.1)
RAM: Samsung 4GB DDR3-1333










Find
Reply
05-18-2012, 01:22 AM (This post was last modified: 05-18-2012, 01:23 AM by delroth.)
#3
delroth Offline
Making the world a better place through reverse engineered DSP firmwares
**********
Developers (Some Administrators and Super Moderators)
Posts: 1,354
Threads: 63
Joined: Aug 2011
(05-17-2012, 11:41 PM)Starscream Wrote: Trying to get to the bottom of issues like this is a good idea, unfortunately you looked right passed the most important thing, your PC. It's far too weak to play anything well enough.

Not relevant.

(05-17-2012, 08:03 PM)degasus Wrote: In this typical rendering, 3 operations are done:
- overriding all texture parameters
- overriding all shader parameters
- rendering mostly 30 vertexes

Ok, I see, the last is importent. The shader parameters also often changes. But why changing the texture every 10 polygons to the same texture?

I think Dolphin is betting on the graphics driver optimizing redundant state changes. However I'm not sure how common this optimization is and if it is actually safe to assume that most used drivers do it (/me adds "check the Mesa source code" to his TODO list). In theory Dolphin could keep track of the state itself to avoid redundant changes, but this will add a substantial amount of code so I would like to be sure that it is actually useful before implementing this.

Also, I haven't checked but I'm pretty sure DX9 and DX11 do the same.
Pierre "delroth" Bourdon - @delroth_ - Blog

<@neobrain> that looks sophisticated enough to not be a totally dumb thing to do
Website Find
Reply
05-18-2012, 01:30 AM
#4
neobrain Offline
"Wow, I made my code 1000x faster! That means I can make it 2048x slower now!"
**********
Developers (Some Administrators and Super Moderators)
Posts: 3,209
Threads: 50
Joined: Jun 2009
All HW accelerated backends depend on the driver optimizing redundant state changes, yes. I'm pretty sure that all relevant graphics drivers are doing this though. AFAIK for d3d, it's not even the drivers doing that work - but in fact the d3d runtime itself.
My blog
Me on Twitter
My wishlist on Amazon.de
Find
Reply
05-18-2012, 01:31 AM
#5
delroth Offline
Making the world a better place through reverse engineered DSP firmwares
**********
Developers (Some Administrators and Super Moderators)
Posts: 1,354
Threads: 63
Joined: Aug 2011
Ok, according to some searches I did really fast GL drivers actually have a hard time optimizing redundant state changes and a lot of people reported a nice performance boost after tracking changes in their engine instead of letting GL do it.

I'll try to work on some improvements in the next few days. Hopefully it will mean a nice perf boost for the GL renderer (10% would be nice Tongue).
Pierre "delroth" Bourdon - @delroth_ - Blog

<@neobrain> that looks sophisticated enough to not be a totally dumb thing to do
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