I want to use imageStore
and imageLoad
in multiple compute shaders.
This is mixed with "normal" rendering commands (glDraw) to the screen or to framebuffers, but these don't use imageStore
or imageLoad
(only texture
or texelFetch
).
I only have one OpenGL context and thread.
My assumptions are the following:
- When doing an
imageStore
, I need to doglMemoryBarrier
before doing animageLoad
in a later compute shader ortexture
ortexelFetch
in a later fragment shader. - I don't need to use
coherent
at all. - I don't need to use
glSync
at all. - I don't need to use
glMemoryBarrier
after writing to a texture using a framebuffer and then reading it withimageLoad
- OpenGL will run the compute shaders and "normal" draw operations in the order they are requested. Assuming I use
glMemoryBarrier
between the calls, there are no "threading issues".
Are they correct?