gl: Fix async shader compiler

- Removes glFinish hack.
- Adds proper server-side synchronization.
- Adds primary context detection to allow worker threads to be identified.
This commit is contained in:
kd-11 2020-04-05 14:16:57 +03:00 committed by Ivan
parent dc5cdb3bb4
commit b301fecfd8
8 changed files with 52 additions and 19 deletions

View file

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