Issues with binding image texture to compute shader #2613
Unanswered
speediplayz
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have been trying to get compute shaders working with Silk.NET OpenGL, and i have got it to a point where they compile and link fine with no errors, however the issues start with trying to bind an image to the compute shader for reading and writing. if i use a 1x1 texture it works just fine, and then i can read the data back and print a pixel (the test shader simply sets pixel 0, 0 to red), but when i change the texture size to 2x2 or anything else, it suddenly stops working, pixel 0,0 suddenly reads 0,0,0,0 and I cannot figure out why.
Compute is just an object to store the program id etc
the above code is my test code for the shader, I tried to change dispatch sizes to 1, 1, 1, or width, height, 1, or a few different combinations. it works perfectly fine with sx=sy=1 which tells me there is no issues with the compilation, linking or dispatching of the shader. For those curious the shader is:
I have verified as well that there are no errors after pretty much every line of code, gl.GetError prints NoError every time. I am curious if anyone else has had this issue/has a solution.
All reactions