diff options
| author | iwubcode <iwubcode@users.noreply.github.com> | 2020-05-04 23:07:06 -0500 |
|---|---|---|
| committer | iwubcode <iwubcode@users.noreply.github.com> | 2020-07-22 19:30:27 -0500 |
| commit | 9c8338ec4cf6f76b123d95adbbfb48bd468ee7df (patch) | |
| tree | 501f89f28fe89c24c2d6054afb569fedf0fc88dd /Source/Core/VideoCommon | |
| parent | d7a91316da54267aca6f6569d30aec9c28a01bf4 (diff) | |
DolphinQt / VideoCommon: Add additional texture dumping options. Specifically, this enables users to choose whether to dump mip maps, base level textures, or both.
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/TextureCacheBase.cpp | 7 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/VideoConfig.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/VideoConfig.h | 2 |
3 files changed, 11 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 5a298273d3..fdf3c0e6b3 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -920,8 +920,15 @@ void TextureCacheBase::DumpTexture(TCacheEntry* entry, std::string basename, uns if (level > 0) { + if (!g_ActiveConfig.bDumpMipmapTextures) + return; basename += fmt::format("_mip{}", level); } + else + { + if (!g_ActiveConfig.bDumpBaseTextures) + return; + } const std::string filename = fmt::format("{}/{}.png", szDir, basename); if (File::Exists(filename)) diff --git a/Source/Core/VideoCommon/VideoConfig.cpp b/Source/Core/VideoCommon/VideoConfig.cpp index 1514f22db8..b0ab912e6c 100644 --- a/Source/Core/VideoCommon/VideoConfig.cpp +++ b/Source/Core/VideoCommon/VideoConfig.cpp @@ -85,6 +85,8 @@ void VideoConfig::Refresh() bOverlayStats = Config::Get(Config::GFX_OVERLAY_STATS); bOverlayProjStats = Config::Get(Config::GFX_OVERLAY_PROJ_STATS); bDumpTextures = Config::Get(Config::GFX_DUMP_TEXTURES); + bDumpMipmapTextures = Config::Get(Config::GFX_DUMP_MIP_TEXTURES); + bDumpBaseTextures = Config::Get(Config::GFX_DUMP_BASE_TEXTURES); bHiresTextures = Config::Get(Config::GFX_HIRES_TEXTURES); bCacheHiresTextures = Config::Get(Config::GFX_CACHE_HIRES_TEXTURES); bDumpEFBTarget = Config::Get(Config::GFX_DUMP_EFB_TARGET); diff --git a/Source/Core/VideoCommon/VideoConfig.h b/Source/Core/VideoCommon/VideoConfig.h index ee0951180a..dacb286ada 100644 --- a/Source/Core/VideoCommon/VideoConfig.h +++ b/Source/Core/VideoCommon/VideoConfig.h @@ -102,6 +102,8 @@ struct VideoConfig final // Utility bool bDumpTextures; + bool bDumpMipmapTextures; + bool bDumpBaseTextures; bool bHiresTextures; bool bCacheHiresTextures; bool bDumpEFBTarget; |
