Skip to content
Permalink
Browse files

OGL: Set shared context state up to match main context

Has a better chance of avoiding recompiling if so.
  • Loading branch information...
stenzek committed Apr 21, 2019
1 parent 6553cf8 commit 356ebdf5098a24a70c04392ef7bcad7b762affbe
Showing with 12 additions and 0 deletions.
  1. +12 −0 Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp
@@ -852,6 +852,18 @@ bool SharedContextAsyncShaderCompiler::WorkerThreadInitWorkerThread(void* param)
return false;

s_is_shared_context = true;

// Make the state match the main context to have a better chance of avoiding recompiles.
if (!context->IsGLES())
glEnable(GL_PROGRAM_POINT_SIZE);
if (g_ActiveConfig.backend_info.bSupportsClipControl)
glClipControl(GL_LOWER_LEFT, GL_ZERO_TO_ONE);
if (g_ActiveConfig.backend_info.bSupportsDepthClamp)
{
glEnable(GL_CLIP_DISTANCE0);
glEnable(GL_CLIP_DISTANCE1);
glEnable(GL_DEPTH_CLAMP);
}
if (g_ActiveConfig.backend_info.bSupportsPrimitiveRestart)
GLUtil::EnablePrimitiveRestart(context);

0 comments on commit 356ebdf

Please sign in to comment.
You can’t perform that action at this time.