Add missing memory barrier to the image load/store tests
authorSunny Sun <sunny.sun@arm.com>
Mon, 8 Jan 2018 02:37:04 +0000 (10:37 +0800)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Tue, 27 Feb 2018 09:10:53 +0000 (04:10 -0500)
The test issues multiple glDispatchCompute with the same dst
but misses a glMemoryBarrier call.
This violates section 7.11.2 of the GLES specification.

Components: OpenGL

Affects: KHR-GL*.robust.robust_buffer_access_behavior.image_load_store

VK-GL-CTS issue: 992

Change-Id: I9f368356dc12aca0e50749653411a6ad8e7ef0b2

external/openglcts/modules/common/glcRobustBufferAccessBehaviorTests.cpp

index ab719d3..485ff13 100644 (file)
@@ -2495,6 +2495,10 @@ tcu::TestNode::IterateResult ImageLoadStoreTest::iterate()
                /* Set texture */
                setTextures(destination_texture.m_id, source_texture.m_id);
 
+               /* Set memory barrier with previous invalid tests */
+               gl.memoryBarrier(GL_SHADER_IMAGE_ACCESS_BARRIER_BIT);
+               GLU_EXPECT_NO_ERROR(gl.getError(), "MemoryBarrier");
+
                /* Dispatch */
                gl.dispatchCompute(width, height, 1 /* depth */);
                GLU_EXPECT_NO_ERROR(gl.getError(), "DispatchCompute");