Skip to content

Commit

Permalink
Merge pull request #6204 from stenzek/downscaled-screenshots
Browse files Browse the repository at this point in the history
Frame Dumping: Fix window-size framedumping
  • Loading branch information
leoetlino committed Nov 22, 2017
2 parents 066471b + 470e8d6 commit 73a67aa
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 29 deletions.
4 changes: 1 addition & 3 deletions Source/Core/DolphinQt2/Config/Graphics/AdvancedWidget.cpp
Expand Up @@ -62,7 +62,7 @@ void AdvancedWidget::CreateWidgets()
m_load_custom_textures = new GraphicsBool(tr("Load Custom Textures"), Config::GFX_HIRES_TEXTURES);
m_prefetch_custom_textures =
new GraphicsBool(tr("Prefetch Custom Textures"), Config::GFX_CACHE_HIRES_TEXTURES);
m_use_fullres_framedumps = new GraphicsBool(tr("Full Resolution Frame Dumps"),
m_use_fullres_framedumps = new GraphicsBool(tr("Internal Resolution Frame Dumps"),
Config::GFX_INTERNAL_RESOLUTION_FRAME_DUMPS);
m_dump_efb_target = new GraphicsBool(tr("Dump EFB Target"), Config::GFX_DUMP_EFB_TARGET);
m_enable_freelook = new GraphicsBool(tr("Free Look"), Config::GFX_FREE_LOOK);
Expand Down Expand Up @@ -123,8 +123,6 @@ void AdvancedWidget::SaveSettings()

void AdvancedWidget::OnBackendChanged()
{
const auto supports_fr_framedumps = g_Config.backend_info.bSupportsInternalResolutionFrameDumps;
m_use_fullres_framedumps->setEnabled(supports_fr_framedumps);
}

void AdvancedWidget::OnEmulationStateChanged(bool running)
Expand Down
9 changes: 3 additions & 6 deletions Source/Core/DolphinWX/VideoConfigDiag.cpp
Expand Up @@ -843,12 +843,9 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string& title)
Config::GFX_CACHE_HIRES_TEXTURES);
szr_utility->Add(cache_hires_textures);

if (vconfig.backend_info.bSupportsInternalResolutionFrameDumps)
{
szr_utility->Add(CreateCheckBox(page_advanced, _("Full Resolution Frame Dumps"),
wxGetTranslation(internal_resolution_frame_dumping_desc),
Config::GFX_INTERNAL_RESOLUTION_FRAME_DUMPS));
}
szr_utility->Add(CreateCheckBox(page_advanced, _("Internal Resolution Frame Dumps"),
wxGetTranslation(internal_resolution_frame_dumping_desc),
Config::GFX_INTERNAL_RESOLUTION_FRAME_DUMPS));

szr_utility->Add(CreateCheckBox(page_advanced, _("Dump EFB Target"),
wxGetTranslation(dump_efb_desc),
Expand Down
1 change: 0 additions & 1 deletion Source/Core/VideoBackends/D3D/main.cpp
Expand Up @@ -75,7 +75,6 @@ void VideoBackend::InitBackendInfo()
g_Config.backend_info.bSupportsDepthClamp = true;
g_Config.backend_info.bSupportsReversedDepthRange = false;
g_Config.backend_info.bSupportsMultithreading = false;
g_Config.backend_info.bSupportsInternalResolutionFrameDumps = false;
g_Config.backend_info.bSupportsGPUTextureDecoding = false;
g_Config.backend_info.bSupportsST3CTextures = false;
g_Config.backend_info.bSupportsCopyToVram = true;
Expand Down
1 change: 0 additions & 1 deletion Source/Core/VideoBackends/Null/NullBackend.cpp
Expand Up @@ -43,7 +43,6 @@ void VideoBackend::InitBackendInfo()
g_Config.backend_info.bSupportsDepthClamp = true;
g_Config.backend_info.bSupportsReversedDepthRange = true;
g_Config.backend_info.bSupportsMultithreading = false;
g_Config.backend_info.bSupportsInternalResolutionFrameDumps = false;
g_Config.backend_info.bSupportsGPUTextureDecoding = false;
g_Config.backend_info.bSupportsST3CTextures = false;
g_Config.backend_info.bSupportsBPTCTextures = false;
Expand Down
1 change: 0 additions & 1 deletion Source/Core/VideoBackends/OGL/main.cpp
Expand Up @@ -90,7 +90,6 @@ void VideoBackend::InitBackendInfo()
g_Config.backend_info.bSupportsSSAA = true;
g_Config.backend_info.bSupportsReversedDepthRange = true;
g_Config.backend_info.bSupportsMultithreading = false;
g_Config.backend_info.bSupportsInternalResolutionFrameDumps = true;
g_Config.backend_info.bSupportsCopyToVram = true;
g_Config.backend_info.bForceCopyToRam = false;

Expand Down
1 change: 0 additions & 1 deletion Source/Core/VideoBackends/Software/SWmain.cpp
Expand Up @@ -68,7 +68,6 @@ void VideoSoftware::InitBackendInfo()
g_Config.backend_info.bSupportsPrimitiveRestart = false;
g_Config.backend_info.bSupportsMultithreading = false;
g_Config.backend_info.bSupportsComputeShaders = false;
g_Config.backend_info.bSupportsInternalResolutionFrameDumps = false;
g_Config.backend_info.bSupportsGPUTextureDecoding = false;
g_Config.backend_info.bSupportsST3CTextures = false;
g_Config.backend_info.bSupportsBPTCTextures = false;
Expand Down
23 changes: 11 additions & 12 deletions Source/Core/VideoBackends/Vulkan/VulkanContext.cpp
Expand Up @@ -233,18 +233,17 @@ void VulkanContext::PopulateBackendInfo(VideoConfig* config)
config->backend_info.bSupportsComputeShaders = true; // Assumed support.
config->backend_info.bSupportsGPUTextureDecoding = true; // Assumed support.
config->backend_info.bSupportsBitfield = true; // Assumed support.
config->backend_info.bSupportsDynamicSamplerIndexing = true; // Assumed support.
config->backend_info.bSupportsInternalResolutionFrameDumps = true; // Assumed support.
config->backend_info.bSupportsPostProcessing = true; // Assumed support.
config->backend_info.bSupportsDualSourceBlend = false; // Dependent on features.
config->backend_info.bSupportsGeometryShaders = false; // Dependent on features.
config->backend_info.bSupportsGSInstancing = false; // Dependent on features.
config->backend_info.bSupportsBBox = false; // Dependent on features.
config->backend_info.bSupportsFragmentStoresAndAtomics = false; // Dependent on features.
config->backend_info.bSupportsSSAA = false; // Dependent on features.
config->backend_info.bSupportsDepthClamp = false; // Dependent on features.
config->backend_info.bSupportsST3CTextures = false; // Dependent on features.
config->backend_info.bSupportsBPTCTextures = false; // Dependent on features.
config->backend_info.bSupportsDynamicSamplerIndexing = true; // Assumed support.
config->backend_info.bSupportsPostProcessing = true; // Assumed support.
config->backend_info.bSupportsDualSourceBlend = false; // Dependent on features.
config->backend_info.bSupportsGeometryShaders = false; // Dependent on features.
config->backend_info.bSupportsGSInstancing = false; // Dependent on features.
config->backend_info.bSupportsBBox = false; // Dependent on features.
config->backend_info.bSupportsFragmentStoresAndAtomics = false; // Dependent on features.
config->backend_info.bSupportsSSAA = false; // Dependent on features.
config->backend_info.bSupportsDepthClamp = false; // Dependent on features.
config->backend_info.bSupportsST3CTextures = false; // Dependent on features.
config->backend_info.bSupportsBPTCTextures = false; // Dependent on features.
config->backend_info.bSupportsReversedDepthRange = false; // No support yet due to driver bugs.
config->backend_info.bSupportsCopyToVram = true; // Assumed support.
config->backend_info.bForceCopyToRam = false;
Expand Down
14 changes: 12 additions & 2 deletions Source/Core/VideoCommon/RenderBase.cpp
Expand Up @@ -711,8 +711,18 @@ void Renderer::DoDumpFrame()
void Renderer::UpdateFrameDumpTexture()
{
int target_width, target_height;
std::tie(target_width, target_height) = CalculateOutputDimensions(
m_last_xfb_texture->GetConfig().width, m_last_xfb_texture->GetConfig().height);
if (!g_ActiveConfig.bInternalResolutionFrameDumps)
{
auto target_rect = GetTargetRectangle();
target_width = target_rect.GetWidth();
target_height = target_rect.GetHeight();
}
else
{
std::tie(target_width, target_height) = CalculateOutputDimensions(
m_last_xfb_texture->GetConfig().width, m_last_xfb_texture->GetConfig().height);
}

if (m_dump_texture == nullptr ||
m_dump_texture->GetConfig().width != static_cast<u32>(target_width) ||
m_dump_texture->GetConfig().height != static_cast<u32>(target_height))
Expand Down
1 change: 0 additions & 1 deletion Source/Core/VideoCommon/VideoConfig.cpp
Expand Up @@ -36,7 +36,6 @@ VideoConfig::VideoConfig()
backend_info.MaxTextureSize = 16384;
backend_info.bSupportsExclusiveFullscreen = false;
backend_info.bSupportsMultithreading = false;
backend_info.bSupportsInternalResolutionFrameDumps = false;
backend_info.bSupportsST3CTextures = false;
backend_info.bSupportsBPTCTextures = false;

Expand Down
1 change: 0 additions & 1 deletion Source/Core/VideoCommon/VideoConfig.h
Expand Up @@ -219,7 +219,6 @@ struct VideoConfig final
bool bSupportsDepthClamp; // Needed by VertexShaderGen, so must stay in VideoCommon
bool bSupportsReversedDepthRange;
bool bSupportsMultithreading;
bool bSupportsInternalResolutionFrameDumps;
bool bSupportsGPUTextureDecoding;
bool bSupportsST3CTextures;
bool bSupportsCopyToVram;
Expand Down

0 comments on commit 73a67aa

Please sign in to comment.