PlaneShift

Development => Development Deliberation => Topic started by: Wired_Crawler on June 03, 2006, 10:22:06 pm

Title: --enable-debug and recent CS
Post by: Wired_Crawler on June 03, 2006, 10:22:06 pm
In recent version of CS (svn rev. 24364) I get big difference in performance between versions compiled on linux in debug and release mode. For example:


Also, it seems that I have problems with portals again, as described on bugtracker in report #1533 (http://www.hydlaa.com/bugtracker/bug.php?op=show&bugid=1553) (up to 2x more fps for floating portals than "normal" portals).

I use gcc 3.4.5. Can anyone confirm this ? Or is it only me who makes such observations ? Maybe I should update gcc or something ?
Title: Re: --enable-debug and recent CS
Post by: DaveG on June 03, 2006, 11:44:31 pm
Just out of curiousity, what do you get with "--enable-debug --with-optimize-debug-info"?
Title: Re: --enable-debug and recent CS
Post by: Xordan on June 04, 2006, 01:47:08 am
Ummm... you know that the performance difference is totally normal right? There's a reason why optimized mode is called optimized mode and runs faster :P
Title: Re: --enable-debug and recent CS
Post by: Wired_Crawler on June 04, 2006, 12:30:59 pm
Just out of curiousity, what do you get with "--enable-debug --with-optimize-debug-info"?

The same. No difference, at least I don't see any.

@Xordan: Yes, it sounds logical, but such a huge diference is surprising - 50-75% of power goes for debugging. But if You say that it's normal - OK.

Maybe You should warn people in build guide, that using "--enable-debug" will make PS run 2-4x slower :P ?

And about portals - there do is a problem with them. Look at the following results, I was watching hydlaa_plaza through the exit from Laanx temple (portal _p_laanx_entrance2hydlaa_plaza), 640x480, optimized build, gcc 3.4.5, glibc 2.3.5:

1) CS from 16 march 20062) current "official" CS version for PS (rev. 24364)Between jan/06 and march/06 performance was degraded in similar way.
Keep this in mind before releasing next version of client, please.
Title: Re: --enable-debug and recent CS
Post by: DaveG on June 04, 2006, 06:25:43 pm
Debug mode makes everything slower, seeing as it's not optimize mode.  This is true when compiling anything.
Title: Re: --enable-debug and recent CS
Post by: Induane on June 14, 2006, 04:51:52 pm
I could be wrong here but I could have sworn that the performance difference used to be much smaller - when I was first getting builds to work I though I was getting somewhere around 10-15% worse performance with --enable-debug.  I can't imagine why its the way it is now...
Title: Re: --enable-debug and recent CS
Post by: Wired_Crawler on July 07, 2006, 09:50:06 pm
Akhem.
About those slow portals.
Why on earth nobody told me to update my drivers :oops: ?

The problem was the result of last changes in data/shader/snippets/std_lighting.cscg. I have updated Nvidia Cg toolkit to version 1.4.1 and now portals work great :).

Just for Your records.
Title: Re: --enable-debug and recent CS
Post by: LigH on July 12, 2006, 07:44:41 pm
Those "Cg toolkit" files ... are they only necessary for "FX class" GPUs? I guess they won't help much on a GeForce2 GTS (with only 32 MB).
Title: Re: --enable-debug and recent CS
Post by: Wired_Crawler on July 12, 2006, 08:24:05 pm
Cg toolkit is required by CrystalSpace, more precisely, it is needed for certain shaders, which are written in Cg language. I guess Cg libraries are needed to parse/compile them (look in that .cscg file mentioned above). GeForce2 GTS definitely has hardware support for shaders (does GTS mean Giga Texel Shader?), so I'm almost sure, that You need it. Furthermore, in binary distribution of PS, CS is linked with Cg libraries, so You won't be able to play PlaneShift without them.
Title: Re: --enable-debug and recent CS
Post by: LigH on July 12, 2006, 11:44:58 pm
A GeForce2 GTS may have basic vertex shaders (generic TnL), but no pixel shaders...

Adrian's Rojak Pot: Desktop GPU Comparison, NVIDIA page (http://www.rojakpot.com/showarticle.aspx?artno=88&pgno=1)
Title: Re: --enable-debug and recent CS
Post by: Wired_Crawler on July 13, 2006, 08:39:40 am
Wrong. GeForce 2 GTS was the first chip, which thanks to "NVIDIA Shading Rasterizer" supported per-pixel shading. Read for example this review (http://www.voodoofiles.com/review.asp?Name=44) or this article (http://www.anandtech.com/showdoc.aspx?i=1231&p=4).