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

Thread: [AMD11.12] imageAtomicCompSwap not working

  1. #1
    Intern Contributor
    Join Date
    Apr 2010

    [AMD11.12] imageAtomicCompSwap not working

    The imageAtomicCompSwap doesn't seem to be working.
    I create a texture buffer like so (all texels set to value -1)
    Code :
    // build buffer
    std::vector<GLint> bufferData(ELEM_CNT,-1);
    glBindBuffer(GL_TEXTURE_BUFFER, buffer);
    glBindBuffer(GL_TEXTURE_BUFFER, 0);
    // build texture
    glBindTexture(GL_TEXTURE_BUFFER, texture);
    	glTexBuffer(GL_TEXTURE_BUFFER, GL_R32I, buffer);
    I expect the following shader to set texel number i to value i.
    Code :
    #version 420 core
    layout(r32i) coherent uniform iimageBuffer imgData;
    void main() {
    	imageAtomicCompSwap(imgData, gl_VertexID, -1, gl_VertexID);
    However, it does not, values remain at -1. Replacing imageAtomicCompSwap by imageAtomicExchange gives the correct output.

    Code can be downloaded here (gmake and vs2010 projects are provided).

  2. #2
    Intern Contributor
    Join Date
    Apr 2010

    Re: [AMD11.12] imageAtomicCompSwap not working

    Fixed in 12.1, nice work!

Posting Permissions

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