summaryrefslogtreecommitdiff
path: root/src/video_core/vulkan_common
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2022-01-18 18:05:44 +0100
committerGravatar Fernando Sahmkow2022-03-25 03:05:56 +0100
commit9872d4bc4f78fea478e7db4d5a04208cb8a871fa (patch)
treed61944d1a7a5e03b5d00da43a92acee848f7bd4e /src/video_core/vulkan_common
parentGarbage Collection: Final tuning. (diff)
downloadyuzu-9872d4bc4f78fea478e7db4d5a04208cb8a871fa.tar.gz
yuzu-9872d4bc4f78fea478e7db4d5a04208cb8a871fa.tar.xz
yuzu-9872d4bc4f78fea478e7db4d5a04208cb8a871fa.zip
GC: Address Feedback.
Diffstat (limited to 'src/video_core/vulkan_common')
-rw-r--r--src/video_core/vulkan_common/vulkan_device.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp
index dab5b4fe4..e142bee35 100644
--- a/src/video_core/vulkan_common/vulkan_device.cpp
+++ b/src/video_core/vulkan_common/vulkan_device.cpp
@@ -598,10 +598,10 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
598 } 598 }
599 logical = vk::Device::Create(physical, queue_cis, extensions, first_next, dld); 599 logical = vk::Device::Create(physical, queue_cis, extensions, first_next, dld);
600 600
601 is_integrated = (properties.deviceType & VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU) != 0; 601 is_integrated = properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU;
602 is_virtual = (properties.deviceType & VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU) != 0; 602 is_virtual = properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU;
603 is_non_gpu = (properties.deviceType & VK_PHYSICAL_DEVICE_TYPE_OTHER) != 0 || 603 is_non_gpu = properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_OTHER ||
604 (properties.deviceType & VK_PHYSICAL_DEVICE_TYPE_CPU) != 0; 604 properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_CPU;
605 605
606 CollectPhysicalMemoryInfo(); 606 CollectPhysicalMemoryInfo();
607 CollectTelemetryParameters(); 607 CollectTelemetryParameters();
@@ -1298,7 +1298,7 @@ void Device::CollectPhysicalMemoryInfo() {
1298 u64 local_memory = 0; 1298 u64 local_memory = 0;
1299 for (size_t element = 0; element < num_properties; ++element) { 1299 for (size_t element = 0; element < num_properties; ++element) {
1300 const bool is_heap_local = 1300 const bool is_heap_local =
1301 mem_properties.memoryHeaps[element].flags & VK_MEMORY_HEAP_DEVICE_LOCAL_BIT != 0; 1301 (mem_properties.memoryHeaps[element].flags & VK_MEMORY_HEAP_DEVICE_LOCAL_BIT) != 0;
1302 if (!is_integrated && !is_heap_local) { 1302 if (!is_integrated && !is_heap_local) {
1303 continue; 1303 continue;
1304 } 1304 }
@@ -1319,7 +1319,6 @@ void Device::CollectPhysicalMemoryInfo() {
1319 const s64 available_memory = static_cast<s64>(device_access_memory - device_initial_usage); 1319 const s64 available_memory = static_cast<s64>(device_access_memory - device_initial_usage);
1320 device_access_memory = static_cast<u64>(std::max<s64>( 1320 device_access_memory = static_cast<u64>(std::max<s64>(
1321 std::min<s64>(available_memory - 8_GiB, 4_GiB), static_cast<s64>(local_memory))); 1321 std::min<s64>(available_memory - 8_GiB, 4_GiB), static_cast<s64>(local_memory)));
1322 device_initial_usage = 0;
1323} 1322}
1324 1323
1325void Device::CollectToolingInfo() { 1324void Device::CollectToolingInfo() {