Farcry is low efficiency because of Cg Compiler

Discussion in 'Graphics and Semiconductor Industry' started by engall, Mar 11, 2004.

  1. OpenGL guy

    Veteran

    Joined:
    Feb 6, 2002
    Messages:
    2,357
    Likes Received:
    28
    Shaders are not sent from the app to the driver when they are used. This only happens when they are created. When they are used, the app selects the shader by its handle and the driver then updates the HW state appropriately.
     
  2. kyleb

    Veteran

    Joined:
    Nov 21, 2002
    Messages:
    4,165
    Likes Received:
    52
    lol, ya i was playing with 3danalyze a while back and ran into the same problem so i tried the no-cd crack on a whim and sure enough that is all there is too it.
     
  3. Quitch

    Veteran

    Joined:
    Jun 11, 2003
    Messages:
    1,521
    Likes Received:
    4
    Location:
    UK
    Why is it people are always drinking when they read something that shocks them? Some serious caffine addicts on this board ;)
     
  4. Magic-Sim

    Newcomer

    Joined:
    Nov 14, 2003
    Messages:
    99
    Likes Received:
    0
    Location:
    Calais (France)
    I was eating myself, but i remained clean :)

    Back on topic, are all driver/gpu handling shader upload the same way like OpenGL Guy suggested ?
     
  5. Hanners

    Regular

    Joined:
    Jul 12, 2002
    Messages:
    816
    Likes Received:
    57
    Location:
    England
    Some kind of Hannibal Lecter thing going on there? :shock:
     
  6. Magic-Sim

    Newcomer

    Joined:
    Nov 14, 2003
    Messages:
    99
    Likes Received:
    0
    Location:
    Calais (France)
    Sorry, it was late, I meant "I was eating [and not drinking]"

    Doh ! :oops:

    Note : Hannibal doesn't eat himself, he just cut his hand in "Hannibal"....
     
  7. LeGreg

    Newcomer

    Joined:
    Nov 1, 2003
    Messages:
    239
    Likes Received:
    3
    It's up to the app to decide when to send the shader to the runtime. So basically we can expect that the app will send it beforehand. Some apps decide to do a late binding of ressource (which is generally bad), but it's their design choice, nothing a driver can really do about it. Same for vertex buffers, texture creation etc..

    If your question was for the way the driver interact with the GPU it's way too specific to be answered here.

    LeGreg
     
  8. OpenGL guy

    Veteran

    Joined:
    Feb 6, 2002
    Messages:
    2,357
    Likes Received:
    28
    Right, but in the case of the shader, you only need to create it once, after that you are just binding a handle. If an app creates the same shader over and over, then obviously it's a poorly written app.
     
  9. Tridam

    Regular Subscriber

    Joined:
    Apr 14, 2003
    Messages:
    541
    Likes Received:
    47
    Location:
    Louvain-la-Neuve, Belgium
    It seems that farcry (or at least the demo/beta) is working this way...
     
  10. Magic-Sim

    Newcomer

    Joined:
    Nov 14, 2003
    Messages:
    99
    Likes Received:
    0
    Location:
    Calais (France)
    I've looked into the logs produced by the beta v2a, it seems like they are constructed/parsed/compiled during level loading.
     
  11. Simon F

    Simon F Tea maker
    Moderator Veteran

    Joined:
    Feb 8, 2002
    Messages:
    4,563
    Likes Received:
    171
    Location:
    In the Island of Sodor, where the steam trains lie
    At last - a justification for pre-compiled shaders. :) Since the driver would have to generate a hash value from the shader, that could also be used to save duplication :)
     
Loading...

Share This Page

  • About Us

    Beyond3D has been around for over a decade and prides itself on being the best place on the web for in-depth, technically-driven discussion and analysis of 3D graphics hardware. If you love pixels and transistors, you've come to the right place!

    Beyond3D is proudly published by GPU Tools Ltd.
Loading...