summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/ProgramShaderCache.h
diff options
context:
space:
mode:
authorConnor McLaughlin <stenzek@gmail.com>2019-04-20 12:56:02 +1000
committerGitHub <noreply@github.com>2019-04-20 12:56:02 +1000
commitc26f53bf84007bad8b6b89fae91e38f4cdb531bd (patch)
treebcfcddc830ed956545e7df122f98ae215dc1bab2 /Source/Core/VideoBackends/OGL/ProgramShaderCache.h
parent9e951819d5ddc2f68635dea9d5077676a9799c06 (diff)
parent00b83b4196b060987f34cd55286aa4f55c02530d (diff)
Merge pull request #7999 from stenzek/pipeline-cache-data
Implement pipeline data cache for OpenGL and D3D12
Diffstat (limited to 'Source/Core/VideoBackends/OGL/ProgramShaderCache.h')
-rw-r--r--Source/Core/VideoBackends/OGL/ProgramShaderCache.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/Core/VideoBackends/OGL/ProgramShaderCache.h b/Source/Core/VideoBackends/OGL/ProgramShaderCache.h
index 7fc267dc5d..b7e4dd6d00 100644
--- a/Source/Core/VideoBackends/OGL/ProgramShaderCache.h
+++ b/Source/Core/VideoBackends/OGL/ProgramShaderCache.h
@@ -63,6 +63,7 @@ struct PipelineProgram
PipelineProgramKey key;
SHADER shader;
std::atomic_size_t reference_count{1};
+ bool binary_retrieved = false;
};
class ProgramShaderCache
@@ -97,11 +98,12 @@ public:
// pipeline do not match the pipeline configuration.
static u64 GenerateShaderID();
- 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);
+ static PipelineProgram* GetPipelineProgram(const GLVertexFormat* vertex_format,
+ const OGLShader* vertex_shader,
+ const OGLShader* geometry_shader,
+ const OGLShader* pixel_shader, const void* cache_data,
+ size_t cache_data_size);
+ static void ReleasePipelineProgram(PipelineProgram* prog);
private:
typedef std::unordered_map<PipelineProgramKey, std::unique_ptr<PipelineProgram>,