mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-03-22 17:46:08 -04:00
Merge pull request 'Fix: Resolve linker errors and improve type safety in cache GC' (#112) from fix/compiler into main
Reviewed-on: https://git.citron-emu.org/Citron/Emulator/pulls/112
This commit is contained in:
@@ -364,3 +364,9 @@ void SetConfiguringGlobal(bool is_global) {
|
||||
}
|
||||
|
||||
} // namespace Settings
|
||||
|
||||
#include "common/settings_setting.h"
|
||||
#include "common/settings_enums.h"
|
||||
|
||||
// generate the vtable for the linker
|
||||
template class Settings::SwitchableSetting<Settings::GCAggressiveness, true>;
|
||||
|
||||
@@ -114,7 +114,7 @@ void BufferCache<P>::RunGarbageCollector() {
|
||||
base_iterations = 32;
|
||||
break;
|
||||
case Settings::GCAggressiveness::Heavy:
|
||||
base_ticks = std::max(1ULL, eviction_frames / 2);
|
||||
base_ticks = std::max(1ULL, static_cast<unsigned long long>(eviction_frames / 2));
|
||||
base_iterations = 64;
|
||||
break;
|
||||
case Settings::GCAggressiveness::Extreme:
|
||||
@@ -134,7 +134,7 @@ void BufferCache<P>::RunGarbageCollector() {
|
||||
LOG_WARNING(Render_Vulkan, "Buffer cache emergency GC: usage={}MB, limit={}MB",
|
||||
total_used_memory / 1_MiB, vram_limit_bytes / 1_MiB);
|
||||
} else if (aggressive_gc) {
|
||||
ticks_to_destroy = std::max(1ULL, base_ticks / 2);
|
||||
ticks_to_destroy = std::max(1ULL, static_cast<unsigned long long>(base_ticks / 2));
|
||||
num_iterations = base_iterations * 2;
|
||||
} else {
|
||||
ticks_to_destroy = base_ticks;
|
||||
|
||||
@@ -156,7 +156,7 @@ void TextureCache<P>::RunGarbageCollector() {
|
||||
base_iterations = 10;
|
||||
break;
|
||||
case Settings::GCAggressiveness::Heavy:
|
||||
base_ticks = std::max(1ULL, eviction_frames / 2);
|
||||
base_ticks = std::max(1ULL, static_cast<unsigned long long>(eviction_frames / 2));
|
||||
base_iterations = 20;
|
||||
break;
|
||||
case Settings::GCAggressiveness::Extreme:
|
||||
@@ -171,7 +171,7 @@ void TextureCache<P>::RunGarbageCollector() {
|
||||
ticks_to_destroy = 1;
|
||||
num_iterations = base_iterations * 4;
|
||||
} else if (aggressive_mode) {
|
||||
ticks_to_destroy = std::max(1ULL, base_ticks / 2);
|
||||
ticks_to_destroy = std::max(1ULL, static_cast<unsigned long long>(base_ticks / 2));
|
||||
num_iterations = base_iterations * 2;
|
||||
} else if (high_priority_mode) {
|
||||
ticks_to_destroy = base_ticks;
|
||||
|
||||
Reference in New Issue
Block a user