I've always* built Mesa with -O3 and not once had an issue that was because of that.
* not built git in the last 3-4 months since it requires newer autofoo and I'm too lazy.
Announcement
Collapse
No announcement yet.
Optimizing Mesa Performance With Compiler Flags
Collapse
X
-
Originally posted by Lockal View PostI guess the bottleneck of most videogames is not OpenGL, unless the game is designed for high-end graphics card. Check this with any profiler: gl... calls are almost unnoticeable amoung game physics and logic. Compiling the actual software and main libraries instead of driver could give a very different result.
Leave a comment:
-
Originally posted by Adarion View PostQuestion is indeed if mesa is speed limiting step (aka bottleneck) in the whole system here. But it won't hurt to keep my Gentoo CFLAGS like they are. Mainly march set and -O2. In few cases I actually use -Os for VIA CPUs or AMD's old Geode LX. Few packages might dislike messing too much with CFLAGS though.
Leave a comment:
-
Originally posted by mark_ View Postok, makes sense. But shouldn't the programmer use inline functions or macros in this case?
I guess I will add the inline parameter to my CXXFLAGs and for single C packages.
You can even manually set the depth the compiler will inline down to - something Firefox does for example, because the default -O3 inlining was too much, but by limiting the inlining amount they could still turn on -O3 and get better results than plain old -O2.
Leave a comment:
-
Originally posted by nej_simon View PostThen why not use something like -march=i686 -msse -msse2? That would enable gcc to use cmov and sse/sse2 instructions and the binaries would still run on a P4.
-march=pentium4 -mtune=core2 -mfpmath=sse
Actually that looks like a typo - the patch comments talk about sse2, but the patch itself just enables sse.Last edited by smitty3268; 29 January 2013, 12:09 AM.
- Likes 1
Leave a comment:
-
My understanding is that right now the biggest bottleneck in the oss graphics stack is GEM/TTM. It needs replaced, but I don't think anybody has a good idea on what to replace it with.
Leave a comment:
-
Question is indeed if mesa is speed limiting step (aka bottleneck) in the whole system here. But it won't hurt to keep my Gentoo CFLAGS like they are. Mainly march set and -O2. In few cases I actually use -Os for VIA CPUs or AMD's old Geode LX. Few packages might dislike messing too much with CFLAGS though.
Leave a comment:
-
It would be nice to have a database/list of programs and their fastest compile flags (depending on the compiler/version of course).
Leave a comment:
-
Originally posted by mark_ View PostThis affects C also, it looks like a function call is replaced by the function code. This should result in less stack usage but the function has to be so simple that creating a new stack entry costs more performance than executing the function. Seems to be relatively useless.
And it could potentially allow even more optimization with the "neighbouring" code, since it's not isolated in a function anymore. There way too many things to consider in compiler optimization.
Leave a comment:
-
-Os is slower in some cases, tried it now on r200 and immidiately i can see slower menus in supertuxkart: going through kart chooser for example is slugish, so no go...
From my experiance maybe -O1 is the best for mesa stability, but safe is to just go with -O2 and -pipe that will produce smaller libraries or if you want to play with processor optimisation then add -march=blabla , but always stick with -O2 if you want and to keep driver stability.
Leave a comment:
Leave a comment: