15db71995Sopenharmony_ci<!-- markdownlint-disable MD041 --> 25db71995Sopenharmony_ci[![Khronos Vulkan][1]][2] 35db71995Sopenharmony_ci 45db71995Sopenharmony_ci[1]: https://vulkan.lunarg.com/img/Vulkan_100px_Dec16.png "https://www.khronos.org/vulkan/" 55db71995Sopenharmony_ci[2]: https://www.khronos.org/vulkan/ 65db71995Sopenharmony_ci 75db71995Sopenharmony_ci# Debugging The Vulkan Desktop Loader <!-- omit from toc --> 85db71995Sopenharmony_ci[![Creative Commons][3]][4] 95db71995Sopenharmony_ci 105db71995Sopenharmony_ci<!-- Copyright © 2015-2023 LunarG, Inc. --> 115db71995Sopenharmony_ci 125db71995Sopenharmony_ci[3]: https://i.creativecommons.org/l/by-nd/4.0/88x31.png "Creative Commons License" 135db71995Sopenharmony_ci[4]: https://creativecommons.org/licenses/by-nd/4.0/ 145db71995Sopenharmony_ci## Table of Contents <!-- omit from toc --> 155db71995Sopenharmony_ci 165db71995Sopenharmony_ci- [Debugging Issues](#debugging-issues) 175db71995Sopenharmony_ci- [Loader Logging](#loader-logging) 185db71995Sopenharmony_ci- [Debugging Possible Layer Issues](#debugging-possible-layer-issues) 195db71995Sopenharmony_ci - [Enable Layer Logging](#enable-layer-logging) 205db71995Sopenharmony_ci - [Disable Layers](#disable-layers) 215db71995Sopenharmony_ci - [Selectively Re-enable Layers](#selectively-re-enable-layers) 225db71995Sopenharmony_ci- [Allow specific layers to be ignored by VK\_LOADER\_LAYERS\_DISABLE](#allow-specific-layers-to-be-ignored-by-vk_loader_layers_disable) 235db71995Sopenharmony_ci- [Debugging Possible Driver Issues](#debugging-possible-driver-issues) 245db71995Sopenharmony_ci - [Enable Driver Logging](#enable-driver-logging) 255db71995Sopenharmony_ci - [Selectively Enable Specific Drivers](#selectively-enable-specific-drivers) 265db71995Sopenharmony_ci 275db71995Sopenharmony_ci## Debugging Issues 285db71995Sopenharmony_ci 295db71995Sopenharmony_ciIf your application is crashing or behaving weirdly, the loader provides 305db71995Sopenharmony_ciseveral mechanisms for you to debug the issues. 315db71995Sopenharmony_ci 325db71995Sopenharmony_ci**NOTE**: This functionality is all specific to the desktop Vulkan loader and 335db71995Sopenharmony_cidoes not work for the Android loader. 345db71995Sopenharmony_ci 355db71995Sopenharmony_ci## Loader Logging 365db71995Sopenharmony_ci 375db71995Sopenharmony_ciThe Vulkan desktop loader has added logging functionality that can be enabled by 385db71995Sopenharmony_ciusing the `VK_LOADER_DEBUG` environment variable. 395db71995Sopenharmony_ciThe results will be output to the standard output, but will also be passed to 405db71995Sopenharmony_ciany `VK_EXT_debug_utils` messengers present as well. 415db71995Sopenharmony_ciThe variable can be set to a comma-delimited list of debug level options which 425db71995Sopenharmony_ciinclude: 435db71995Sopenharmony_ci 445db71995Sopenharmony_ci * error Report any errors encountered by 455db71995Sopenharmony_ci the loader 465db71995Sopenharmony_ci * warn Report any warnings encountered by 475db71995Sopenharmony_ci the loader 485db71995Sopenharmony_ci * info Report info-level 495db71995Sopenharmony_ci messages generated by the loader 505db71995Sopenharmony_ci * debug Report debug-level messages generated by the 515db71995Sopenharmony_ci loader 525db71995Sopenharmony_ci * layer Report all layer-specific messages 535db71995Sopenharmony_ci generated by the loader 545db71995Sopenharmony_ci * driver Report all driver-specific messages 555db71995Sopenharmony_ci generated by the loader 565db71995Sopenharmony_ci * all Report all 575db71995Sopenharmony_ci messages generated by the loader (includes all of the above) 585db71995Sopenharmony_ci 595db71995Sopenharmony_ciIf you're not sure where the issue comes from, at least set it to output all 605db71995Sopenharmony_cimessages through the "info" level: 615db71995Sopenharmony_ci 625db71995Sopenharmony_ci``` 635db71995Sopenharmony_ciset VK_LOADER_DEBUG=error,warn,info 645db71995Sopenharmony_ci``` 655db71995Sopenharmony_ci 665db71995Sopenharmony_ciThen, you can search the list for any errors or warnings that might provide a 675db71995Sopenharmony_cihint at why you're seeing issues. 685db71995Sopenharmony_ci 695db71995Sopenharmony_ciFor more info on enabling loader logging, refer to the 705db71995Sopenharmony_ci[Enable Loader Debug Layer Output](LoaderApplicationInterface.md#enable-loader-debug-layer-output) 715db71995Sopenharmony_ciand the 725db71995Sopenharmony_ci[Table of Debug Environment Variables](LoaderInterfaceArchitecture.md#table-of-debug-environment-variables) 735db71995Sopenharmony_cibelow. 745db71995Sopenharmony_ci 755db71995Sopenharmony_ci## Debugging Possible Layer Issues 765db71995Sopenharmony_ci 775db71995Sopenharmony_ci### Enable Layer Logging 785db71995Sopenharmony_ci 795db71995Sopenharmony_ciIf you suspect a layer issue, set the loader logging to specifically output 805db71995Sopenharmony_cilayer messages in addition to warnings and errors: 815db71995Sopenharmony_ci 825db71995Sopenharmony_ci``` 835db71995Sopenharmony_ciset VK_LOADER_DEBUG=error,warn,layer 845db71995Sopenharmony_ci``` 855db71995Sopenharmony_ci 865db71995Sopenharmony_ciMost important layer messages should go out with error or warning levels set, 875db71995Sopenharmony_cibut this will provide more layer-specific info as well such as: 885db71995Sopenharmony_ci * What layers are found 895db71995Sopenharmony_ci * Where they were found 905db71995Sopenharmony_ci * If they are implicit, what environment variables can be used to disable them 915db71995Sopenharmony_ci * If there is any incompatibility with a given layer, this could include: 925db71995Sopenharmony_ci * The layer library file (.so/.dll) wasn't found 935db71995Sopenharmony_ci * The layer library is the wrong bit-depth for the executing application 945db71995Sopenharmony_ci (i.e. 32-bit vs 64-bit) 955db71995Sopenharmony_ci * The layer itself doesn't support the application desired version of Vulkan 965db71995Sopenharmony_ci * If any environment variables are disabling any layers 975db71995Sopenharmony_ci 985db71995Sopenharmony_ciFor example, the output of the loader looking for implicit layers may look like 995db71995Sopenharmony_cithe following: 1005db71995Sopenharmony_ci 1015db71995Sopenharmony_ci``` 1025db71995Sopenharmony_ciLAYER: Searching for layer manifest files 1035db71995Sopenharmony_ciLAYER: In following locations: 1045db71995Sopenharmony_ciLAYER: /home/${USER}/.config/vulkan/implicit_layer.d 1055db71995Sopenharmony_ciLAYER: /etc/xdg/vulkan/implicit_layer.d 1065db71995Sopenharmony_ciLAYER: /usr/local/etc/vulkan/implicit_layer.d 1075db71995Sopenharmony_ciLAYER: /etc/vulkan/implicit_layer.d 1085db71995Sopenharmony_ciLAYER: /home/${USER}/.local/share/vulkan/implicit_layer.d 1095db71995Sopenharmony_ciLAYER: /home/${USER}/.local/share/flatpak/exports/share/vulkan/implicit_layer.d 1105db71995Sopenharmony_ciLAYER: /var/lib/flatpak/exports/share/vulkan/implicit_layer.d 1115db71995Sopenharmony_ciLAYER: /usr/local/share/vulkan/implicit_layer.d 1125db71995Sopenharmony_ciLAYER: /usr/share/vulkan/implicit_layer.d 1135db71995Sopenharmony_ciLAYER: Found the following files: 1145db71995Sopenharmony_ciLAYER: /home/${USER}/.local/share/vulkan/implicit_layer.d/renderdoc_capture.json 1155db71995Sopenharmony_ciLAYER: /home/${USER}/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json 1165db71995Sopenharmony_ciLAYER: /home/${USER}/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json 1175db71995Sopenharmony_ciLAYER: /home/${USER}/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json 1185db71995Sopenharmony_ciLAYER: /home/${USER}/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json 1195db71995Sopenharmony_ciLAYER: /usr/share/vulkan/implicit_layer.d/nvidia_layers.json 1205db71995Sopenharmony_ciLAYER: /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json 1215db71995Sopenharmony_ci``` 1225db71995Sopenharmony_ci 1235db71995Sopenharmony_ciThen, the loading of layer libraries is reported similar to this: 1245db71995Sopenharmony_ci 1255db71995Sopenharmony_ci``` 1265db71995Sopenharmony_ciLAYER | DEBUG: Loading layer library libVkLayer_khronos_validation.so 1275db71995Sopenharmony_ciLAYER | INFO: Insert instance layer VK_LAYER_KHRONOS_validation (libVkLayer_khronos_validation.so) 1285db71995Sopenharmony_ciLAYER | DEBUG: Loading layer library libVkLayer_MESA_device_select.so 1295db71995Sopenharmony_ciLAYER | INFO: Insert instance layer VK_LAYER_MESA_device_select (libVkLayer_MESA_device_select.so) 1305db71995Sopenharmony_ci``` 1315db71995Sopenharmony_ci 1325db71995Sopenharmony_ciFinally, when the Vulkan instance is created, you can see the full instance 1335db71995Sopenharmony_cicall-chain from a functional standpoint with output like this: 1345db71995Sopenharmony_ci 1355db71995Sopenharmony_ci``` 1365db71995Sopenharmony_ciLAYER: vkCreateInstance layer callstack setup to: 1375db71995Sopenharmony_ciLAYER: <Application> 1385db71995Sopenharmony_ciLAYER: || 1395db71995Sopenharmony_ciLAYER: <Loader> 1405db71995Sopenharmony_ciLAYER: || 1415db71995Sopenharmony_ciLAYER: VK_LAYER_MESA_device_select 1425db71995Sopenharmony_ciLAYER: Type: Implicit 1435db71995Sopenharmony_ciLAYER: Disable Env Var: NODEVICE_SELECT 1445db71995Sopenharmony_ciLAYER: Manifest: /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json 1455db71995Sopenharmony_ciLAYER: Library: libVkLayer_MESA_device_select.so 1465db71995Sopenharmony_ciLAYER: || 1475db71995Sopenharmony_ciLAYER: VK_LAYER_KHRONOS_validation 1485db71995Sopenharmony_ciLAYER: Type: Explicit 1495db71995Sopenharmony_ciLAYER: Manifest: /usr/share/vulkan/explicit_layer.d/VkLayer_khronos_validation.json 1505db71995Sopenharmony_ciLAYER: Library: libVkLayer_khronos_validation.so 1515db71995Sopenharmony_ciLAYER: || 1525db71995Sopenharmony_ciLAYER: <Drivers> 1535db71995Sopenharmony_ci``` 1545db71995Sopenharmony_ci 1555db71995Sopenharmony_ciIn this scenario, two layers were used (the same two that were loaded earlier): 1565db71995Sopenharmony_ci* `VK_LAYER_MESA_device_select` 1575db71995Sopenharmony_ci* `VK_LAYER_KHRONOS_validation` 1585db71995Sopenharmony_ci 1595db71995Sopenharmony_ciThis information now shows us that the `VK_LAYER_MESA_device_select` is loaded 1605db71995Sopenharmony_cifirst, followed by `VK_LAYER_KHRONOS_validation` which will then continue into 1615db71995Sopenharmony_ciany available drivers. 1625db71995Sopenharmony_ciIt also shows that `VK_LAYER_MESA_device_select` is an implicit layer which 1635db71995Sopenharmony_ciimplies that it wasn't directly enabled by the application. 1645db71995Sopenharmony_ciOn the other hand, `VK_LAYER_KHRONOS_validation` is shown as an explicit layer 1655db71995Sopenharmony_ciwhich indicates that it was likely enabled by the application. 1665db71995Sopenharmony_ci 1675db71995Sopenharmony_ci### Disable Layers 1685db71995Sopenharmony_ci 1695db71995Sopenharmony_ci**NOTE:** This functionality is only available with Loaders built with version 1705db71995Sopenharmony_ci1.3.234 of the Vulkan headers and later. 1715db71995Sopenharmony_ci 1725db71995Sopenharmony_ciSometimes, implicit layers can cause issues with an application. 1735db71995Sopenharmony_ciBecause of this, the next step is to try to disable one or more of the listed 1745db71995Sopenharmony_ciimplicit layers. 1755db71995Sopenharmony_ciYou can use the filtering environment variables 1765db71995Sopenharmony_ci(`VK_LOADER_LAYERS_ENABLE` and `VK_LOADER_LAYERS_DISABLE`) to selectively enable 1775db71995Sopenharmony_cior disable various layers. 1785db71995Sopenharmony_ciIf you're not sure what to do, try disabling all implicit layers manually by 1795db71995Sopenharmony_cisetting `VK_LOADER_LAYERS_DISABLE` to `~implicit~`. 1805db71995Sopenharmony_ci 1815db71995Sopenharmony_ci``` 1825db71995Sopenharmony_ci set VK_LOADER_LAYERS_DISABLE=~implicit~ 1835db71995Sopenharmony_ci``` 1845db71995Sopenharmony_ci 1855db71995Sopenharmony_ciThis will disable all implicit layers and the loader will report any disabled 1865db71995Sopenharmony_cilayers to the logging output when layer logging is enabled in the following way: 1875db71995Sopenharmony_ci 1885db71995Sopenharmony_ci``` 1895db71995Sopenharmony_ciWARNING | LAYER: Implicit layer "VK_LAYER_MESA_device_select" forced disabled because name matches filter of env var 'VK_LOADER_LAYERS_DISABLE'. 1905db71995Sopenharmony_ciWARNING | LAYER: Implicit layer "VK_LAYER_AMD_switchable_graphics_64" forced disabled because name matches filter of env var 'VK_LOADER_LAYERS_DISABLE'. 1915db71995Sopenharmony_ciWARNING | LAYER: Implicit layer "VK_LAYER_Twitch_Overlay" forced disabled because name matches filter of env var 'VK_LOADER_LAYERS_DISABLE'. 1925db71995Sopenharmony_ci``` 1935db71995Sopenharmony_ci 1945db71995Sopenharmony_ci### Selectively Re-enable Layers 1955db71995Sopenharmony_ci 1965db71995Sopenharmony_ci**NOTE:** This functionality is only available with Loaders built with version 1975db71995Sopenharmony_ci1.3.234 of the Vulkan headers and later. 1985db71995Sopenharmony_ci 1995db71995Sopenharmony_ciWhen trying to diagnose problems caused by layers, it is useful to first disable 2005db71995Sopenharmony_ciall layers and re-enable each layer individually. 2015db71995Sopenharmony_ciIf the problem reappears, then it is immediately clear which layer is the source 2025db71995Sopenharmony_ciof the issue. 2035db71995Sopenharmony_ci 2045db71995Sopenharmony_ciFor example, from the above given list of disabled layers, let’s selectively 2055db71995Sopenharmony_cire-enable one: 2065db71995Sopenharmony_ci 2075db71995Sopenharmony_ci``` 2085db71995Sopenharmony_ciset VK_LOADER_LAYERS_DISABLE=~implicit~ 2095db71995Sopenharmony_ciset VK_LOADER_LAYERS_ENABLE=*AMD* 2105db71995Sopenharmony_ci``` 2115db71995Sopenharmony_ci 2125db71995Sopenharmony_ciThis would keep both the "VK_LAYER_MESA_device_select" and 2135db71995Sopenharmony_ci"VK_LAYER_Twitch_Overlay" layers disabled, while enabling the 2145db71995Sopenharmony_ci"VK_LAYER_AMD_switchable_graphics_64" layer. 2155db71995Sopenharmony_ciIf everything continues to work, then the evidence seems to suggest the issue is 2165db71995Sopenharmony_cilikely not related to the AMD layer. 2175db71995Sopenharmony_ciThis would lead to enabling one other layer and trying again: 2185db71995Sopenharmony_ci 2195db71995Sopenharmony_ci``` 2205db71995Sopenharmony_ciset VK_LOADER_LAYERS_DISABLE=~implicit~ 2215db71995Sopenharmony_ciset VK_LOADER_LAYERS_ENABLE=*AMD*,*twitch* 2225db71995Sopenharmony_ci``` 2235db71995Sopenharmony_ci 2245db71995Sopenharmony_ciAnd so forth. 2255db71995Sopenharmony_ci 2265db71995Sopenharmony_ciFor more info on how to use the filtering environment variables, refer to the 2275db71995Sopenharmony_ci[Layer Filtering](LoaderLayerInterface.md#layer-filtering) section of the 2285db71995Sopenharmony_ci[LoaderLayerInterface](LoaderLayerInterface.md) document. 2295db71995Sopenharmony_ci 2305db71995Sopenharmony_ci## Allow specific layers to be ignored by VK_LOADER_LAYERS_DISABLE 2315db71995Sopenharmony_ci 2325db71995Sopenharmony_ci**NOTE:** VK_LOADER_LAYERS_DISABLE is only available with Loaders built with version 2335db71995Sopenharmony_ci1.3.262 of the Vulkan headers and later. 2345db71995Sopenharmony_ci 2355db71995Sopenharmony_ciWhen using `VK_LOADER_LAYERS_DISABLE` to disable implicit layers, it is possible 2365db71995Sopenharmony_cito allow specific layers to be enabled using `VK_LOADER_LAYERS_ENABLE`. 2375db71995Sopenharmony_ciHowever, this has the effect of *forcing* layers to be enabled, which is not 2385db71995Sopenharmony_cialways desired. 2395db71995Sopenharmony_ciImplicit layers have the ability to only be enabled when a layer specified 2405db71995Sopenharmony_cienvironment variable is set, allow for context dependent enablement. 2415db71995Sopenharmony_ci`VK_LOADER_LAYERS_ENABLE` ignores that context. 2425db71995Sopenharmony_ci 2435db71995Sopenharmony_ciThus, a different environment variable is needed: `VK_LOADER_LAYERS_ALLOW` 2445db71995Sopenharmony_ci 2455db71995Sopenharmony_ciThe behavior of `VK_LOADER_LAYERS_ALLOW` is similar to `VK_LOADER_LAYERS_ENABLE` 2465db71995Sopenharmony_ciexcept that it does not force a layer to be enabled. 2475db71995Sopenharmony_ciThe way to think about this environment variable is that every layer matching 2485db71995Sopenharmony_ci`VK_LOADER_LAYERS_ALLOW` is excluded from being forcibly disabled by 2495db71995Sopenharmony_ci`VK_LOADER_LAYERS_DISABLE`. 2505db71995Sopenharmony_cithis allows for implicit layers that are context dependent to be enabled 2515db71995Sopenharmony_cidepending on the relevant context instead of force enabling them. 2525db71995Sopenharmony_ci 2535db71995Sopenharmony_ciExample: Disable all implicit layers except for any layers that have steam or 2545db71995Sopenharmony_cimesa in their name. 2555db71995Sopenharmony_ci``` 2565db71995Sopenharmony_ciset VK_LOADER_LAYERS_DISABLE=~implicit~ 2575db71995Sopenharmony_ciset VK_LOADER_LAYERS_ALLOW=*steam*,*Mesa* 2585db71995Sopenharmony_ci``` 2595db71995Sopenharmony_ci 2605db71995Sopenharmony_ci## Debugging Possible Driver Issues 2615db71995Sopenharmony_ci 2625db71995Sopenharmony_ci### Enable Driver Logging 2635db71995Sopenharmony_ci 2645db71995Sopenharmony_ci**NOTE:** This functionality is only available with Loaders built with version 2655db71995Sopenharmony_ci1.3.234 of the Vulkan headers and later. 2665db71995Sopenharmony_ci 2675db71995Sopenharmony_ciIf you suspect a driver issue, set the loader logging to specifically output 2685db71995Sopenharmony_cidriver messages: 2695db71995Sopenharmony_ci 2705db71995Sopenharmony_ci``` 2715db71995Sopenharmony_ciset VK_LOADER_DEBUG=error,warn,driver 2725db71995Sopenharmony_ci``` 2735db71995Sopenharmony_ci 2745db71995Sopenharmony_ciMost important driver messages should go out with error or warning levels set, 2755db71995Sopenharmony_cibut this will provide more driver-specific info as well such as: 2765db71995Sopenharmony_ci * What drivers are found 2775db71995Sopenharmony_ci * Where they were found 2785db71995Sopenharmony_ci * If there is any incompatibility with a given driver 2795db71995Sopenharmony_ci * If any environment variables are disabling any of the drivers 2805db71995Sopenharmony_ci 2815db71995Sopenharmony_ciFor example, the output of the loader looking for drivers on a Linux system may 2825db71995Sopenharmony_cilook like the following (NOTE: additional spaces have been removed from the 2835db71995Sopenharmony_cioutput for easier reading): 2845db71995Sopenharmony_ci 2855db71995Sopenharmony_ci``` 2865db71995Sopenharmony_ciDRIVER: Searching for driver manifest files 2875db71995Sopenharmony_ciDRIVER: In following folders: 2885db71995Sopenharmony_ciDRIVER: /home/$(USER)/.config/vulkan/icd.d 2895db71995Sopenharmony_ciDRIVER: /etc/xdg/vulkan/icd.d 2905db71995Sopenharmony_ciDRIVER: /etc/vulkan/icd.d 2915db71995Sopenharmony_ciDRIVER: /home/$(USER)/.local/share/vulkan/icd.d 2925db71995Sopenharmony_ciDRIVER: /home/$(USER)/.local/share/flatpak/exports/share/vulkan/icd.d 2935db71995Sopenharmony_ciDRIVER: /var/lib/flatpak/exports/share/vulkan/icd.d 2945db71995Sopenharmony_ciDRIVER: /usr/local/share/vulkan/icd.d 2955db71995Sopenharmony_ciDRIVER: /usr/share/vulkan/icd.d 2965db71995Sopenharmony_ciDRIVER: Found the following files: 2975db71995Sopenharmony_ciDRIVER: /usr/share/vulkan/icd.d/intel_icd.x86_64.json 2985db71995Sopenharmony_ciDRIVER: /usr/share/vulkan/icd.d/lvp_icd.x86_64.json 2995db71995Sopenharmony_ciDRIVER: /usr/share/vulkan/icd.d/radeon_icd.x86_64.json 3005db71995Sopenharmony_ciDRIVER: /usr/share/vulkan/icd.d/lvp_icd.i686.json 3015db71995Sopenharmony_ciDRIVER: /usr/share/vulkan/icd.d/radeon_icd.i686.json 3025db71995Sopenharmony_ciDRIVER: /usr/share/vulkan/icd.d/intel_icd.i686.json 3035db71995Sopenharmony_ciDRIVER: /usr/share/vulkan/icd.d/nvidia_icd.json 3045db71995Sopenharmony_ciDRIVER: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.x86_64.json, version "1.0.0" 3055db71995Sopenharmony_ciDRIVER: Found ICD manifest file /usr/share/vulkan/icd.d/lvp_icd.x86_64.json, version "1.0.0" 3065db71995Sopenharmony_ciDRIVER: Found ICD manifest file /usr/share/vulkan/icd.d/radeon_icd.x86_64.json, version "1.0.0" 3075db71995Sopenharmony_ciDRIVER: Found ICD manifest file /usr/share/vulkan/icd.d/lvp_icd.i686.json, version "1.0.0" 3085db71995Sopenharmony_ciDRIVER: Requested driver /usr/lib/libvulkan_lvp.so was wrong bit-type. Ignoring this JSON 3095db71995Sopenharmony_ciDRIVER: Found ICD manifest file /usr/share/vulkan/icd.d/radeon_icd.i686.json, version "1.0.0" 3105db71995Sopenharmony_ciDRIVER: Requested driver /usr/lib/libvulkan_radeon.so was wrong bit-type. Ignoring this JSON 3115db71995Sopenharmony_ciDRIVER: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.i686.json, version "1.0.0" 3125db71995Sopenharmony_ciDRIVER: Requested driver /usr/lib/libvulkan_intel.so was wrong bit-type. Ignoring this JSON 3135db71995Sopenharmony_ciDRIVER: Found ICD manifest file /usr/share/vulkan/icd.d/nvidia_icd.json, version "1.0.0" 3145db71995Sopenharmony_ci``` 3155db71995Sopenharmony_ci 3165db71995Sopenharmony_ciThen when the application selects the device to use, you will see the Vulkan 3175db71995Sopenharmony_cidevice call chain reported in the following way (NOTE: additional spaces have 3185db71995Sopenharmony_cibeen removed from the output for easier reading): 3195db71995Sopenharmony_ci 3205db71995Sopenharmony_ci``` 3215db71995Sopenharmony_ciDRIVER: vkCreateDevice layer callstack setup to: 3225db71995Sopenharmony_ciDRIVER: <Application> 3235db71995Sopenharmony_ciDRIVER: || 3245db71995Sopenharmony_ciDRIVER: <Loader> 3255db71995Sopenharmony_ciDRIVER: || 3265db71995Sopenharmony_ciDRIVER: <Device> 3275db71995Sopenharmony_ciDRIVER: Using "Intel(R) UHD Graphics 630 (CFL GT2)" with driver: "/usr/lib64/libvulkan_intel.so" 3285db71995Sopenharmony_ci``` 3295db71995Sopenharmony_ci 3305db71995Sopenharmony_ci 3315db71995Sopenharmony_ci### Selectively Enable Specific Drivers 3325db71995Sopenharmony_ci 3335db71995Sopenharmony_ci**NOTE:** This functionality is only available with Loaders built with version 3345db71995Sopenharmony_ci1.3.234 of the Vulkan headers and later. 3355db71995Sopenharmony_ci 3365db71995Sopenharmony_ciYou can now use the filtering environment variables 3375db71995Sopenharmony_ci(`VK_LOADER_DRIVERS_SELECT` and `VK_LOADER_DRIVERS_DISABLE`) to control what 3385db71995Sopenharmony_cidrivers the loader will attempt to load. 3395db71995Sopenharmony_ciFor drivers, the string globs passed into the above environment variables will 3405db71995Sopenharmony_cibe compared against the driver JSON file name since there is no driver name 3415db71995Sopenharmony_ciknown to the loader until much later in the Vulkan initialization process. 3425db71995Sopenharmony_ci 3435db71995Sopenharmony_ciFor example, to disable all drivers except Nvidia you could do the following: 3445db71995Sopenharmony_ci 3455db71995Sopenharmony_ci``` 3465db71995Sopenharmony_ciset VK_LOADER_DRIVERS_DISABLE=* 3475db71995Sopenharmony_ciset VK_LOADER_DRIVERS_SELECT=*nvidia* 3485db71995Sopenharmony_ci``` 3495db71995Sopenharmony_ci 3505db71995Sopenharmony_ciThe loader outputs messages like the following when the environment variables 3515db71995Sopenharmony_ciare used: 3525db71995Sopenharmony_ci 3535db71995Sopenharmony_ci``` 3545db71995Sopenharmony_ciWARNING | DRIVER: Driver "intel_icd.x86_64.json" ignored because not selected by env var 'VK_LOADER_DRIVERS_SELECT' 3555db71995Sopenharmony_ciWARNING | DRIVER: Driver "radeon_icd.x86_64.json" ignored because it was disabled by env var 'VK_LOADER_DRIVERS_DISABLE' 3565db71995Sopenharmony_ci``` 3575db71995Sopenharmony_ci 3585db71995Sopenharmony_ciFor more info on how to use the filtering environment variables, refer to the 3595db71995Sopenharmony_ci[Driver Filtering](LoaderDriverInterface.md#driver-filtering) section of the 3605db71995Sopenharmony_ci[LoaderDriverInterface](LoaderDriverInterface.md) document. 3615db71995Sopenharmony_ci 362