[PATCH] winevulkan: Trace properties for created devices.

Józef Kucia jkucia at codeweavers.com
Tue Aug 28 03:27:12 CDT 2018


Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
 dlls/winevulkan/vulkan.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c
index a1e970daff85..89df838f0499 100644
--- a/dlls/winevulkan/vulkan.c
+++ b/dlls/winevulkan/vulkan.c
@@ -60,6 +60,9 @@ static void *wine_vk_get_global_proc_addr(const char *name);
 static const struct vulkan_funcs *vk_funcs;
 static VkResult (*p_vkEnumerateInstanceVersion)(uint32_t *version);
 
+void WINAPI wine_vkGetPhysicalDeviceProperties(VkPhysicalDevice physical_device,
+        VkPhysicalDeviceProperties *properties);
+
 static void wine_vk_physical_device_free(struct VkPhysicalDevice_T *phys_dev)
 {
     if (!phys_dev)
@@ -600,6 +603,17 @@ VkResult WINAPI wine_vkCreateDevice(VkPhysicalDevice phys_dev,
     if (allocator)
         FIXME("Support for allocation callbacks not implemented yet\n");
 
+    if (TRACE_ON(vulkan))
+    {
+        VkPhysicalDeviceProperties properties;
+
+        wine_vkGetPhysicalDeviceProperties(phys_dev, &properties);
+
+        TRACE("Device name: %s.\n", debugstr_a(properties.deviceName));
+        TRACE("Vendor ID: %#x, Device ID: %#x.\n", properties.vendorID, properties.deviceID);
+        TRACE("Driver version: %#x.\n", properties.driverVersion);
+    }
+
     if (!(object = heap_alloc_zero(sizeof(*object))))
         return VK_ERROR_OUT_OF_HOST_MEMORY;
 
-- 
2.16.4




More information about the wine-devel mailing list