1// Copyright 2018-2022 The Khronos Group Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5include::{generated}/meta/{refprefix}VK_EXT_tooling_info.adoc[] 6 7=== Other Extension Metadata 8 9*Last Modified Date*:: 10 2018-11-05 11*Interactions and External Dependencies*:: 12 - Promoted to Vulkan 1.3 Core 13*Contributors*:: 14 - Rolando Caloca 15 - Matthaeus Chajdas 16 - Baldur Karlsson 17 - Daniel Rakos 18 19=== Description 20 21When an error occurs during application development, a common question is 22"What tools are actually running right now?" This extension adds the ability 23to query that information directly from the Vulkan implementation. 24 25Outdated versions of one tool might not play nicely with another, or perhaps 26a tool is not actually running when it should have been. 27Trying to figure that out can cause headaches as it is necessary to consult 28each known tool to figure out what is going on -- in some cases the tool 29might not even be known. 30 31Typically, the expectation is that developers will simply print out this 32information for visual inspection when an issue occurs, however a small 33amount of semantic information about what the tool is doing is provided to 34help identify it programmatically. 35For example, if the advertised limits or features of an implementation are 36unexpected, is there a tool active which modifies these limits? Or if an 37application is providing debug markers, but the implementation is not 38actually doing anything with that information, this can quickly point that 39out. 40 41include::{generated}/interfaces/VK_EXT_tooling_info.adoc[] 42 43=== Promotion to Vulkan 1.3 44 45Functionality in this extension is included in core Vulkan 1.3, with the EXT 46suffix omitted. 47The original type, enum and command names are still available as aliases of 48the core functionality. 49 50=== Examples 51 52.Printing Tool Information 53 54``` 55uint32_t num_tools; 56VkPhysicalDeviceToolPropertiesEXT *pToolProperties; 57vkGetPhysicalDeviceToolPropertiesEXT(physicalDevice, &num_tools, NULL); 58 59pToolProperties = (VkPhysicalDeviceToolPropertiesEXT*)malloc(sizeof(VkPhysicalDeviceToolPropertiesEXT) * num_tools); 60 61vkGetPhysicalDeviceToolPropertiesEXT(physicalDevice, &num_tools, pToolProperties); 62 63for (int i = 0; i < num_tools; ++i) { 64 printf("%s:\n", pToolProperties[i].name); 65 printf("Version:\n"); 66 printf("%s:\n", pToolProperties[i].version); 67 printf("Description:\n"); 68 printf("\t%s\n", pToolProperties[i].description); 69 printf("Purposes:\n"); 70 printf("\t%s\n", VkToolPurposeFlagBitsEXT_to_string(pToolProperties[i].purposes)); 71 if (strnlen_s(pToolProperties[i].layer,VK_MAX_EXTENSION_NAME_SIZE) > 0) { 72 printf("Corresponding Layer:\n"); 73 printf("\t%s\n", pToolProperties[i].layer); 74 } 75} 76``` 77 78=== Issues 79 801) Why is this information separate from the layer mechanism? 81 82Some tooling may be built into a driver, or be part of the Vulkan loader 83etc. 84Tying this information directly to layers would have been awkward at best. 85 86=== Version History 87 88 * Revision 1, 2018-11-05 (Tobias Hector) 89 ** Initial draft 90