glx: Remove usage of pipe_tsd_set and pipe_tsd_get

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17213>
This commit is contained in:
Yonggang Luo 2022-06-21 17:23:59 +08:00 committed by Marge Bot
parent 6af5cadef9
commit af1fe5c2c8
1 changed files with 3 additions and 4 deletions

View File

@ -103,21 +103,20 @@ struct __GLXcontextRec
};
static pipe_tsd ContextTSD;
thread_local GLXContext ContextTSD;
/** Set current context for calling thread */
static void
SetCurrentContext(GLXContext c)
{
pipe_tsd_set(&ContextTSD, c);
ContextTSD = c;
}
/** Get current context for calling thread */
static GLXContext
GetCurrentContext(void)
{
return pipe_tsd_get(&ContextTSD);
return ContextTSD;
}