lp:~stellarium/stellarium/gz_reduceOpenGLstateChanges
It occurs to me that we have many redundant OpenGL state changes. I hope to reduce them a bit here.
The star zones are a big example: calling preDrawPointSource should have setup everything to call drawPointSource, but in there we have to repeat the blend ops. It would be helpful to find a way out here.
I use the AMD CodeXL and gDEbugger to find these issues, but am not the top expert on profiling. Let's see...
It is possible to track the should-be state of the most often switched states, and only forward it to the GPU when required. The biggest culprit is StelPainter:
2016-02-03: On PC and Qt5.5.0 many OpenGL state switches have now been avoided. However, speed gain is negligible, the application is CPU limited (positional computations). On ARM boards (Mali GPU) there are still graphics issues. Those could at least slightly benefit from further work on this.
The independent speedup in the Meteor classes should be moved to trunk however.
- Get this branch:
- bzr branch lp:~stellarium/stellarium/gz_reduceOpenGLstateChanges
Branch merges
Branch information
Recent revisions
- 8152. By gzotti
-
Stelpainter: restore OpenGL state after drawText(). Fixed all relevant calls in other classes. Result should be fine now. Massive savings in OpenGL state switching!
- 8151. By gzotti
-
a few fixes of inconsistent states, and addition of instrumentation to StelPainter to see how many state changes were avoided. drawText must definitely be fixed.
- 8150. By gzotti
-
update plugins to the new scheme. Unfortunately, StelPainter:
:drawText( ) breaks some of the expected benefit. - 8149. By gzotti
-
Cached the most frequently switched OpenGL states for the main app (no plugins yet). It seems there is a speed boost :-)
- 8147. By gzotti
-
Reduced OpenGL state switching for Meteors. (Sporadic and MeteorShower plugin). Instead of blend switches per meteor, use state switches per frame (sporadic) or at least per shower (plugin). Code is not cleaned up yet, but it works.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:stellarium