diff options
author | bunnei <bunneidev@gmail.com> | 2018-10-16 22:51:53 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-10-16 22:51:53 +0200 |
commit | 91602de7f27e391c8e322a2670ef9d50a64f7517 (patch) | |
tree | 82338c004e99032bf195b173f0c0ea7ed34c4f02 /src/video_core/renderer_opengl/gl_shader_cache.h | |
parent | gl_rasterizer_cache: Refactor to only call GetRegionEnd on surface creation. (diff) | |
download | yuzu-91602de7f27e391c8e322a2670ef9d50a64f7517.tar yuzu-91602de7f27e391c8e322a2670ef9d50a64f7517.tar.gz yuzu-91602de7f27e391c8e322a2670ef9d50a64f7517.tar.bz2 yuzu-91602de7f27e391c8e322a2670ef9d50a64f7517.tar.lz yuzu-91602de7f27e391c8e322a2670ef9d50a64f7517.tar.xz yuzu-91602de7f27e391c8e322a2670ef9d50a64f7517.tar.zst yuzu-91602de7f27e391c8e322a2670ef9d50a64f7517.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.h b/src/video_core/renderer_opengl/gl_shader_cache.h index d9157ec3c..a210f1731 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.h +++ b/src/video_core/renderer_opengl/gl_shader_cache.h @@ -19,22 +19,20 @@ class CachedShader; using Shader = std::shared_ptr<CachedShader>; using Maxwell = Tegra::Engines::Maxwell3D::Regs; -class CachedShader final { +class CachedShader final : public RasterizerCacheObject { public: CachedShader(VAddr addr, Maxwell::ShaderProgram program_type); - /// Gets the address of the shader in guest memory, required for cache management - VAddr GetAddr() const { + VAddr GetAddr() const override { return addr; } - /// Gets the size of the shader in guest memory, required for cache management - std::size_t GetSizeInBytes() const { + std::size_t GetSizeInBytes() const override { return GLShader::MAX_PROGRAM_CODE_LENGTH * sizeof(u64); } // We do not have to flush this cache as things in it are never modified by us. - void Flush() {} + void Flush() override {} /// Gets the shader entries for the shader const GLShader::ShaderEntries& GetShaderEntries() const { |