Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: [NV 310.90] compute shader reads zero from texture

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2012
    Location
    Germany
    Posts
    13

    [NV 310.90] compute shader reads zero from texture

    Hi there,

    I postet this bug in september or october already... it was said to be fixed in some 306.x driver.
    The problem: my compute shader sometimes reads 0 from a texture.
    There was some not so nice workaround that I unfortunately do not remember anymore.
    Please confirm and, of course, fix this (it's causing huge headaches, because most textures work and suddenly one is not...).

    Thank you.

  2. #2
    Junior Member Regular Contributor
    Join Date
    Mar 2009
    Posts
    153
    As far as I know bug has been fixed. Every texture lookup I perform works for me. What is your usage scenario that does not work?

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2012
    Location
    Germany
    Posts
    13
    I converted my compute shader into a fragment shader + framebuffer etc. and it works.
    I can only sketch my pipeline...
    I have a class, holding some texture, let's call it xxxSample with { Texture2D color; Texture2D weight }.
    I create a sample object (means I create the textures, make them immutable, etc.). I clear the weight texture with 0. I write data to a sample in a compute program, but potentially only partially (that's why I clear the weight texture) -> here everything seams to work.
    I do this again for another sample object.
    Now, I need to "merge" these objects. So, I pass all the textures to the compute program, something like:
    unsigned int texUnit = 0;
    for(size_t i=0; i<inputSamples_.size(); ++i) {
    inputSamples_[i]->weight_->bind(texUnit++);
    inputSamples_[i]->color_->bind(texUnit++);
    inputSamples_[i]->oneMore_->bind(texUnit++);
    }
    And here, the reads fails for texture units 3,4,5.
    I am pretty convinced, that it is this bug, because: I can dump my textures, they have data. I can switch the order of the samples (sample[1] binds to tex units 0,1,2, sample[0] to 3,4,5) and it does not work. But most important, it works for a fragment shader!
    I am not sure, if this gives you a clue in any means... maybe you can ask more specific questions about my textures, programs or something? (I cannot post all the code here).
    More information on my environment: I am using only immutable textures, DSA, 430 shaders with the bindings specified in the shader.
    card: 560Ti or quadro 2000m

  4. #4
    Junior Member Newbie
    Join Date
    Feb 2012
    Location
    Germany
    Posts
    13
    is there any update on this?
    can you confirm the problem?
    I would really like to switch to compute shaders in many cases and avoid the framebuffer, quad, ... stuff, but this bug was driving me crazy a couple of times now.
    thanks

  5. #5
    Junior Member Newbie
    Join Date
    Jan 2013
    Posts
    11
    Without seeing the source code is really hard to guess what's going wrong. Did you add calls to glMemoryBarrier() at the appropriate places?

Posting Permissions

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