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 11

Thread: Latest OpenGL AMD/NV driver bugs (with repro code)

  1. #1
    Junior Member Newbie Closed's Avatar
    Join Date
    Sep 2011
    Location
    Moscow
    Posts
    8

    Angry Latest OpenGL AMD/NV driver bugs (with repro code)

    1. gl(Tex/Texture)Storage doesn't work with any depth-format on AMD:

    void Bug_AMD_TexStorage_Depth()
    {
    GLuint tex;
    glGenTextures(1, &tex);
    glTextureStorage2DEXT(tex, GL_TEXTURE_2D, 1, GL_DEPTH_COMPONENT24, 64, 64);

    // BUG: err = GL_INVALID_OPERATION
    GLenum err = glGetError();
    }

    2. gl(Tex/Texture)Storage doesn't work with cubemaps on AMD:

    void Bug_AMD_TexStorage_CubeMap()
    {
    GLuint tex;
    glGenTextures(1, &tex);
    glTextureStorage2DEXT(tex, GL_TEXTURE_CUBE_MAP, 1, GL_RGBA8, 64, 64);

    // BUG: err = GL_INVALID_ENUM
    GLenum err = glGetError();
    }

    3. gl(Tex/Texture)Storage will not work if PBO is active on AMD:

    void Bug_AMD_TexStorage_PBO()
    {
    GLuint buffer;
    glGenBuffers(1, &buffer);
    glNamedBufferDataEXT(buffer, 1024, NULL, GL_STATIC_DRAW);

    // NOTE: bug is here
    // WORKAROUND: before TexStorage always do glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0)
    glBindBuffer(GL_PIXEL_UNPACK_BUFFER, buffer);

    GLuint tex;
    glGenTextures(1, &tex);
    glTextureStorage2DEXT(tex, GL_TEXTURE_2D, 1, GL_RGBA8, 64, 64);

    // BUG: err = GL_INVALID_OPERATION
    GLenum err = glGetError();
    }

    4. Calling glGenQueries between glBeginQuery/glEndQuery on AMD, leads to invalid operation:

    void Bug_AMD_Query()
    {
    GLuint query1;
    glGenQueries(1, &query1);

    glBeginQuery(GL_SAMPLES_PASSED, query1);

    GLuint query2;
    glGenQueries(1, &query2);

    // BUG: err = GL_INVALID_OPERATION
    GLenum err = glGetError();

    glEndQuery(GL_SAMPLES_PASSED);
    }

    5. textureGather<Offset>(samplerRECT...) is not work on NV:

    any shader with this code will be compiled with this output:

    target not supported by the TXG instruction
    -- internal assembly text --
    // very long assemply here...

    P.S. to be continued...
    Last edited by Closed; 07-18-2012 at 08:18 AM.

  2. #2
    Member Regular Contributor malexander's Avatar
    Join Date
    Aug 2009
    Location
    Ontario
    Posts
    305
    4. Calling glGenQueries between glBeginQuery/glEndQuery on AMD, leads to invalid operation:
    I ran into this a while back, and it turns out this is the correct behaviour as stated by the extension (GL_ARB_occlusion_query, section 4.1.6A):

    Calling either GenQueriesARB or DeleteQueriesARB while any query of any target is active causes an INVALID_OPERATION error to be generated.
    However, this language isn't in the OpenGL 3.3 specification, so it looks like it should be valid. It's likely this feature was never updated to core in the AMD driver.

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,099
    The official API reference for glGenQueries doesn't reflect that as well.

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Dec 2007
    Location
    Hungary
    Posts
    985
    Quote Originally Posted by malexander View Post
    I ran into this a while back, and it turns out this is the correct behaviour as stated by the extension (GL_ARB_occlusion_query, section 4.1.6A).
    However, this language isn't in the OpenGL 3.3 specification, so it looks like it should be valid. It's likely this feature was never updated to core in the AMD driver.
    I would rather say it's a specification bug. I don't think it would be a good idea to allow GenQueries/DeleteQueries between BeginQuery/EndQuery, especially delete.
    Disclaimer: This is my personal profile. Whatever I write here is my personal opinion and none of my statements or speculations are anyhow related to my employer and as such should not be treated as accurate or valid and in no case should those be considered to represent the opinions of my employer.
    Technical Blog: http://www.rastergrid.com/blog/

  5. #5
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,099
    Quote Originally Posted by aqnuep
    I would rather say it's a specification bug. I don't think it would be a good idea to allow GenQueries/DeleteQueries between BeginQuery/EndQuery, especially delete.
    IMHO, I don't think that glGenQueries inside a glBeginQuery/glEndQuery would be a problem because getting names for yet unused query and untyped query objects shouldn't have any side-effects other than reducing the set of available IDs. What really looks like a bug though is that glDeleteQueries() also isn't restricted from use while a query is active, at least according to the API reference. So you could simply try to delete an object which is currently active for a specific target.

  6. #6
    Member Regular Contributor
    Join Date
    Apr 2009
    Posts
    268
    Actually GL spec is pretty explicit that glDeleteQueries does work even if deleted query is active

    If an active
    query object is deleted its name immediately becomes unused, but the underlying
    object is not deleted until it is no longer active
    As there is nowhere any mention that glGenQuery is forbidden when there is an active query, the only possible outcome is that it has to work, ie ATI has a bug.

  7. #7
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,099
    Quote Originally Posted by kyle_
    Actually GL spec is pretty explicit that glDeleteQueries does work even if deleted query is active
    Ok, faulty API reference again. There's no mention of this IMHO vital piece of information.

  8. #8
    Member Regular Contributor
    Join Date
    Apr 2009
    Posts
    268
    Quote Originally Posted by thokra View Post
    Ok, faulty API reference again. There's no mention of this IMHO vital piece of information.
    Damn, people are using these references for anything serious?
    I lost track of number of errors/inconsistencies there - its good only as a quick reminder.

  9. #9
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,099
    Quote Originally Posted by kyle_
    Damn, people are using these references for anything serious? [..] its good only as a quick reminder.
    Well, yes. But even a quick reminder is supposed to be accurate. Alfonse maintains another version of the API reference in the wiki.

  10. #10
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    Quote Originally Posted by thokra View Post
    Well, yes. But even a quick reminder is supposed to be accurate. Alfonse maintains another version of the API reference in the wiki.
    Which now has the correct info, BTW.

    I just wish the links on this site would go to the Wiki version, since it's much easier to fix bugs, rather than filing bug reports and waiting for someone on the ARB to get around to fixing them.

Tags for this Thread

Posting Permissions

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