rsx: fix flip logic when grabbing output from the surface cache

This commit is contained in:
kd-11 2018-11-20 16:05:21 +03:00 committed by kd-11
parent 25b8a42519
commit c75749f8ce
2 changed files with 9 additions and 3 deletions

View File

@ -1627,8 +1627,8 @@ void GLGSRender::flip(int buffer)
if (image)
{
buffer_width = render_target_texture->width();
buffer_height = render_target_texture->height();
buffer_width = rsx::apply_resolution_scale(buffer_width, true);
buffer_height = rsx::apply_resolution_scale(buffer_height, true);
}
}
else if (auto surface = m_gl_texture_cache.find_texture_from_dimensions(absolute_address, buffer_width, buffer_height))

View File

@ -3247,6 +3247,12 @@ void VKGSRender::flip(int buffer)
image_to_flip = render_target_texture;
}
}
if (image_to_flip)
{
buffer_width = rsx::apply_resolution_scale(buffer_width, true);
buffer_height = rsx::apply_resolution_scale(buffer_height, true);
}
}
else if (auto surface = m_texture_cache.find_texture_from_dimensions(absolute_address, buffer_width, buffer_height))
{
@ -3300,7 +3306,7 @@ void VKGSRender::flip(int buffer)
}
vk::copy_scaled_image(*m_current_command_buffer, image_to_flip->value, target_image, image_to_flip->current_layout, target_layout,
0, 0, image_to_flip->width(), image_to_flip->height(), aspect_ratio.x, aspect_ratio.y, aspect_ratio.width, aspect_ratio.height, 1, VK_IMAGE_ASPECT_COLOR_BIT, false);
0, 0, buffer_width, buffer_height, aspect_ratio.x, aspect_ratio.y, aspect_ratio.width, aspect_ratio.height, 1, VK_IMAGE_ASPECT_COLOR_BIT, false);
if (target_layout != present_layout)
{