summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLeo Lam <leolino.lam@gmail.com>2017-11-22 07:53:23 +0100
committerGitHub <noreply@github.com>2017-11-22 07:53:23 +0100
commit73a67aa413d9bd5e30f361089915135b2fb41e7a (patch)
tree98fe825920a9158b1697e807d5f680fbe9c6b9d3 /Source/Core
parent066471be076994ea8538d13e8d6979609193a2de (diff)
parent470e8d63b645b232b6d0c58e9a2d5291ab068d3c (diff)
Merge pull request #6204 from stenzek/downscaled-screenshots
Frame Dumping: Fix window-size framedumping
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinQt2/Config/Graphics/AdvancedWidget.cpp4
-rw-r--r--Source/Core/DolphinWX/VideoConfigDiag.cpp9
-rw-r--r--Source/Core/VideoBackends/D3D/main.cpp1
-rw-r--r--Source/Core/VideoBackends/Null/NullBackend.cpp1
-rw-r--r--Source/Core/VideoBackends/OGL/main.cpp1
-rw-r--r--Source/Core/VideoBackends/Software/SWmain.cpp1
-rw-r--r--Source/Core/VideoBackends/Vulkan/VulkanContext.cpp23
-rw-r--r--Source/Core/VideoCommon/RenderBase.cpp14
-rw-r--r--Source/Core/VideoCommon/VideoConfig.cpp1
-rw-r--r--Source/Core/VideoCommon/VideoConfig.h1
10 files changed, 27 insertions, 29 deletions
diff --git a/Source/Core/DolphinQt2/Config/Graphics/AdvancedWidget.cpp b/Source/Core/DolphinQt2/Config/Graphics/AdvancedWidget.cpp
index 88f566a131..897aa6a8b7 100644
--- a/Source/Core/DolphinQt2/Config/Graphics/AdvancedWidget.cpp
+++ b/Source/Core/DolphinQt2/Config/Graphics/AdvancedWidget.cpp
@@ -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);
@@ -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)
diff --git a/Source/Core/DolphinWX/VideoConfigDiag.cpp b/Source/Core/DolphinWX/VideoConfigDiag.cpp
index 71c02c7ec7..3a0fdc5a5f 100644
--- a/Source/Core/DolphinWX/VideoConfigDiag.cpp
+++ b/Source/Core/DolphinWX/VideoConfigDiag.cpp
@@ -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),
diff --git a/Source/Core/VideoBackends/D3D/main.cpp b/Source/Core/VideoBackends/D3D/main.cpp
index 9597ac7d04..a146a4d25a 100644
--- a/Source/Core/VideoBackends/D3D/main.cpp
+++ b/Source/Core/VideoBackends/D3D/main.cpp
@@ -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;
diff --git a/Source/Core/VideoBackends/Null/NullBackend.cpp b/Source/Core/VideoBackends/Null/NullBackend.cpp
index 1bb8d6248e..d6c9638763 100644
--- a/Source/Core/VideoBackends/Null/NullBackend.cpp
+++ b/Source/Core/VideoBackends/Null/NullBackend.cpp
@@ -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;
diff --git a/Source/Core/VideoBackends/OGL/main.cpp b/Source/Core/VideoBackends/OGL/main.cpp
index 25f8be7f6b..3b07eb96a7 100644
--- a/Source/Core/VideoBackends/OGL/main.cpp
+++ b/Source/Core/VideoBackends/OGL/main.cpp
@@ -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;
diff --git a/Source/Core/VideoBackends/Software/SWmain.cpp b/Source/Core/VideoBackends/Software/SWmain.cpp
index c2bbafb420..57c5096dfa 100644
--- a/Source/Core/VideoBackends/Software/SWmain.cpp
+++ b/Source/Core/VideoBackends/Software/SWmain.cpp
@@ -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;
diff --git a/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp b/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp
index 9d34174e90..5447e7eea3 100644
--- a/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp
+++ b/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp
@@ -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;
diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp
index b0d7c07dd1..4a46475344 100644
--- a/Source/Core/VideoCommon/RenderBase.cpp
+++ b/Source/Core/VideoCommon/RenderBase.cpp
@@ -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))
diff --git a/Source/Core/VideoCommon/VideoConfig.cpp b/Source/Core/VideoCommon/VideoConfig.cpp
index 5e5b313926..6ddf034d19 100644
--- a/Source/Core/VideoCommon/VideoConfig.cpp
+++ b/Source/Core/VideoCommon/VideoConfig.cpp
@@ -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;
diff --git a/Source/Core/VideoCommon/VideoConfig.h b/Source/Core/VideoCommon/VideoConfig.h
index a0085ce809..0167cff5a5 100644
--- a/Source/Core/VideoCommon/VideoConfig.h
+++ b/Source/Core/VideoCommon/VideoConfig.h
@@ -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;