From de66a69ed4b556ad96f38570ea0a31cb2a1870f1 Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Wed, 21 Jul 2021 00:02:35 -0400 Subject: renderer_gl: Resolution scaling fixes --- src/video_core/renderer_opengl/gl_texture_cache.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/video_core/renderer_opengl/gl_texture_cache.h') diff --git a/src/video_core/renderer_opengl/gl_texture_cache.h b/src/video_core/renderer_opengl/gl_texture_cache.h index 324a0f1cb..77ca14132 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.h +++ b/src/video_core/renderer_opengl/gl_texture_cache.h @@ -9,6 +9,7 @@ #include +#include "common/settings.h" #include "shader_recompiler/shader_info.h" #include "video_core/renderer_opengl/gl_resource_manager.h" #include "video_core/renderer_opengl/util_shaders.h" @@ -72,7 +73,7 @@ public: StateTracker& state_tracker); ~TextureCacheRuntime(); - void Init() {} + void Init(); void Finish(); @@ -153,6 +154,9 @@ private: OGLTextureView null_image_view_cube; std::array null_image_views{}; + + Settings::ResolutionScalingInfo resolution; + bool is_rescaling_on{}; }; class Image : public VideoCommon::ImageBase { @@ -198,13 +202,14 @@ private: void CopyImageToBuffer(const VideoCommon::BufferImageCopy& copy, size_t buffer_offset); - void Scale(); + void Scale(u32 up, u32 down); OGLTexture texture; OGLTextureView store_view; GLenum gl_internal_format = GL_NONE; GLenum gl_format = GL_NONE; GLenum gl_type = GL_NONE; + TextureCacheRuntime* runtime; }; class ImageView : public VideoCommon::ImageViewBase { -- cgit v1.2.3