mirror of
https://github.com/starr-dusT/yuzu-mainline
synced 2024-03-05 21:12:25 -08:00
Merge pull request #8150 from liamwhite/vk-crop
Vulkan: crop to screen dimensions if crop not explicitly requested
This commit is contained in:
commit
827a901153
@ -1406,8 +1406,9 @@ void VKBlitScreen::SetVertexData(BufferData& data, const Tegra::FramebufferConfi
|
|||||||
UNIMPLEMENTED_IF(framebuffer_crop_rect.top != 0);
|
UNIMPLEMENTED_IF(framebuffer_crop_rect.top != 0);
|
||||||
UNIMPLEMENTED_IF(framebuffer_crop_rect.left != 0);
|
UNIMPLEMENTED_IF(framebuffer_crop_rect.left != 0);
|
||||||
|
|
||||||
f32 scale_u = 1.0f;
|
f32 scale_u = static_cast<f32>(framebuffer.width) / static_cast<f32>(screen_info.width);
|
||||||
f32 scale_v = 1.0f;
|
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
|
// Scale the output by the crop width/height. This is commonly used with 1280x720 rendering
|
||||||
// (e.g. handheld mode) on a 1920x1080 framebuffer.
|
// (e.g. handheld mode) on a 1920x1080 framebuffer.
|
||||||
if (!fsr) {
|
if (!fsr) {
|
||||||
|
Loading…
Reference in New Issue
Block a user