PR2
This commit is contained in:
@@ -93,7 +93,7 @@ bool IsGPULevelHigh() {
|
||||
}
|
||||
|
||||
bool UseGarbageCollect() {
|
||||
return !values.use_garbage_collect.GetValue();
|
||||
return values.use_garbage_collect.GetValue();
|
||||
}
|
||||
|
||||
std::chrono::minutes GarbageCollectTimer() {
|
||||
|
||||
@@ -154,7 +154,7 @@ struct System::Impl {
|
||||
}
|
||||
|
||||
ResultStatus Init(System& system, Frontend::EmuWindow& emu_window) {
|
||||
LOG_DEBUG(Core, "Initializing...");
|
||||
LOG_DEBUG(Core, "initialized OK");
|
||||
|
||||
device_memory = std::make_unique<Core::DeviceMemory>();
|
||||
|
||||
|
||||
@@ -375,7 +375,7 @@ private:
|
||||
u64 modification_tick = 0;
|
||||
u64 frame_tick = 0;
|
||||
|
||||
const bool GC_DISABLED;
|
||||
const bool GC_ENABLED;
|
||||
/// Time between checking for expired images
|
||||
const std::chrono::minutes GC_EXPIRATION_TIME;
|
||||
|
||||
@@ -396,7 +396,7 @@ TextureCache<P>::TextureCache(Runtime& runtime_, VideoCore::RasterizerInterface&
|
||||
Tegra::MemoryManager& gpu_memory_)
|
||||
: runtime{runtime_}, rasterizer{rasterizer_}, maxwell3d{maxwell3d_},
|
||||
kepler_compute{kepler_compute_}, gpu_memory{gpu_memory_},
|
||||
GC_DISABLED{Settings::UseGarbageCollect()},
|
||||
GC_ENABLED{Settings::UseGarbageCollect()},
|
||||
GC_EXPIRATION_TIME{Settings::GarbageCollectTimer()}, GC_TIMER{Clock::now()},
|
||||
GC_FRAMEBUFF_TIMER{GC_TIMER}, current_time{GC_TIMER} {
|
||||
// Configure null sampler
|
||||
@@ -1560,7 +1560,7 @@ bool TextureCache<P>::IsFullClear(ImageViewId id) {
|
||||
|
||||
template <class P>
|
||||
void TextureCache<P>::TickGC() {
|
||||
if (GC_DISABLED || current_time - GC_TIMER < GC_TICK_TIME) {
|
||||
if (!GC_ENABLED || current_time - GC_TIMER < GC_TICK_TIME) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1632,7 +1632,7 @@ void TextureCache<P>::TickGC() {
|
||||
|
||||
template <class P>
|
||||
void TextureCache<P>::UpdateFramebufferReferences() {
|
||||
if (GC_DISABLED || current_time - GC_FRAMEBUFF_TIMER < GC_EXPIRATION_TIME / 2) {
|
||||
if (!GC_ENABLED || current_time - GC_FRAMEBUFF_TIMER < GC_EXPIRATION_TIME / 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ void MemoryCommit::Release() {
|
||||
|
||||
MemoryAllocator::MemoryAllocator(const Device& device_, bool export_allocations_)
|
||||
: device{device_}, properties{device_.GetPhysical().GetMemoryProperties()},
|
||||
export_allocations{export_allocations_}, GC_DISABLED{Settings::UseGarbageCollect()},
|
||||
export_allocations{export_allocations_}, GC_ENABLED{Settings::UseGarbageCollect()},
|
||||
GC_EXPIRATION_TIME{Settings::GarbageCollectTimer()}, GC_TIMER{Clock::now()} {}
|
||||
|
||||
MemoryAllocator::~MemoryAllocator() = default;
|
||||
@@ -348,7 +348,7 @@ std::optional<u32> MemoryAllocator::FindType(VkMemoryPropertyFlags flags, u32 ty
|
||||
|
||||
void MemoryAllocator::TickFrame() {
|
||||
const auto now{Clock::now()};
|
||||
if (GC_DISABLED || now - GC_TIMER < GC_TICK_TIME) {
|
||||
if (!GC_ENABLED || now - GC_TIMER < GC_TICK_TIME) {
|
||||
return;
|
||||
}
|
||||
for (s64 x = static_cast<s64>(allocations.size() - 1); x > 0; --x) {
|
||||
|
||||
@@ -129,7 +129,7 @@ private:
|
||||
const bool export_allocations; ///< True when memory allocations have to be exported.
|
||||
std::vector<std::unique_ptr<MemoryAllocation>> allocations; ///< Current allocations.
|
||||
|
||||
const bool GC_DISABLED;
|
||||
const bool GC_ENABLED;
|
||||
/// Time since last commit was made that allocations are removed
|
||||
const std::chrono::minutes GC_EXPIRATION_TIME;
|
||||
std::chrono::time_point<std::chrono::steady_clock> GC_TIMER;
|
||||
|
||||
@@ -65,7 +65,7 @@ void ConfigureGeneral::ApplyConfiguration() {
|
||||
Settings::values.frame_limit.SetValue(ui->frame_limit->value());
|
||||
}
|
||||
} else {
|
||||
const bool global_frame_limit = use_frame_limit == ConfigurationShared::CheckState::Global;
|
||||
bool global_frame_limit = use_frame_limit == ConfigurationShared::CheckState::Global;
|
||||
Settings::values.use_frame_limit.SetGlobal(global_frame_limit);
|
||||
Settings::values.frame_limit.SetGlobal(global_frame_limit);
|
||||
if (!global_frame_limit) {
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
<string>Enable periodic removal of textures from memory, reducing VRAM usage. Lower settings work more often, lowering VRAM usage but potentially causes hitching. Set to a shorter duration if you experience out of memory crashes.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Garbage Collect:</string>
|
||||
<string>Garbage Collector:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user