diff options
author | bunnei <bunneidev@gmail.com> | 2022-03-25 04:16:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-25 04:16:11 +0100 |
commit | ab6a5784fa991016b5d8c097471fbda88853ba5d (patch) | |
tree | 407ed36099630b4e52bcd727e799d8f22bb43c24 /src/video_core/renderer_opengl/gl_texture_cache.h | |
parent | Merge pull request #8050 from bunnei/nvflinger-rewrite (diff) | |
parent | GC: Address Feedback. (diff) | |
download | yuzu-ab6a5784fa991016b5d8c097471fbda88853ba5d.tar yuzu-ab6a5784fa991016b5d8c097471fbda88853ba5d.tar.gz yuzu-ab6a5784fa991016b5d8c097471fbda88853ba5d.tar.bz2 yuzu-ab6a5784fa991016b5d8c097471fbda88853ba5d.tar.lz yuzu-ab6a5784fa991016b5d8c097471fbda88853ba5d.tar.xz yuzu-ab6a5784fa991016b5d8c097471fbda88853ba5d.tar.zst yuzu-ab6a5784fa991016b5d8c097471fbda88853ba5d.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_texture_cache.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_texture_cache.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.h b/src/video_core/renderer_opengl/gl_texture_cache.h index 7f425631f..53088b66e 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.h +++ b/src/video_core/renderer_opengl/gl_texture_cache.h @@ -10,6 +10,7 @@ #include <glad/glad.h> #include "shader_recompiler/shader_info.h" +#include "video_core/renderer_opengl/gl_device.h" #include "video_core/renderer_opengl/gl_resource_manager.h" #include "video_core/renderer_opengl/util_shaders.h" #include "video_core/texture_cache/image_view_base.h" @@ -21,7 +22,6 @@ struct ResolutionScalingInfo; namespace OpenGL { -class Device; class ProgramManager; class StateTracker; @@ -83,7 +83,15 @@ public: ImageBufferMap DownloadStagingBuffer(size_t size); - u64 GetDeviceLocalMemory() const; + u64 GetDeviceLocalMemory() const { + return device_access_memory; + } + + u64 GetDeviceMemoryUsage() const; + + bool CanReportMemoryUsage() const { + return device.CanReportMemoryUsage(); + } bool ShouldReinterpret([[maybe_unused]] Image& dst, [[maybe_unused]] Image& src) { return true; @@ -172,6 +180,7 @@ private: std::array<OGLFramebuffer, 4> rescale_draw_fbos; std::array<OGLFramebuffer, 4> rescale_read_fbos; const Settings::ResolutionScalingInfo& resolution; + u64 device_access_memory; }; class Image : public VideoCommon::ImageBase { |