summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authoriwubcode <iwubcode@users.noreply.github.com>2023-07-19 23:44:41 -0500
committeriwubcode <iwubcode@users.noreply.github.com>2023-07-19 23:44:41 -0500
commitf7e78742cf2c1d5dae1f0158422384a71b32fc3d (patch)
tree6465627b293fb114fbd0d9e9745cc6126b62649e /Source/Core/VideoCommon
parent2764978bebce9cedf0e329c320951ff0508f7139 (diff)
VideoCommon: skip the texture dump if the texture is using a custom texture, regardless of whether or not it is loaded yet
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.cpp13
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.h2
2 files changed, 9 insertions, 6 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp
index 2fd0a4b284..37dadba967 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/TextureCacheBase.cpp
@@ -1607,6 +1607,7 @@ RcTcacheEntry TextureCacheBase::GetTexture(const int textureCacheSafetyColorSamp
std::vector<VideoCommon::CachedAsset<VideoCommon::GameTextureAsset>> cached_game_assets;
std::vector<std::shared_ptr<VideoCommon::CustomTextureData>> data_for_assets;
bool has_arbitrary_mipmaps = false;
+ bool skip_texture_dump = false;
std::shared_ptr<HiresTexture> hires_texture;
if (g_ActiveConfig.bHiresTextures)
{
@@ -1618,6 +1619,7 @@ RcTcacheEntry TextureCacheBase::GetTexture(const int textureCacheSafetyColorSamp
cached_game_assets.push_back(
VideoCommon::CachedAsset<VideoCommon::GameTextureAsset>{std::move(asset), loaded_time});
has_arbitrary_mipmaps = hires_texture->HasArbitraryMipmaps();
+ skip_texture_dump = true;
}
}
@@ -1666,9 +1668,10 @@ RcTcacheEntry TextureCacheBase::GetTexture(const int textureCacheSafetyColorSamp
}
}
- auto entry = CreateTextureEntry(
- TextureCreationInfo{base_hash, full_hash, bytes_per_block, palette_size}, texture_info,
- textureCacheSafetyColorSampleSize, std::move(data_for_assets), has_arbitrary_mipmaps);
+ auto entry =
+ CreateTextureEntry(TextureCreationInfo{base_hash, full_hash, bytes_per_block, palette_size},
+ texture_info, textureCacheSafetyColorSampleSize,
+ std::move(data_for_assets), has_arbitrary_mipmaps, skip_texture_dump);
entry->linked_game_texture_assets = std::move(cached_game_assets);
entry->linked_asset_dependencies = std::move(additional_dependencies);
entry->texture_info_name = std::move(texture_name);
@@ -1679,7 +1682,7 @@ RcTcacheEntry TextureCacheBase::CreateTextureEntry(
const TextureCreationInfo& creation_info, const TextureInfo& texture_info,
const int safety_color_sample_size,
std::vector<std::shared_ptr<VideoCommon::CustomTextureData>> assets_data,
- const bool custom_arbitrary_mipmaps)
+ const bool custom_arbitrary_mipmaps, bool skip_texture_dump)
{
#ifdef __APPLE__
const bool no_mips = g_ActiveConfig.bNoMipmapping;
@@ -1828,7 +1831,7 @@ RcTcacheEntry TextureCacheBase::CreateTextureEntry(
entry->has_arbitrary_mips = arbitrary_mip_detector.HasArbitraryMipmaps(dst_buffer);
- if (g_ActiveConfig.bDumpTextures)
+ if (g_ActiveConfig.bDumpTextures && !skip_texture_dump)
{
const std::string basename = texture_info.CalculateTextureName().GetFullName();
for (u32 level = 0; level < texLevels; ++level)
diff --git a/Source/Core/VideoCommon/TextureCacheBase.h b/Source/Core/VideoCommon/TextureCacheBase.h
index 65b0d2b469..3592535a65 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.h
+++ b/Source/Core/VideoCommon/TextureCacheBase.h
@@ -351,7 +351,7 @@ private:
CreateTextureEntry(const TextureCreationInfo& creation_info, const TextureInfo& texture_info,
int safety_color_sample_size,
std::vector<std::shared_ptr<VideoCommon::CustomTextureData>> assets_data,
- bool custom_arbitrary_mipmaps);
+ bool custom_arbitrary_mipmaps, bool skip_texture_dump);
RcTcacheEntry GetXFBFromCache(u32 address, u32 width, u32 height, u32 stride);