Compare commits
4 commits
77c2e2bb20
...
55d5afad33
Author | SHA1 | Date | |
---|---|---|---|
55d5afad33 | |||
3285e60057 | |||
a000d6b13d | |||
725407b989 |
2 changed files with 7 additions and 13 deletions
|
@ -246,10 +246,7 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QObject* parent)
|
||||||
INSERT(Settings,
|
INSERT(Settings,
|
||||||
vram_usage_mode,
|
vram_usage_mode,
|
||||||
tr("VRAM Usage Mode:"),
|
tr("VRAM Usage Mode:"),
|
||||||
tr("Selects whether the emulator should prefer to conserve memory or make maximum usage "
|
tr("Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.\nAggressive mode may severely impact the performance of other applications such as recording software."));
|
||||||
"of available video memory for performance.\nHas no effect on integrated graphics. "
|
|
||||||
"Aggressive mode may severely impact the performance of other applications such as "
|
|
||||||
"recording software."));
|
|
||||||
INSERT(Settings,
|
INSERT(Settings,
|
||||||
skip_cpu_inner_invalidation,
|
skip_cpu_inner_invalidation,
|
||||||
tr("Skip CPU Inner Invalidation"),
|
tr("Skip CPU Inner Invalidation"),
|
||||||
|
|
|
@ -1395,23 +1395,20 @@ void Device::CollectPhysicalMemoryInfo() {
|
||||||
}
|
}
|
||||||
device_access_memory += mem_properties.memoryHeaps[element].size;
|
device_access_memory += mem_properties.memoryHeaps[element].size;
|
||||||
}
|
}
|
||||||
if (!is_integrated) {
|
if (is_integrated) {
|
||||||
|
const s64 available_memory = static_cast<s64>(device_access_memory - device_initial_usage);
|
||||||
|
const u64 memory_size = Settings::values.vram_usage_mode.GetValue() == Settings::VramUsageMode::Aggressive ? 6_GiB : 4_GiB;
|
||||||
|
device_access_memory = static_cast<u64>(std::max<s64>(std::min<s64>(available_memory - 8_GiB, memory_size), std::min<s64>(local_memory, memory_size)));
|
||||||
|
} else {
|
||||||
const u64 reserve_memory = std::min<u64>(device_access_memory / 8, 1_GiB);
|
const u64 reserve_memory = std::min<u64>(device_access_memory / 8, 1_GiB);
|
||||||
device_access_memory -= reserve_memory;
|
device_access_memory -= reserve_memory;
|
||||||
|
|
||||||
if (Settings::values.vram_usage_mode.GetValue() != Settings::VramUsageMode::Aggressive) {
|
if (Settings::values.vram_usage_mode.GetValue() != Settings::VramUsageMode::Aggressive) {
|
||||||
// Account for resolution scaling in memory limits
|
// Account for resolution scaling in memory limits
|
||||||
const size_t normal_memory = 6_GiB;
|
const size_t normal_memory = 6_GiB;
|
||||||
const size_t scaler_memory = 1_GiB * Settings::values.resolution_info.ScaleUp(1);
|
const size_t scaler_memory = 1_GiB * Settings::values.resolution_info.ScaleUp(1);
|
||||||
device_access_memory =
|
device_access_memory = std::min<u64>(device_access_memory, normal_memory + scaler_memory);
|
||||||
std::min<u64>(device_access_memory, normal_memory + scaler_memory);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
const s64 available_memory = static_cast<s64>(device_access_memory - device_initial_usage);
|
|
||||||
device_access_memory = static_cast<u64>(std::max<s64>(
|
|
||||||
std::min<s64>(available_memory - 8_GiB, 6_GiB), std::min<s64>(local_memory, 6_GiB)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Device::CollectToolingInfo() {
|
void Device::CollectToolingInfo() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue