summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_texture_cache.h
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-07-21 06:02:35 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2021-11-16 22:11:27 +0100
commitde66a69ed4b556ad96f38570ea0a31cb2a1870f1 (patch)
tree1ccad15e5a9a202494a72fdf6edf2b0abb6fa2b5 /src/video_core/renderer_opengl/gl_texture_cache.h
parentTextureCache: Fix rescaling of ImageCopies (diff)
downloadyuzu-de66a69ed4b556ad96f38570ea0a31cb2a1870f1.tar
yuzu-de66a69ed4b556ad96f38570ea0a31cb2a1870f1.tar.gz
yuzu-de66a69ed4b556ad96f38570ea0a31cb2a1870f1.tar.bz2
yuzu-de66a69ed4b556ad96f38570ea0a31cb2a1870f1.tar.lz
yuzu-de66a69ed4b556ad96f38570ea0a31cb2a1870f1.tar.xz
yuzu-de66a69ed4b556ad96f38570ea0a31cb2a1870f1.tar.zst
yuzu-de66a69ed4b556ad96f38570ea0a31cb2a1870f1.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_texture_cache.h9
1 files changed, 7 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 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 <glad/glad.h>
+#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<GLuint, Shader::NUM_TEXTURE_TYPES> 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 {