From 0ea35a6b670cb8455cd89ce9bfbe44f709356d31 Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Wed, 14 Aug 2024 16:42:47 +0100 Subject: [PATCH] Print out Vulkan information at startup Change-Id: I11036b5dfb9abdb72550737a36c80f3d1e861b25 --- dali/graphics/vulkan/vulkan-graphics.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/dali/graphics/vulkan/vulkan-graphics.cpp b/dali/graphics/vulkan/vulkan-graphics.cpp index 636ff3c1f..034f4baef 100644 --- a/dali/graphics/vulkan/vulkan-graphics.cpp +++ b/dali/graphics/vulkan/vulkan-graphics.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,9 @@ // CLASS HEADER #include +// EXTERNAL INCLUDES +#include + // INTERNAL INCLUDES #include #include @@ -1541,6 +1544,20 @@ void Graphics::PreparePhysicalDevice() GetPhysicalDeviceProperties(); GetQueueFamilyProperties(); + + // We want to display this information all the time, so use the LogMessage directly + Integration::Log::LogMessage(Integration::Log::DebugInfo, + "Vulkan Information\n" + " Device Name: %s\n" + " API Version: %x\n" + " Vulkan Version: %d.%d.%d\n" + " Driver Version: %x\n", + &mPhysicalDeviceProperties.deviceName[0], + mPhysicalDeviceProperties.apiVersion, + VK_VERSION_MAJOR(mPhysicalDeviceProperties.apiVersion), + VK_VERSION_MINOR(mPhysicalDeviceProperties.apiVersion), + VK_VERSION_PATCH(mPhysicalDeviceProperties.apiVersion), + mPhysicalDeviceProperties.driverVersion); } void Graphics::GetPhysicalDeviceProperties() -- 2.34.1