MCPcopy Create free account
hub / github.com/defold/defold / VulkanPrintDeviceInfo

Function VulkanPrintDeviceInfo

engine/graphics/src/vulkan/graphics_vulkan.cpp:147–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145 }
146
147 static void VulkanPrintDeviceInfo(HContext _context)
148 {
149 VulkanContext* context = (VulkanContext*) _context;
150 const VkPhysicalDeviceProperties& properties = context->m_PhysicalDevice.m_Properties;
151
152 dmLogInfo("Device: Vulkan %u.%u.%u %s",
153 VK_VERSION_MAJOR(properties.apiVersion),
154 VK_VERSION_MINOR(properties.apiVersion),
155 VK_VERSION_PATCH(properties.apiVersion),
156 properties.deviceName);
157 dmLogInfo("Device ID: 0x%04x Type: %s", properties.deviceID, VkPhysicalDeviceTypeToStr(properties.deviceType));
158 dmLogInfo("Vendor: %s (0x%04x) driver version: 0x%08x", VkVendorIdToStr(properties.vendorID), properties.vendorID, properties.driverVersion);
159 dmLogInfo("Device extensions (%u):", context->m_PhysicalDevice.m_DeviceExtensionCount);
160 for (uint32_t i = 0; i < context->m_PhysicalDevice.m_DeviceExtensionCount; ++i)
161 {
162 const VkExtensionProperties& extension = context->m_PhysicalDevice.m_DeviceExtensions[i];
163 dmLogInfo(" %s (spec version %u)", extension.extensionName, extension.specVersion);
164 }
165 }
166
167 VulkanContext::VulkanContext(const ContextParams& params, const VkInstance vk_instance)
168 {

Callers 1

SetupVulkanAdapterInfoFunction · 0.85

Calls 2

VkVendorIdToStrFunction · 0.85

Tested by

no test coverage detected