Fix thread pool entry point and get_cycles()

Fix possible race between thread handle availability.
Don't treat zero thread as invalid one.
Now entry point is full is assembly.
Attempt to fix #9282
Also fix some TLS.
This commit is contained in:
Nekotekina 2020-11-21 07:56:54 +03:00
parent 60cff6f3d4
commit 71f1021648
5 changed files with 109 additions and 110 deletions

View file

@ -11,16 +11,16 @@ namespace gl
capabilities g_driver_caps;
const fbo screen{};
thread_local bool tls_primary_context_thread = false;
static thread_local bool s_tls_primary_context_thread = false;
void set_primary_context_thread()
void set_primary_context_thread(bool value)
{
tls_primary_context_thread = true;
s_tls_primary_context_thread = value;
}
bool is_primary_context_thread()
{
return tls_primary_context_thread;
return s_tls_primary_context_thread;
}
GLenum draw_mode(rsx::primitive_type in)