diff options
author | bunnei <bunneidev@gmail.com> | 2018-10-16 03:24:34 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-10-16 17:31:02 +0200 |
commit | 0e59291310b324264c311e7b7e7e309f080bd232 (patch) | |
tree | f305c35f453c5753bf6cad6b448b9a23180b22cf /src/video_core/renderer_opengl/gl_rasterizer_cache.h | |
parent | gl_rasterizer_cache: Only flush when use_accurate_framebuffers is enabled. (diff) | |
download | yuzu-0e59291310b324264c311e7b7e7e309f080bd232.tar yuzu-0e59291310b324264c311e7b7e7e309f080bd232.tar.gz yuzu-0e59291310b324264c311e7b7e7e309f080bd232.tar.bz2 yuzu-0e59291310b324264c311e7b7e7e309f080bd232.tar.lz yuzu-0e59291310b324264c311e7b7e7e309f080bd232.tar.xz yuzu-0e59291310b324264c311e7b7e7e309f080bd232.tar.zst yuzu-0e59291310b324264c311e7b7e7e309f080bd232.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index 843f18cea..39fd7cd75 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h @@ -783,6 +783,7 @@ struct SurfaceParams { // Parameters used for caching VAddr addr; + Tegra::GPUVAddr gpu_addr; std::size_t size_in_bytes; std::size_t size_in_bytes_gl; @@ -802,7 +803,8 @@ struct SurfaceReserveKey : Common::HashableStruct<OpenGL::SurfaceParams> { static SurfaceReserveKey Create(const OpenGL::SurfaceParams& params) { SurfaceReserveKey res; res.state = params; - res.state.rt = {}; // Ignore rt config in caching + res.state.gpu_addr = {}; // Ignore GPU vaddr in caching + res.state.rt = {}; // Ignore rt config in caching return res; } }; @@ -826,7 +828,7 @@ public: } std::size_t GetSizeInBytes() const { - return params.size_in_bytes; + return cached_size_in_bytes; } void Flush() { @@ -865,6 +867,7 @@ private: std::vector<u8> gl_buffer; SurfaceParams params; GLenum gl_target; + std::size_t cached_size_in_bytes; bool dirty = false; }; |