teglImageFormatTests: call glFinish after creating the buffer in the client API
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 20 Nov 2017 15:08:51 +0000 (16:08 +0100)
committerChris Forbes <chrisforbes@google.com>
Wed, 12 Sep 2018 16:54:19 +0000 (09:54 -0700)
commit84c981292b51a3011f3446cd7162166877042319
tree899e816df37a102daa3f6a909ad6999b90ceb7c9
parentdf6a2ffc6e0bb46fd9ac65729e3ab09b2a6ec7e5
teglImageFormatTests: call glFinish after creating the buffer in the client API

According to section 3.7.3.2 (Order of Rendering Operations Between
Contexts) of the EGL spec, the application is responsible for
synchronization between different rendering contexts even in the same
thread.

Some of the tests execute a sequence of operations like this (see
MultiContextRenderTests::init):

1. ctx0: create image
2. ctx0: read from image
3. ctx0: clear image
4. ctx1: recreate image
5. ctx0: read from image
6. ctx1: read from image

This change adds a call to glFinish between steps 4 and 5 that is needed
for correctness. Note that other parts of the same file already call
glFinish, e.g. the various Render actions.

Components: EGL
VK-GL-CTS issue: 857
Affects:
dEQP-EGL.functional.image.render_multiple_contexts.gles2_*_read_pixels
Bug: b/115514127

Change-Id: I4dc50f7516374405596653d7006165819b95b6fa
(cherry picked from Khronos commit e9c93ece28719bcdde74e75dae114f8188e380a3)
modules/egl/teglImageFormatTests.cpp