Add a setting (in developer tools) to control texture replacement load speed

This commit is contained in:
Henrik Rydgård committed 2025-04-22 20:57:32 +02:00
1 parent b7dae29865
commit f3127346d4
5 files changed
+31 -1

No files matched your search

+18 -1
View File
@@ -133,8 +133,25 @@ void TextureCacheCommon::StartFrame() {
if (fps <= 5.0f) {
fps = 60.0f;
}
float baseValue = 0.5f;
switch (g_Config.iReplacementTextureLoadSpeed) {
case (int)ReplacementTextureLoadSpeed::SLOW:
baseValue = 0.5f;
break;
case (int)ReplacementTextureLoadSpeed::MEDIUM:
baseValue = 0.75f;
break;
case (int)ReplacementTextureLoadSpeed::FAST:
baseValue = 1.0f;
break;
case (int)ReplacementTextureLoadSpeed::INSTANT:
baseValue = 100000.0f; // no budget limit, effectively.
break;
}
// Allow spending half a frame on uploading textures.
replacementFrameBudgetSeconds_ = 0.5f / fps;
replacementFrameBudgetSeconds_ = baseValue / fps;
if ((DebugOverlay)g_Config.iDebugOverlay == DebugOverlay::DEBUG_STATS) {
gpuStats.numReplacerTrackedTex = replacer_.GetNumTrackedTextures();