diff options
author | Liam <byteslice@airmail.cc> | 2024-01-27 04:27:34 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-01-31 17:27:20 +0100 |
commit | 453091f61100effba637950dc840da41d95be477 (patch) | |
tree | 0e1d46a7c5a354769d04b9bde090b5a9b1f02eb7 /src/video_core/renderer_vulkan/vk_rasterizer.cpp | |
parent | video_core: simplify accelerated surface fetch and crop handling between APIs (diff) | |
download | yuzu-453091f61100effba637950dc840da41d95be477.tar yuzu-453091f61100effba637950dc840da41d95be477.tar.gz yuzu-453091f61100effba637950dc840da41d95be477.tar.bz2 yuzu-453091f61100effba637950dc840da41d95be477.tar.lz yuzu-453091f61100effba637950dc840da41d95be477.tar.xz yuzu-453091f61100effba637950dc840da41d95be477.tar.zst yuzu-453091f61100effba637950dc840da41d95be477.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index e593d7225..aa0a027bb 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -788,18 +788,22 @@ std::optional<FramebufferTextureInfo> RasterizerVulkan::AccelerateDisplay( return {}; } std::scoped_lock lock{texture_cache.mutex}; - ImageView* const image_view = + const auto [image_view, scaled] = texture_cache.TryFindFramebufferImageView(config, framebuffer_addr); if (!image_view) { return {}; } query_cache.NotifySegment(false); + const auto& resolution = Settings::values.resolution_info; + FramebufferTextureInfo info{}; info.image = image_view->ImageHandle(); info.image_view = 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; } |