Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: driver version query

  1. #1
    Member Regular Contributor
    Join Date
    Apr 2004
    Posts
    260

    driver version query

    according to the spec glProgramBinary may fail if the implementation detects that the binary you supply is for different driver/hardware/who_knows_what

    but there is the problem that the application does not have a way to know about driver versions. so far the opengl specification have never used or defined such notion.

    please provide a new query e.g. glGetString(GL_IMPLEMENTAION_ID)
    to return something that uniquely identifies the current driver + hardware + whatever_else_needed set.
    and change the program binary specification to require exactly this id to be the same.
    and please remove such vague things as hardware or driver versions from the specification.

    this would aid the applications to implement shader caches based on the program binary functionality.

  2. #2
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,214

    Re: driver version query

    The version you have mentioned does not correspond to the actual driver's version. It is a version of the binary shader. You need not to know the version of the driver. If the version is improper you won't be able to use that binary shader.

    Your life will not be easier if you know the version of the binary shader, since you cannot change GLSL implementation in the current driver.

    Quote Originally Posted by l_believe
    ...and change the program binary specification to require exactly this id to be the same.
    Do you try to impose all possible implementation to be available in the single driver? Don't you think it is an unexceptionable request?

  3. #3
    Member Regular Contributor
    Join Date
    Apr 2004
    Posts
    260

    Re: driver version query

    Please read again what i have written.
    From your reply it seems to me that you either did not read my suggestion careful enough or did not understand some parts.

    The version you have mentioned does not correspond to the actual driver's version.
    I never said it corresponds to the actual driver version.

    You need not to know the version of the driver.
    I never said i want to know the driver version.

    Your life will not be easier if you know the version of the binary shader, since you cannot change GLSL implementation in the current driver.
    My life will be easier because this way i can easily know which of my files of compressed binaries is the right one even before i load them all from the disk, decompress them and for all of them try to upload one of the binaries to the GL.

  4. #4
    Member Regular Contributor
    Join Date
    Apr 2004
    Posts
    260

    Re: driver version query

    Quote Originally Posted by Aleksandar
    Quote Originally Posted by l_believe
    ...and change the program binary specification to require exactly this id to be the same.
    Do you try to impose all possible implementation to be available in the single driver? Don't you think it is an unexceptionable request?
    what are you talking about?
    As is it now the spec says ProgramBinary may fail if the hardware or software configuration is not the same as what it have been when GetProgramBinary was called.
    My suggestion was to change this language to say that ProgramBinary may fail if "the configuration ID" is not the same as what is have been when GetProgramBinary have changed.
    What is unclear here?


  5. #5
    Intern Newbie
    Join Date
    Sep 2011
    Posts
    32

    Re: driver version query

    I think it is a good idea to add this query. Moreover, it might be even better to add another query to retrieve the "implementation id" of a binary shader. It makes developer life easier to know if the shader is compatible before loading it up.

    I try to talk to AMD shader team to see what they think.
    Senior Engineer, OpenGL driver, AMD

  6. #6
    Member Regular Contributor
    Join Date
    Apr 2004
    Posts
    260

    Re: driver version query

    Quote Originally Posted by Hongwei Li
    I try to talk to AMD shader team to see what they think.
    Thank you very much!

  7. #7
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,256

    Re: driver version query

    It sounds like your objective is to supply precompiled shaders along with your program installation exe. That's not a good idea.
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  8. #8
    Advanced Member Frequent Contributor
    Join Date
    Apr 2009
    Posts
    612

    Re: driver version query

    Or maybe to just skip loading shaders that will not work with a driver change. I.e. application on 1st run does the shader build thing, saves the binary images. Then user updates drivers, be nice to know if the application should bother using those saved binary shaders. Additionally, given that some power users change between drivers often, an application could save multiple binary shaders keyed by the driver version.

  9. #9
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,256

    Re: driver version query

    Power users change between drivers often? Application should save a binary shader for each version? Who are those freaks (power users).
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  10. #10
    Advanced Member Frequent Contributor
    Join Date
    Apr 2009
    Posts
    612

    Re: driver version query

    most common scenario:

    application A (usually games) works fine with driver version 1, but application B works fine with driver version 2... tinkerer's will (un?)happily swap between multiple drivers for their favorite apps(usually games)... causes being from application was older and older drivers out of spec, etc.... folks that jumped to "dx10" features via GL or extensions of GL a ways bsck for a period of time found that as drivers got better at conforming to the spec, often their apps and shaders needed tweaking..... often enough a driver update can be a crapshoot, right? somethings go better some go worse....

Posting Permissions

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