The tests' behavior is like this:
1. Use transform feedback to write to one buffer
2. Set this buffer to texture, and then to image
3. glDispatchCompute -> use ImageLoad to read from the image
We have to add a glMemoryBarrier between step 1 and 3.
Affects:
KHR-GLES3*.core.texture_buffer.texture_buffer_operations_transform_feedback
Components: OpenGL
VK-GL-CTS issue: 2936
Change-Id: If711469a6cbf4ae1df6851e4006d937760e37ca7
gl.useProgram(m_po_cs_id);
GLU_EXPECT_NO_ERROR(gl.getError(), "Error setting active program!");
+ gl.memoryBarrier(GL_SHADER_IMAGE_ACCESS_BARRIER_BIT);
+ GLU_EXPECT_NO_ERROR(gl.getError(), "Error setting memory barrier!");
+
gl.bindImageTexture(0, m_texbuff_id, 0, GL_FALSE, 0, GL_READ_ONLY, GL_RGBA32I);
GLU_EXPECT_NO_ERROR(gl.getError(), "Error binding texture to image unit!");