Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Cg lerp() performance on Geforce FX 5600

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2002
    Location
    Rome, Italy
    Posts
    25

    Cg lerp() performance on Geforce FX 5600

    Hello,

    I started a thread on cgshaders.org about this issue and heard that I'm not the only one that noticed this.

    The lerp function (which translates to an ADD and a MAD in arbfp1.0 assembly) significantly lowers performance on my Geforce FX 5600.

    With the fragment program disabled I get anywhere from 300-330 fps while with the fragment program enabled it lowers to 70 fps with a single lerp and it goes down to 25 with 4 lerps (using 5 textures).

    Does anyone know the reason why?

    For reference (shader source code is there too), here's a link to the other thread: http://www.cgshaders.org/forums/viewtopic.php?t=2244

    Thanks for reading.
    Luigi Rosso
    Lead Developer
    RealitySlip
    http://www.RealitySlip.com

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    2,704

    Re: Cg lerp() performance on Geforce FX 5600

    Just google for it -- apparently, if reports are to believed, the NV30 line (on which I believe 5600 is based) isn't as optimized for floating-point fragment programs as it is for fixed-point.

    If you're using GC, try compiling for the nv30 profile, and using fixed variables rather than float or half.

    [This message has been edited by jwatte (edited 11-19-2003).]
    "If you can't afford to do something right,
    you'd better make sure you can afford to do it wrong!"

  3. #3
    Junior Member Newbie
    Join Date
    Nov 2002
    Location
    Rome, Italy
    Posts
    25

    Re: Cg lerp() performance on Geforce FX 5600

    Thanks for the tip, that was definitely part of it. Could you post a link to where you found that?

    I'm now getting from 50-70 fps which is much better than 25. There was no change switching to fixed point with the arb profile, while the fp30 definitely improved things.

    However it's a long fall from 300 to 70, are these operations really so costly?

    Thanks for the help.
    Luigi Rosso
    Lead Developer
    RealitySlip
    http://www.RealitySlip.com

  4. #4
    Junior Member Newbie
    Join Date
    Nov 2002
    Location
    Rome, Italy
    Posts
    25

    Re: Cg lerp() performance on Geforce FX 5600

    The great benefit of Cg is that it will handle target specifics like lack of fixed or half datatypes by automatically up-casting. You could produce a shader using fixed types optimised for the FP30 profile (Nvidia+OpenGL+NV30) and the same Cg shader can be compiled, unchanged, to ARB OpenGL or DX9 PS2 targets.
    Got that from http://www.pocketmoon.com/Cg/Cg.html

    Has some interesting information.
    Luigi Rosso
    Lead Developer
    RealitySlip
    http://www.RealitySlip.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •