Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4


Threaded View

  1. #1
    Newbie Newbie
    Join Date
    Sep 2013

    Question reinterpreting/binding GL_DRAW_INDIRECT_BUFFER as uniform atomic_uint?

    Hello, I wanted to reinterpret & bind a single field of an indirect draw call command (the instance count field) as an atomic integer uniform in a compute shader as opposed to having a separate atomic integer buffer and copying the value into the draw call buffer (using glCopyBufferSubData).

    When I tried this my machine froze up and the graphics driver crashed, is this an OpenGL limitation or is this a driver issue? The other alternative is to create an atomic integer buffer the size of a a single indirect draw call command but this seems less than idea considering OpenGL only requires a vendor to a support a minimum of a single atomic integer for fragment/compute shaders and the other fields of the indirect draw call command will only ever get initialized once and never modified again.

    On a slightly unrelated note, really what's so special about GL_ATOMIC_COUNTER_BUFFER hard-wise compared to using atomic operations on image/buffer type uniforms? are they really more efficient than the latter or is this just speculation on potential future hardware/compiler optimizations? is this just more to do with compiler code-gen optimizations than hardware circuitry? atomic integers are still being accessed from global memory?
    Last edited by snk_kid; 09-18-2013 at 04:20 PM.

Posting Permissions

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