diff options
| author | Liam <byteslice@airmail.cc> | 2024-01-26 22:27:34 -0500 |
|---|---|---|
| committer | Liam <byteslice@airmail.cc> | 2024-01-31 11:27:20 -0500 |
| commit | 453091f61100effba637950dc840da41d95be477 (patch) | |
| tree | 0e1d46a7c5a354769d04b9bde090b5a9b1f02eb7 /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
| parent | 80de01a5b4a7f57ec7850079fbd38fac76b9d08f (diff) | |
video_core: consistently account for resolution scaling when rendering
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 050a74cca..b42fb110c 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -747,16 +747,20 @@ std::optional<FramebufferTextureInfo> RasterizerOpenGL::AccelerateDisplay( MICROPROFILE_SCOPE(OpenGL_CacheManagement); std::scoped_lock lock{texture_cache.mutex}; - ImageView* const image_view{ - texture_cache.TryFindFramebufferImageView(config, framebuffer_addr)}; + const auto [image_view, scaled] = + texture_cache.TryFindFramebufferImageView(config, framebuffer_addr); if (!image_view) { return {}; } + const auto& resolution = Settings::values.resolution_info; + FramebufferTextureInfo info{}; info.display_texture = image_view->Handle(Shader::TextureType::Color2D); info.width = image_view->size.width; info.height = image_view->size.height; + info.scaled_width = scaled ? resolution.ScaleUp(info.width) : info.width; + info.scaled_height = scaled ? resolution.ScaleUp(info.height) : info.height; return info; } |
