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…).
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
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