mesa: fold _glapi_check_multithread() back into _mesa_make_current

With commit c6c0f94714, back in 2006 Brian removed the
_glapi_check_multithread() call from core mesa - _mesa_make_current.

It was done to remove fairly awkward #ifdef guard which caused subtle
differences in core mesa.

Since that guard is long gone, we can drop the duplication and
reintroduce the call in core.

Note that the function is was missing when using EGL + classic dri HW
drivers. Yet on TLS builds it's a no-op, so we're safe.

Any non TLS users - more or less anything !Linux (or even musl on Linux
up-to semi-recently) may have experienced problems.

v2: don't remove the call from swrast - move it to core (Eric)

Cc: Eric Anholt <eric@anholt.net>
Cc: Brian Paul <brianp@vmware.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Emil Velikov
2018-09-05 17:09:10 +01:00
committed by Emil Velikov
parent d081ad2aa2
commit fa9df82f67
5 changed files with 4 additions and 16 deletions

View File

@@ -1698,7 +1698,10 @@ _mesa_make_current( struct gl_context *newCtx,
_mesa_flush(curCtx);
}
/* We used to call _glapi_check_multithread() here. Now do it in drivers */
/* Call this periodically to detect when the user has begun using
* GL rendering from multiple threads.
*/
_glapi_check_multithread();
if (!newCtx) {
_glapi_set_dispatch(NULL); /* none current */