anv: Claim to be a discrete GPU if has_lmem
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 23 Jun 2021 20:15:03 +0000 (15:15 -0500)
committerMarge Bot <eric+marge@anholt.net>
Thu, 24 Jun 2021 16:14:38 +0000 (16:14 +0000)
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5599>

src/intel/vulkan/anv_device.c

index 3264289..82185ed 100644 (file)
@@ -2007,7 +2007,9 @@ void anv_GetPhysicalDeviceProperties(
       .driverVersion = vk_get_driver_version(),
       .vendorID = 0x8086,
       .deviceID = pdevice->info.chipset_id,
-      .deviceType = VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU,
+      .deviceType = pdevice->info.has_local_mem ?
+                    VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU :
+                    VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU,
       .limits = limits,
       .sparseProperties = {0}, /* Broadwell doesn't do sparse. */
    };