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 7 of 7

Thread: How do you know if a vertex program is executed in hardware?

  1. #1
    Intern Contributor
    Join Date
    Jul 2002
    Posts
    68

    How do you know if a vertex program is executed in hardware?

    How do you know if a vertex shader is executed in hardware?
    On old hardware this will be obvious, but on new hardware, it could depend on what you have in the shader, how long it is, etc.
    Is there a way to query the driver to know if the vertex program will be handled by the GPU or CPU?

  2. #2
    Junior Member Newbie
    Join Date
    May 2004
    Posts
    9

    Re: How do you know if a vertex program is executed in hardware?

    Hi!

    Look at the glGetInfoLogARB function, it will give you a string with that information.

    Greetings Mario

  3. #3
    Intern Contributor
    Join Date
    Jul 2002
    Posts
    68

    Re: How do you know if a vertex program is executed in hardware?

    At which point does glGetInfoLogARB returns this information?
    I tried querying after compiling, linking, validating or using, but I got either an error/warnings list or an empty string when there are no error/warnings... (nVidia 61 drivers)

  4. #4
    Member Regular Contributor
    Join Date
    Apr 2002
    Location
    Austria
    Posts
    328

    Re: How do you know if a vertex program is executed in hardware?

    The glGetInfoLog only works with ATI drivers. I don't know if and how it is possible on nVidia drivers.

    [EDIT]
    Of course the glGetInfoLog will work in nVidia too but there's no information if the shader runs in hardware or in software.
    There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.

    There is another theory which states that this has already happened...

  5. #5
    Junior Member Newbie
    Join Date
    Feb 2004
    Location
    Cologne, Germany
    Posts
    27

    Re: How do you know if a vertex program is executed in hardware?

    I think another problem is, that the infolog's format is not standardized.
    So you can only check at development time and not at runtime how a shader runs, because the log's format might have changed.

    Jan

  6. #6
    Member Regular Contributor
    Join Date
    Mar 2003
    Location
    Spain
    Posts
    269

    Re: How do you know if a vertex program is executed in hardware?

    The nonstandar logs are a very annoying question, because for example, I must have specialized code for different glsl compilers, to parse the error lines in the Shader Designer, and carry the cursor to the right source file and line in the code.
    "I don't know... with a casual fly"

  7. #7
    Intern Contributor
    Join Date
    Jul 2002
    Posts
    68

    Re: How do you know if a vertex program is executed in hardware?

    Let's hope that some standardization will happen.

    The error/warning lines formatting issues is going to be annoying too for shader designers, while it's quite a trivial matter in terms of standardization.

Posting Permissions

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