diff options
author | bunnei <bunneidev@gmail.com> | 2018-10-10 01:15:05 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-10-16 17:30:59 +0200 |
commit | 9b929e934b1d2cc2ae5e0be7fcafe22c6994fdba (patch) | |
tree | 87342510608eaf714da8008f5a1c48e3f2a34bdc /src/video_core/renderer_opengl/gl_rasterizer_cache.h | |
parent | Merge pull request #1443 from DarkLordZach/lower-loader-logs-1 (diff) | |
download | yuzu-9b929e934b1d2cc2ae5e0be7fcafe22c6994fdba.tar yuzu-9b929e934b1d2cc2ae5e0be7fcafe22c6994fdba.tar.gz yuzu-9b929e934b1d2cc2ae5e0be7fcafe22c6994fdba.tar.bz2 yuzu-9b929e934b1d2cc2ae5e0be7fcafe22c6994fdba.tar.lz yuzu-9b929e934b1d2cc2ae5e0be7fcafe22c6994fdba.tar.xz yuzu-9b929e934b1d2cc2ae5e0be7fcafe22c6994fdba.tar.zst yuzu-9b929e934b1d2cc2ae5e0be7fcafe22c6994fdba.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer_cache.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index 0b8ae3eb4..a15fb7b07 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h @@ -802,6 +802,18 @@ public: return params.size_in_bytes_total; } + void Flush() { + // There is no need to flush the surface if it hasn't been modified by us. + if (!dirty) + return; + FlushGLBuffer(); + dirty = false; + } + + void MarkAsDirty() { + dirty = true; + } + const OGLTexture& Texture() const { return texture; } @@ -833,6 +845,7 @@ private: std::vector<u8> gl_buffer; SurfaceParams params; GLenum gl_target; + bool dirty = false; }; class RasterizerCacheOpenGL final : public RasterizerCache<Surface> { |