From 8e85ea6f7ab5ef935af64b15c709170f931a8e1c Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Thu, 20 Jul 2023 11:45:40 -0500 Subject: [PATCH] nvk: Set deviceType based on nv_device_info::type The is_integrated bool is based on VRAM size which is a bit clunky and not really what the Vulkan query means. Part-of: --- src/nouveau/vulkan/nvk_physical_device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/nouveau/vulkan/nvk_physical_device.c b/src/nouveau/vulkan/nvk_physical_device.c index 3517a4590b1..2a6c5fdd9de 100644 --- a/src/nouveau/vulkan/nvk_physical_device.c +++ b/src/nouveau/vulkan/nvk_physical_device.c @@ -42,8 +42,9 @@ nvk_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, .driverVersion = vk_get_driver_version(), .vendorID = pdev->dev->vendor_id, .deviceID = pdev->dev->device_id, - .deviceType = pdev->dev->is_integrated ? VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU - : VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, + .deviceType = pdev->info.type == NV_DEVICE_TYPE_DIS ? + VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU : + VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU, .limits = (VkPhysicalDeviceLimits) { .maxImageArrayLayers = 2048, .maxImageDimension1D = pdev->dev->chipset >= 0x130 ? 0x8000 : 0x4000,