diff options
| author | Stenzek <stenzek@users.noreply.github.com> | 2018-10-24 14:51:21 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-24 14:51:21 +1100 |
| commit | c4d1e4adffcd380cc87b841069ce2fe8b62d7b60 (patch) | |
| tree | c61a0a07c14ccc3c1f7247bdcc82927a82c145bb /Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp | |
| parent | 9c9d598ec006527bc47aea306e5171d03c12c5f5 (diff) | |
| parent | 2c6d96433c322b50470705d43005fd6308506d49 (diff) | |
Merge pull request #7450 from stenzek/glcontext
GLInterface refactoring/cleanup and runtime platform selection
Diffstat (limited to 'Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp index 2d284ae4ef..78458aa3fe 100644 --- a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp +++ b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp @@ -12,7 +12,7 @@ #include "Common/Assert.h" #include "Common/CommonTypes.h" #include "Common/FileUtil.h" -#include "Common/GL/GLInterfaceBase.h" +#include "Common/GL/GLContext.h" #include "Common/Logging/Log.h" #include "Common/MsgHandler.h" #include "Common/StringUtil.h" @@ -805,7 +805,8 @@ void ProgramShaderCache::CreateHeader() bool SharedContextAsyncShaderCompiler::WorkerThreadInitMainThread(void** param) { - std::unique_ptr<cInterfaceBase> context = GLInterface->CreateSharedContext(); + std::unique_ptr<GLContext> context = + static_cast<Renderer*>(g_renderer.get())->GetMainGLContext()->CreateSharedContext(); if (!context) { PanicAlert("Failed to create shared context for shader compiling."); @@ -818,20 +819,20 @@ bool SharedContextAsyncShaderCompiler::WorkerThreadInitMainThread(void** param) bool SharedContextAsyncShaderCompiler::WorkerThreadInitWorkerThread(void* param) { - cInterfaceBase* context = static_cast<cInterfaceBase*>(param); + GLContext* context = static_cast<GLContext*>(param); if (!context->MakeCurrent()) return false; s_is_shared_context = true; if (g_ActiveConfig.backend_info.bSupportsPrimitiveRestart) - GLUtil::EnablePrimitiveRestart(); + GLUtil::EnablePrimitiveRestart(context); return true; } void SharedContextAsyncShaderCompiler::WorkerThreadExit(void* param) { - cInterfaceBase* context = static_cast<cInterfaceBase*>(param); + GLContext* context = static_cast<GLContext*>(param); context->ClearCurrent(); delete context; } |
