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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
Faith Ekstrand 2023-07-20 11:45:40 -05:00 committed by Marge Bot
parent 56ccada087
commit 8e85ea6f7a

View file

@ -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,