From 84ad92348207650194a10cb59706f7b830ab9b9c Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Mon, 4 Apr 2022 13:25:48 +0200 Subject: [PATCH] dzn: Get rid of dzn_GetPhysicalDeviceProperties() Rely on the vk_common_ wrapper. Reviewed-by: Erik Faye-Lund Part-of: --- src/microsoft/vulkan/dzn_device.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/src/microsoft/vulkan/dzn_device.cpp b/src/microsoft/vulkan/dzn_device.cpp index 7312469..03c4195 100644 --- a/src/microsoft/vulkan/dzn_device.cpp +++ b/src/microsoft/vulkan/dzn_device.cpp @@ -1143,8 +1143,8 @@ vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t* pSupportedVersion) } VKAPI_ATTR void VKAPI_CALL -dzn_GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, - VkPhysicalDeviceProperties *pProperties) +dzn_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceProperties2 *pProperties) { VK_FROM_HANDLE(dzn_physical_device, pdevice, physicalDevice); @@ -1281,7 +1281,7 @@ dzn_GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, devtype = VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU; } - *pProperties = VkPhysicalDeviceProperties { + pProperties->properties = VkPhysicalDeviceProperties { .apiVersion = DZN_API_VERSION, .driverVersion = vk_get_driver_version(), @@ -1293,20 +1293,12 @@ dzn_GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, .sparseProperties = { 0 }, }; - snprintf(pProperties->deviceName, sizeof(pProperties->deviceName), + snprintf(pProperties->properties.deviceName, + sizeof(pProperties->properties.deviceName), "Microsoft Direct3D12 (%S)", desc.Description); - memcpy(pProperties->pipelineCacheUUID, + memcpy(pProperties->properties.pipelineCacheUUID, pdevice->pipeline_cache_uuid, VK_UUID_SIZE); -} - -VKAPI_ATTR void VKAPI_CALL -dzn_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, - VkPhysicalDeviceProperties2 *pProperties) -{ - VK_FROM_HANDLE(dzn_physical_device, pdevice, physicalDevice); - - dzn_GetPhysicalDeviceProperties(physicalDevice, &pProperties->properties); vk_foreach_struct(ext, pProperties->pNext) { switch (ext->sType) { -- 2.7.4