From 9872d4bc4f78fea478e7db4d5a04208cb8a871fa Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Tue, 18 Jan 2022 18:05:44 +0100 Subject: GC: Address Feedback. --- src/video_core/vulkan_common/vulkan_device.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/video_core/vulkan_common/vulkan_device.cpp') 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 } logical = vk::Device::Create(physical, queue_cis, extensions, first_next, dld); - is_integrated = (properties.deviceType & VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU) != 0; - is_virtual = (properties.deviceType & VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU) != 0; - is_non_gpu = (properties.deviceType & VK_PHYSICAL_DEVICE_TYPE_OTHER) != 0 || - (properties.deviceType & VK_PHYSICAL_DEVICE_TYPE_CPU) != 0; + is_integrated = properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU; + is_virtual = properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU; + is_non_gpu = properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_OTHER || + properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_CPU; CollectPhysicalMemoryInfo(); CollectTelemetryParameters(); @@ -1298,7 +1298,7 @@ void Device::CollectPhysicalMemoryInfo() { u64 local_memory = 0; for (size_t element = 0; element < num_properties; ++element) { const bool is_heap_local = - mem_properties.memoryHeaps[element].flags & VK_MEMORY_HEAP_DEVICE_LOCAL_BIT != 0; + (mem_properties.memoryHeaps[element].flags & VK_MEMORY_HEAP_DEVICE_LOCAL_BIT) != 0; if (!is_integrated && !is_heap_local) { continue; } @@ -1319,7 +1319,6 @@ void Device::CollectPhysicalMemoryInfo() { const s64 available_memory = static_cast(device_access_memory - device_initial_usage); device_access_memory = static_cast(std::max( std::min(available_memory - 8_GiB, 4_GiB), static_cast(local_memory))); - device_initial_usage = 0; } void Device::CollectToolingInfo() { -- cgit v1.2.3