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