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 5 of 7 FirstFirst ... 34567 LastLast
Results 41 to 50 of 61

Thread: NVIDIA releases OpenGL 4.2 drivers

  1. #41
    Member Regular Contributor
    Join Date
    Nov 2003
    Location
    Czech Republic
    Posts
    317

    Re: NVIDIA releases OpenGL 4.2 drivers

    @Piers - I've also done some investigation about glTexStorage. The situation is more complicated then I thought. I was able to reproduce this performance problem in my test app. The key thing that hurts the performance is binding the texture object between glTexStorage and glTexSubImage.

    This works fast:
    Code :
    glTexStorage2D(GL_TEXTURE_2D, numLevels, GL_RGBA8, textureWidth, textureHeight);
    glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, texturePBO);
    glTexSubImage2D(target, 0, 0, 0, textureWidth, textureHeight,GL_BGRA_EXT, GL_UNSIGNED_BYTE, NULL);

    This is slow:

    Code :
    glTexStorage2D(GL_TEXTURE_2D, numLevels, GL_RGBA8, textureWidth, textureHeight);
     
    glBindTexture(target, textureObj); // This makes it slow
     
    glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, texturePBO);
    glTexSubImage2D(target, 0, 0, 0, textureWidth, textureHeight,GL_BGRA_EXT, GL_UNSIGNED_BYTE, NULL);

    I'd like to note that there is no such slowdown when creating the texture by calling glTexImage2D(..., NULL) for each mipmap level.

    I believe there are some sanity checks inside glBindTexture but due to some bug the driver does something that should not be done.

    BTW. I measure the time from creating the texture up to the drawing a test triangle. This way I am sure that all the asynchronous processing is really done. When I do not rebind the texture then it takes 0.5ms. When I rebind it then it takes 7.5ms. My test hw is GTX260 @ WinXP x64. I get similar results on other computers with different NV cards. Driver 280.36.

  2. #42
    Intern Contributor
    Join Date
    Mar 2010
    Posts
    58

    Re: NVIDIA releases OpenGL 4.2 drivers

    @Chris
    Any chance I could get a more detailed repro for your case?

    @mfort
    I think I can easily recreate your case. I'll investigate soon.

  3. #43
    Intern Contributor
    Join Date
    Mar 2010
    Posts
    58

    Re: NVIDIA releases OpenGL 4.2 drivers

    @mfort
    I was able to reproduce this issue and I have now fixed the bug. I'll try to get a new driver released soon. Hopefully this same fix will help Chris too.

  4. #44
    Member Regular Contributor
    Join Date
    Nov 2003
    Location
    Germany
    Posts
    293

    Re: NVIDIA releases OpenGL 4.2 drivers

    Quote Originally Posted by Piers Daniell
    @mfort
    I was able to reproduce this issue and I have now fixed the bug. I'll try to get a new driver released soon. Hopefully this same fix will help Chris too.
    Hello Piers,
    i sent you a PM a few days ago with a repro binary and some source code. Did you get to take a look?

  5. #45
    Junior Member Newbie
    Join Date
    Sep 2011
    Location
    China
    Posts
    29

    Re: NVIDIA releases OpenGL 4.2 drivers

    when place memoryBarrier() in shader code, the driver reports that "error C7531: global function memoryBarrier requires "#extension GL_EXT_shader_image_load_store : enable" before use.while i sure specify the version number like this at the very beginning:

    #version 420 compatibility

    is it a bug or do i miss something? thanks in advance.
    i use the 32bit version of this driver (280.36).

  6. #46
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948

    Re: NVIDIA releases OpenGL 4.2 drivers

    That's not the first time I've seen NVIDIA's drivers mistake core functionality for something in an extension. I had to use `#extension GL_EXT_gpu_shader4 : enable` just to get gl_PrimitiveID to work in a geometry shader.

  7. #47
    Intern Contributor
    Join Date
    Mar 2010
    Posts
    58

    Re: NVIDIA releases OpenGL 4.2 drivers

    I have posted updated OpenGL 4.2 developer preview drivers to the usual location: http://developer.nvidia.com/opengl-driver.

    The new version is 280.47 for Windows and 280.10.01.04 for Linux.

    Amongst other things, this new driver addresses the following:
    1) glTexStorage performance issue should be fixed.
    2) Atomic counter performance has been substantially improved.
    3) Issue with gl_PerVertex interface block redeclaration in vertex shader has been fixed.
    4) Fixed issue with atomic counters and glBufferData(,,NULL), where the buffer object wasn't created properly.

    Enjoy!

  8. #48
    Intern Contributor
    Join Date
    Mar 2010
    Posts
    58

    Re: NVIDIA releases OpenGL 4.2 drivers

    @robotech_er
    Thanks for the bug report. This problem with memoryBarrier() is an oversight. It will be fixed in a future driver.

    @Alfonse Reinheart
    Hmm, gl_PrimitiveID has apparently been broken since GLSL 150. Will be fixed in a future driver.

  9. #49
    Intern Contributor
    Join Date
    Mar 2010
    Posts
    58

    Re: NVIDIA releases OpenGL 4.2 drivers

    @Chris Lux
    Sorry I haven't got back to you on this yet. I had some trouble downloading from dropbox at work. If you get a chance, please see if 280.47 fixes this issue. In the meantime I'll try to get your package when I'm outside the work firewall.

  10. #50
    Junior Member Newbie
    Join Date
    Sep 2011
    Location
    China
    Posts
    29

    Re: NVIDIA releases OpenGL 4.2 drivers

    @Alfonse Reinheart & @Piers Daniell, thanks.

    another weird thing, use imageLoad() do vtf like thing, at first everything works right:

    #version 420 compatibility

    layout(r32ui) readonly uniform uimage2D tex_height;

    void main()
    {
    ivec2 itex_coord = ivec2(gl_Vertex.xz);
    float height = float(imageLoad(tex_height, itex_coord).x);
    vec4 newVertexPos = gl_Vertex * vec4( 100.0, 1.0, 100.0, 1.0) + vec4( 0.0, height, 0.0, 0.0);
    gl_Position = gl_ModelViewProjectionMatrix * newVertexPos;
    }

    then , need another imageLoad operation after the original one:

    #version 420 compatibility

    layout(r32ui) readonly uniform uimage2D tex_height;
    layout(r32ui) readonly uniform uimage2D tex_offset; //new added image

    void main()
    {
    ivec2 itex_coord = ivec2(gl_Vertex.xz);
    float height = float(imageLoad(tex_height, , itex_coord).x);

    uint val = imageLoad(tex_offset, itex_coord).x; //the second image access, if comment out, everything works right

    vec4 newVertexPos = gl_Vertex * vec4( 100.0, 1.0, 100.0, 1.0) + vec4( 0.0, height, 0.0, 0.0);
    gl_Position = gl_ModelViewProjectionMatrix * newVertexPos;
    }

    and now everything messes up, it seems like the return value of the first imageLoad() is kind of undefined value, but obviously the two imageLoad() operations are totally unrelative. why? thanks.
    i have updated the driver to the latest 280.47.

Posting Permissions

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