radv: expose integrated device type for APUs.
authorDave Airlie <airlied@redhat.com>
Mon, 15 May 2017 01:27:10 +0000 (11:27 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 6 Jun 2017 02:48:57 +0000 (12:48 +1000)
This just sets the vulkan device type depending on whether
this is an APU or GPU.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
src/amd/vulkan/radv_device.c

index ad4005ba61deef27f53410b3961ad914ef981966..887916f558f27a11e6c68af153717874b02e2073 100644 (file)
@@ -734,7 +734,7 @@ void radv_GetPhysicalDeviceProperties(
                .driverVersion = radv_get_driver_version(),
                .vendorID = 0x1002,
                .deviceID = pdevice->rad_info.pci_id,
-               .deviceType = VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU,
+               .deviceType = pdevice->rad_info.has_dedicated_vram ? VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU : VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU,
                .limits = limits,
                .sparseProperties = {0},
        };