diff options
author | bunnei <bunneidev@gmail.com> | 2019-07-22 17:12:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-22 17:12:55 +0200 |
commit | f601f25bcc76f54ac0fa983cd74141bb075468de (patch) | |
tree | f126d994a186281792f331928d5139f68f0bfec8 /src/video_core/renderer_opengl/gl_shader_cache.h | |
parent | Merge pull request #2735 from FernandoS27/pipeline-rework (diff) | |
parent | gl_shader_cache: Fix clang-format issues (diff) | |
download | yuzu-f601f25bcc76f54ac0fa983cd74141bb075468de.tar yuzu-f601f25bcc76f54ac0fa983cd74141bb075468de.tar.gz yuzu-f601f25bcc76f54ac0fa983cd74141bb075468de.tar.bz2 yuzu-f601f25bcc76f54ac0fa983cd74141bb075468de.tar.lz yuzu-f601f25bcc76f54ac0fa983cd74141bb075468de.tar.xz yuzu-f601f25bcc76f54ac0fa983cd74141bb075468de.tar.zst yuzu-f601f25bcc76f54ac0fa983cd74141bb075468de.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_cache.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.h b/src/video_core/renderer_opengl/gl_shader_cache.h index bbb53cdf4..a3106a0ff 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.h +++ b/src/video_core/renderer_opengl/gl_shader_cache.h @@ -61,6 +61,11 @@ public: Maxwell::ShaderProgram program_type, GLShader::ProgramResult result); + static Shader CreateKernelFromMemory(const ShaderParameters& params, ProgramCode&& code); + + static Shader CreateKernelFromCache(const ShaderParameters& params, + GLShader::ProgramResult result); + VAddr GetCpuAddr() const override { return cpu_addr; } @@ -78,7 +83,7 @@ public: std::tuple<GLuint, BaseBindings> GetProgramHandle(const ProgramVariant& variant); private: - explicit CachedShader(const ShaderParameters& params, Maxwell::ShaderProgram program_type, + explicit CachedShader(const ShaderParameters& params, ProgramType program_type, GLShader::ProgramResult result); // Geometry programs. These are needed because GLSL needs an input topology but it's not @@ -104,7 +109,7 @@ private: u8* host_ptr{}; VAddr cpu_addr{}; u64 unique_identifier{}; - Maxwell::ShaderProgram program_type{}; + ProgramType program_type{}; ShaderDiskCacheOpenGL& disk_cache; const PrecompiledPrograms& precompiled_programs; @@ -132,6 +137,9 @@ public: /// Gets the current specified shader stage program Shader GetStageProgram(Maxwell::ShaderProgram program); + /// Gets a compute kernel in the passed address + Shader GetComputeKernel(GPUVAddr code_addr); + protected: // We do not have to flush this cache as things in it are never modified by us. void FlushObjectInner(const Shader& object) override {} |