Say I have a set of vertex and fragment shaders where the vertex shader reads from a vertex buffer and sets the read value in a varying and then the fragment shader takes the varying value and writes it to a ssbo.
Then I perform a draw call with these shaders.
Later on in the program the vertex buffer is overwritten with a call to glCopyBufferSubData()
before any further usage of the ssbo.
Do I need a call to glMemoryBarrier()
between the drawcall and the vertex buffer overwrite?