In glBindImageTexture(), access can be GL_READ_ONLY, GL_WRITE_ONLY, or GL_READ_WRITE.
I assume that these should match the readonly and writeonly qualifiers on image units (eg. image2D or imageBuffer) in GLSL.
I haven't noticed any difference when setting readonly or writeonly (2013, NVIDIA 319.49 drivers). Granted, I might not be doing anything that would otherwise cause a slowdown and hence don't see any improvement. These qualifiers may also simply be ignored by current GL implementations.
- In what cases could a GL implementation make use of readonly/writeonly, why do they exist?
Cache coherency comes to mind, but don't the coherent/volatile qualifiers cover this already? I've used these and they appear to work.
- Has anyone experienced a difference in performance or results when using readonly/writeonly, how important are they?
Don't be afraid to reply if it's been years, I'm interested to know and I'm sure others are too.
It only tells a hint to the driver of how the memory is supposed to be used. It's up to the driver to do optimizations or not. I have not seen any difference on NVidia drivers. One thing is certain, if you write in a read only image, the result is undefined. Same for reading a write only image. But even if it does not make a difference on today's drivers, you should still use them coherently with what you are actually doing with these images: future drivers may use these hints to optimize the memory access.