Mesa (main): anv: Claim to be a discrete GPU if has_lmem

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 24 16:52:04 UTC 2021


Module: Mesa
Branch: main
Commit: d31dd812925150adc4e137d5915455ad894eaa0e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d31dd812925150adc4e137d5915455ad894eaa0e

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed Jun 23 15:15:03 2021 -0500

anv: Claim to be a discrete GPU if has_lmem

Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5599>

---

 src/intel/vulkan/anv_device.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 32642892555..82185ede36f 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -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. */
    };



More information about the mesa-commit mailing list