mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
Merge pull request #4436 from stenzek/vulkan-full-ir-framedump
VideoBackends: Internal resolution frame dumping
This commit is contained in:
@ -54,8 +54,8 @@ Renderer::Renderer(std::unique_ptr<SwapChain> swap_chain) : m_swap_chain(std::mo
|
||||
s_backbuffer_width = m_swap_chain ? m_swap_chain->GetWidth() : MAX_XFB_WIDTH;
|
||||
s_backbuffer_height = m_swap_chain ? m_swap_chain->GetHeight() : MAX_XFB_HEIGHT;
|
||||
s_last_efb_scale = g_ActiveConfig.iEFBScale;
|
||||
UpdateDrawRectangle(s_backbuffer_width, s_backbuffer_height);
|
||||
CalculateTargetSize(s_backbuffer_width, s_backbuffer_height);
|
||||
UpdateDrawRectangle();
|
||||
CalculateTargetSize();
|
||||
PixelShaderManager::SetEfbScaleChanged();
|
||||
}
|
||||
|
||||
@ -711,13 +711,7 @@ bool Renderer::DrawFrameDump(const EFBRectangle& source_rect, u32 xfb_addr,
|
||||
const XFBSourceBase* const* xfb_sources, u32 xfb_count, u32 fb_width,
|
||||
u32 fb_stride, u32 fb_height, u64 ticks)
|
||||
{
|
||||
// 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;
|
||||
TargetRectangle target_rect = CalculateFrameDumpDrawRectangle();
|
||||
u32 width = std::max(1u, static_cast<u32>(target_rect.GetWidth()));
|
||||
u32 height = std::max(1u, static_cast<u32>(target_rect.GetHeight()));
|
||||
if (!ResizeFrameDumpBuffer(width, height))
|
||||
@ -998,8 +992,8 @@ void Renderer::CheckForTargetResize(u32 fb_width, u32 fb_stride, u32 fb_height)
|
||||
FramebufferManagerBase::SetLastXfbHeight(new_height);
|
||||
|
||||
// Changing the XFB source area will likely change the final drawing rectangle.
|
||||
UpdateDrawRectangle(s_backbuffer_width, s_backbuffer_height);
|
||||
if (CalculateTargetSize(s_backbuffer_width, s_backbuffer_height))
|
||||
UpdateDrawRectangle();
|
||||
if (CalculateTargetSize())
|
||||
{
|
||||
PixelShaderManager::SetEfbScaleChanged();
|
||||
ResizeEFBTextures();
|
||||
@ -1112,11 +1106,11 @@ void Renderer::CheckForConfigChanges()
|
||||
|
||||
// If the aspect ratio is changed, this changes the area that the game is drawn to.
|
||||
if (aspect_changed)
|
||||
UpdateDrawRectangle(s_backbuffer_width, s_backbuffer_height);
|
||||
UpdateDrawRectangle();
|
||||
|
||||
if (efb_scale_changed || aspect_changed)
|
||||
{
|
||||
if (CalculateTargetSize(s_backbuffer_width, s_backbuffer_height))
|
||||
if (CalculateTargetSize())
|
||||
ResizeEFBTextures();
|
||||
}
|
||||
|
||||
@ -1157,8 +1151,8 @@ void Renderer::OnSwapChainResized()
|
||||
{
|
||||
s_backbuffer_width = m_swap_chain->GetWidth();
|
||||
s_backbuffer_height = m_swap_chain->GetHeight();
|
||||
UpdateDrawRectangle(s_backbuffer_width, s_backbuffer_height);
|
||||
if (CalculateTargetSize(s_backbuffer_width, s_backbuffer_height))
|
||||
UpdateDrawRectangle();
|
||||
if (CalculateTargetSize())
|
||||
{
|
||||
PixelShaderManager::SetEfbScaleChanged();
|
||||
ResizeEFBTextures();
|
||||
|
Reference in New Issue
Block a user