summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/ShaderCache.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-11-13 22:33:26 -0500
committerLioncash <mathew1800@gmail.com>2020-11-17 21:23:58 -0500
commit3d9b2aa0055ded7ee74f6e4a73ff54acecf313a9 (patch)
tree0ff92a960d77b6bc8b92bed1c7d61f79206887dc /Source/Core/VideoCommon/ShaderCache.cpp
parent8a621c2d5e7722de5148a0a40d4072445cffb361 (diff)
VideoCommon: Migrate over to fmt
Migrates off the printf-based formatting where applicable.
Diffstat (limited to 'Source/Core/VideoCommon/ShaderCache.cpp')
-rw-r--r--Source/Core/VideoCommon/ShaderCache.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/Core/VideoCommon/ShaderCache.cpp b/Source/Core/VideoCommon/ShaderCache.cpp
index e148918ddb..f8b4b881f0 100644
--- a/Source/Core/VideoCommon/ShaderCache.cpp
+++ b/Source/Core/VideoCommon/ShaderCache.cpp
@@ -76,7 +76,7 @@ void ShaderCache::Reload()
ClearCaches();
if (!CompileSharedPipelines())
- PanicAlert("Failed to compile shared pipelines after reload.");
+ PanicAlertFmt("Failed to compile shared pipelines after reload.");
if (g_ActiveConfig.bShaderCache)
LoadCaches();
@@ -249,7 +249,7 @@ void ShaderCache::LoadShaderCache(T& cache, APIType api_type, const char* type,
std::string filename = GetDiskShaderCacheFileName(api_type, type, include_gameid, true);
CacheReader reader(cache);
u32 count = cache.disk_cache.OpenAndRead(filename, reader);
- INFO_LOG(VIDEO, "Loaded %u cached shaders from %s", count, filename.c_str());
+ INFO_LOG_FMT(VIDEO, "Loaded {} cached shaders from {}", count, filename);
}
template <typename T>
@@ -303,8 +303,8 @@ void ShaderCache::LoadPipelineCache(T& cache, LinearDiskCache<DiskKeyType, u8>&
std::string filename = GetDiskShaderCacheFileName(api_type, type, include_gameid, true);
CacheReader reader(this, cache);
- u32 count = disk_cache.OpenAndRead(filename, reader);
- INFO_LOG(VIDEO, "Loaded %u cached pipelines from %s", count, filename.c_str());
+ const u32 count = disk_cache.OpenAndRead(filename, reader);
+ INFO_LOG_FMT(VIDEO, "Loaded {} cached pipelines from {}", count, filename);
// If any of the pipelines in the cache failed to create, it's likely because of a change of
// driver version, or system configuration. In this case, when the UID cache picks up the pipeline
@@ -312,8 +312,8 @@ void ShaderCache::LoadPipelineCache(T& cache, LinearDiskCache<DiskKeyType, u8>&
// the old cache data around, so discard and recreate the disk cache.
if (reader.AnyFailed())
{
- WARN_LOG(VIDEO, "Failed to load one or more pipelines from cache '%s'. Discarding.",
- filename.c_str());
+ WARN_LOG_FMT(VIDEO, "Failed to load one or more pipelines from cache '{}'. Discarding.",
+ filename);
disk_cache.Close();
File::Delete(filename);
disk_cache.OpenAndRead(filename, reader);
@@ -586,7 +586,8 @@ AbstractPipelineConfig ShaderCache::GetGXPipelineConfig(
if (config.blending_state.logicopenable && !g_ActiveConfig.backend_info.bSupportsLogicOp)
{
- WARN_LOG(VIDEO, "Approximating logic op with blending, this will produce incorrect rendering.");
+ WARN_LOG_FMT(VIDEO,
+ "Approximating logic op with blending, this will produce incorrect rendering.");
config.blending_state.ApproximateLogicOpWithBlending();
}
@@ -791,8 +792,7 @@ void ShaderCache::LoadPipelineUIDCache()
}
}
- INFO_LOG(VIDEO, "Read %u pipeline UIDs from %s",
- static_cast<unsigned>(m_gx_pipeline_cache.size()), filename.c_str());
+ INFO_LOG_FMT(VIDEO, "Read {} pipeline UIDs from {}", m_gx_pipeline_cache.size(), filename);
}
void ShaderCache::ClosePipelineUIDCache()
@@ -824,7 +824,7 @@ void ShaderCache::AppendGXPipelineUID(const GXPipelineUid& config)
SerializePipelineUid(config, disk_uid);
if (!m_gx_pipeline_uid_cache_file.WriteBytes(&disk_uid, sizeof(disk_uid)))
{
- WARN_LOG(VIDEO, "Writing pipeline UID to cache failed, closing file.");
+ WARN_LOG_FMT(VIDEO, "Writing pipeline UID to cache failed, closing file.");
m_gx_pipeline_uid_cache_file.Close();
}
}