From cc78d770439cfc1ae8ec0c802e5fcb5eae25979f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Sun, 22 Oct 2017 17:39:04 +0200 Subject: [PATCH] mesa: flush and wait after creating a fallback texture MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes non-deterministic failures in dEQP-EGL.functional.sharing.gles2.multithread.simple_egl_sync.images.texture_source.teximage2d_render and others in dEQP-EGL.functional.sharing.gles2.multithread.* Reviewed-by: Marek Olšák --- src/mesa/main/texobj.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 71c6f813233..02c47677880 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -1051,6 +1051,11 @@ _mesa_get_fallback_texture(struct gl_context *ctx, gl_texture_index tex) assert(texObj->_MipmapComplete); ctx->Shared->FallbackTex[tex] = texObj; + + /* Complete the driver's operation in case another context will also + * use the same fallback texture. */ + if (ctx->Driver.Finish) + ctx->Driver.Finish(ctx); } return ctx->Shared->FallbackTex[tex]; } -- 2.30.2