aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFernando S <fsahmkow27@gmail.com>2022-04-07 16:58:29 +0200
committerGitHub <noreply@github.com>2022-04-07 16:58:29 +0200
commita319d0d16cf5d442916ff4399bb9ec9bc8e73fa6 (patch)
treec77ca51b8213f3ab70e3b448eb2bb81b3b46e586 /src
parent0bb26a7794f6eabb7566b9314c0143a16d3c9470 (diff)
parentb49aaadc8707eba6648a90bd447a6616f41970c6 (diff)
Merge pull request #8150 from liamwhite/vk-crop
Vulkan: crop to screen dimensions if crop not explicitly requested
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_vulkan/vk_blit_screen.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/vk_blit_screen.cpp b/src/video_core/renderer_vulkan/vk_blit_screen.cpp
index d893c19526..b866e91038 100644
--- a/src/video_core/renderer_vulkan/vk_blit_screen.cpp
+++ b/src/video_core/renderer_vulkan/vk_blit_screen.cpp
@@ -1406,8 +1406,9 @@ void VKBlitScreen::SetVertexData(BufferData& data, const Tegra::FramebufferConfi
UNIMPLEMENTED_IF(framebuffer_crop_rect.top != 0);
UNIMPLEMENTED_IF(framebuffer_crop_rect.left != 0);
- f32 scale_u = 1.0f;
- f32 scale_v = 1.0f;
+ f32 scale_u = static_cast<f32>(framebuffer.width) / static_cast<f32>(screen_info.width);
+ f32 scale_v = static_cast<f32>(framebuffer.height) / static_cast<f32>(screen_info.height);
+
// Scale the output by the crop width/height. This is commonly used with 1280x720 rendering
// (e.g. handheld mode) on a 1920x1080 framebuffer.
if (!fsr) {