Vulkan: Don't save borders to screenshots/frame dumps
This matches the behavior on GL, making for easier comparisons.
This commit is contained in:
parent
400ba3c7e5
commit
b39ac950eb
|
@ -618,8 +618,15 @@ void Renderer::DrawScreen(const TargetRectangle& src_rect, const Texture2D* src_
|
|||
|
||||
bool Renderer::DrawScreenshot(const TargetRectangle& src_rect, const Texture2D* src_tex)
|
||||
{
|
||||
u32 width = std::max(1u, static_cast<u32>(s_backbuffer_width));
|
||||
u32 height = std::max(1u, static_cast<u32>(s_backbuffer_height));
|
||||
// Draw the screenshot to an image containing only the active screen area, removing any
|
||||
// borders as a result of the game rendering in a different aspect ratio.
|
||||
TargetRectangle target_rect = GetTargetRectangle();
|
||||
target_rect.right = target_rect.GetWidth();
|
||||
target_rect.bottom = target_rect.GetHeight();
|
||||
target_rect.left = 0;
|
||||
target_rect.top = 0;
|
||||
u32 width = std::max(1u, static_cast<u32>(target_rect.GetWidth()));
|
||||
u32 height = std::max(1u, static_cast<u32>(target_rect.GetHeight()));
|
||||
if (!ResizeScreenshotBuffer(width, height))
|
||||
return false;
|
||||
|
||||
|
@ -637,8 +644,8 @@ bool Renderer::DrawScreenshot(const TargetRectangle& src_rect, const Texture2D*
|
|||
VK_SUBPASS_CONTENTS_INLINE);
|
||||
vkCmdClearAttachments(g_command_buffer_mgr->GetCurrentCommandBuffer(), 1, &clear_attachment, 1,
|
||||
&clear_rect);
|
||||
BlitScreen(m_framebuffer_mgr->GetColorCopyForReadbackRenderPass(), GetTargetRectangle(), src_rect,
|
||||
src_tex, true);
|
||||
BlitScreen(m_framebuffer_mgr->GetColorCopyForReadbackRenderPass(), target_rect, src_rect, src_tex,
|
||||
true);
|
||||
vkCmdEndRenderPass(g_command_buffer_mgr->GetCurrentCommandBuffer());
|
||||
|
||||
// Copy to the readback texture.
|
||||
|
|
Loading…
Reference in New Issue