Browse Source

Pure and simply meow

unified-memory-access
CamilleLaVey 4 weeks ago
parent
commit
10a75d80eb
  1. 6
      src/video_core/vulkan_common/vulkan_device.cpp

6
src/video_core/vulkan_common/vulkan_device.cpp

@ -1633,11 +1633,7 @@ u64 Device::GetDeviceMemoryUsage() const {
for (const size_t heap : valid_heap_memory) { for (const size_t heap : valid_heap_memory) {
result += budget.heapUsage[heap]; result += budget.heapUsage[heap];
} }
const u64 committed_backing = Common::GetCommittedBackingSize();
if (result <= committed_backing) {
return result; return result;
}
return result - committed_backing;
} }
void Device::CollectPhysicalMemoryInfo() { void Device::CollectPhysicalMemoryInfo() {
@ -1688,7 +1684,6 @@ void Device::CollectPhysicalMemoryInfo() {
LOG_INFO(Render_Vulkan, "Discounting {} MiB of guest memory committed by the host", LOG_INFO(Render_Vulkan, "Discounting {} MiB of guest memory committed by the host",
committed_backing >> 20); committed_backing >> 20);
local_memory -= (std::min)(local_memory, committed_backing); local_memory -= (std::min)(local_memory, committed_backing);
device_access_memory -= (std::min)(device_access_memory, committed_backing);
} }
if (is_integrated) { if (is_integrated) {
const s64 available_memory = static_cast<s64>(device_access_memory - device_initial_usage); const s64 available_memory = static_cast<s64>(device_access_memory - device_initial_usage);
@ -1704,6 +1699,7 @@ void Device::CollectPhysicalMemoryInfo() {
device_access_memory = std::min<u64>(device_access_memory, normal_memory + scaler_memory); device_access_memory = std::min<u64>(device_access_memory, normal_memory + scaler_memory);
} }
} }
device_access_memory -= (std::min)(device_access_memory, committed_backing);
} }
void Device::CollectToolingInfo() { void Device::CollectToolingInfo() {

Loading…
Cancel
Save