• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2018-2024 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*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.adoc[]
40
41=== Promotion to Vulkan 1.3
42
43Functionality in this extension is included in core Vulkan 1.3, with the EXT
44suffix omitted.
45The original type, enum and command names are still available as aliases of
46the core functionality.
47
48=== Examples
49
50.Printing Tool Information
51
52```
53uint32_t num_tools;
54VkPhysicalDeviceToolPropertiesEXT *pToolProperties;
55vkGetPhysicalDeviceToolPropertiesEXT(physicalDevice, &num_tools, NULL);
56
57pToolProperties = (VkPhysicalDeviceToolPropertiesEXT*)malloc(sizeof(VkPhysicalDeviceToolPropertiesEXT) * num_tools);
58
59vkGetPhysicalDeviceToolPropertiesEXT(physicalDevice, &num_tools, pToolProperties);
60
61for (int i = 0; i < num_tools; ++i) {
62    printf("%s:\n", pToolProperties[i].name);
63    printf("Version:\n");
64    printf("%s:\n", pToolProperties[i].version);
65    printf("Description:\n");
66    printf("\t%s\n", pToolProperties[i].description);
67    printf("Purposes:\n");
68    printf("\t%s\n", VkToolPurposeFlagBitsEXT_to_string(pToolProperties[i].purposes));
69    if (strnlen_s(pToolProperties[i].layer,VK_MAX_EXTENSION_NAME_SIZE) > 0) {
70        printf("Corresponding Layer:\n");
71        printf("\t%s\n", pToolProperties[i].layer);
72    }
73}
74```
75
76=== Issues
77
781) Why is this information separate from the layer mechanism?
79
80Some tooling may be built into a driver, or be part of the Vulkan loader
81etc.
82Tying this information directly to layers would have been awkward at best.
83
84=== Version History
85
86  * Revision 1, 2018-11-05 (Tobias Hector)
87  ** Initial draft
88