summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/ProgramShaderCache.h
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2018-02-25 17:56:09 +1000
committerStenzek <stenzek@gmail.com>2018-03-10 15:56:34 +1000
commitf9c829c7f711efadea1db7aabb51c703380fa03a (patch)
treecc645756b893e4c994360ec362977aaa9e5ad51f /Source/Core/VideoBackends/OGL/ProgramShaderCache.h
parentdec0c3bce85ceda89ea05f00b94aad00e675598d (diff)
OGL: Re-implement async shader compiling
Diffstat (limited to 'Source/Core/VideoBackends/OGL/ProgramShaderCache.h')
-rw-r--r--Source/Core/VideoBackends/OGL/ProgramShaderCache.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/OGL/ProgramShaderCache.h b/Source/Core/VideoBackends/OGL/ProgramShaderCache.h
index af2aa10383..0096c6e5b9 100644
--- a/Source/Core/VideoBackends/OGL/ProgramShaderCache.h
+++ b/Source/Core/VideoBackends/OGL/ProgramShaderCache.h
@@ -11,6 +11,7 @@
#include <unordered_map>
#include "Common/GL/GLUtil.h"
+#include "VideoCommon/AsyncShaderCompiler.h"
namespace OGL
{
@@ -87,7 +88,8 @@ public:
static void Shutdown();
static void CreateHeader();
- static const PipelineProgram* GetPipelineProgram(const OGLShader* vertex_shader,
+ static const PipelineProgram* GetPipelineProgram(const GLVertexFormat* vertex_format,
+ const OGLShader* vertex_shader,
const OGLShader* geometry_shader,
const OGLShader* pixel_shader);
static void ReleasePipelineProgram(const PipelineProgram* prog);
@@ -99,8 +101,8 @@ private:
static void CreateAttributelessVAO();
- static PipelineProgramMap pipelineprograms;
- static std::mutex pipelineprogramlock;
+ static PipelineProgramMap s_pipeline_programs;
+ static std::mutex s_pipeline_program_lock;
static u32 s_ubo_buffer_size;
static s32 s_ubo_align;
@@ -110,4 +112,12 @@ private:
static GLuint s_last_VAO;
};
+class SharedContextAsyncShaderCompiler : public VideoCommon::AsyncShaderCompiler
+{
+protected:
+ bool WorkerThreadInitMainThread(void** param) override;
+ bool WorkerThreadInitWorkerThread(void* param) override;
+ void WorkerThreadExit(void* param) override;
+};
+
} // namespace OGL