[![Khronos Vulkan][1]][2] [1]: https://vulkan.lunarg.com/img/Vulkan_100px_Dec16.png "https://www.khronos.org/vulkan/" [2]: https://www.khronos.org/vulkan/ # Layer Interface to the Loader [![Creative Commons][3]][4] [3]: https://i.creativecommons.org/l/by-nd/4.0/88x31.png "Creative Commons License" [4]: https://creativecommons.org/licenses/by-nd/4.0/ ## Table of Contents - [Overview](#overview) - [Layer Discovery](#layer-discovery) - [Layer Manifest File Usage](#layer-manifest-file-usage) - [Android Layer Discovery](#android-layer-discovery) - [Windows Layer Discovery](#windows-layer-discovery) - [Linux Layer Discovery](#linux-layer-discovery) - [Example Linux Explicit Layer Search Path](#example-linux-explicit-layer-search-path) - [Fuchsia Layer Discovery](#fuchsia-layer-discovery) - [macOS Layer Discovery](#macos-layer-discovery) - [Example macOS Implicit Layer Search Path](#example-macos-implicit-layer-search-path) - [Exception for Elevated Privileges](#exception-for-elevated-privileges) - [Layer Version Negotiation](#layer-version-negotiation) - [Layer Call Chains and Distributed Dispatch](#layer-call-chains-and-distributed-dispatch) - [Layer Unknown Physical Device Extensions](#layer-unknown-physical-device-extensions) - [Layer Intercept Requirements](#layer-intercept-requirements) - [Distributed Dispatching Requirements](#distributed-dispatching-requirements) - [Layer Conventions and Rules](#layer-conventions-and-rules) - [Layer Dispatch Initialization](#layer-dispatch-initialization) - [Example Code for CreateInstance](#example-code-for-createinstance) - [Example Code for CreateDevice](#example-code-for-createdevice) - [Meta-layers](#meta-layers) - [Override Meta-Layer](#override-meta-layer) - [Pre-Instance Functions](#pre-instance-functions) - [Special Considerations](#special-considerations) - [Associating Private Data with Vulkan Objects Within a Layer](#associating-private-data-with-vulkan-objects-within-a-layer) - [Wrapping](#wrapping) - [Cautions About Wrapping](#cautions-about-wrapping) - [Hash Maps](#hash-maps) - [Creating New Dispatchable Objects](#creating-new-dispatchable-objects) - [Versioning and Activation Interactions](#versioning-and-activation-interactions) - [Layer Manifest File Format](#layer-manifest-file-format) - [Layer Manifest File Version History](#layer-manifest-file-version-history) - [Layer Manifest File Version 1.2.0](#layer-manifest-file-version-120) - [Layer Manifest File Version 1.1.2](#layer-manifest-file-version-112) - [Layer Manifest File Version 1.1.1](#layer-manifest-file-version-111) - [Layer Manifest File Version 1.1.0](#layer-manifest-file-version-110) - [Layer Manifest File Version 1.0.1](#layer-manifest-file-version-101) - [Layer Manifest File Version 1.0.0](#layer-manifest-file-version-100) - [Layer Interface Versions](#layer-interface-versions) - [Layer Interface Version 2](#layer-interface-version-2) - [Layer Interface Version 1](#layer-interface-version-1) - [Layer Interface Version 0](#layer-interface-version-0) - [Loader and Layer Interface Policy](#loader-and-layer-interface-policy) - [Number Format](#number-format) - [Android Differences](#android-differences) - [Requirements of Well-Behaved Layers](#requirements-of-well-behaved-layers) - [Requirements of a Well-Behaved Loader](#requirements-of-a-well-behaved-loader) ## Overview This is the Layer-centric view of working with the Vulkan loader. For the complete overview of all sections of the loader, please refer to the [LoaderInterfaceArchitecture.md](LoaderInterfaceArchitecture.md) file. ## Layer Discovery As mentioned in the [Implicit versus Explicit](LoaderApplicationInterface.md#implicit-vs-explicit-layers), section of the [LoaderApplicationInterface.md](LoaderApplicationInterface.md) document, layers can be categorized into two categories: * Implicit Layers * Explicit Layers The main difference between the two is that implicit layers are automatically enabled, unless overridden, and explicit layers must be enabled. Remember, implicit layers are not present on all Operating Systems (like Android). On any system, the loader looks in specific areas for information on the layers that it can load at a user's request. The process of finding the available layers on a system is known as Layer Discovery. During discovery, the loader determines what layers are available, the layer name, the layer version, and any extensions supported by the layer. This information is provided back to an application through `vkEnumerateInstanceLayerProperties`. The group of layers available to the loader is known as the `Layer Library`. This section defines an extensible interface to discover what layers are contained in the `Layer Library`. This section also specifies the minimal conventions and rules a layer must follow, especially with regards to interacting with the loader and other layers. When searching for a layer, the loader will look through the `Layer Library` in the order it detected them and load the layer if the name matches. If multiple instances of the same library exist in different locations throughout the user's system, then the one appearing first in the search order will be used. Each OS has its own search order that is defined in its layer discovery section below. If multiple manifest files in the same directory define the same layer, but point to different library files, the order which the layers is loaded is [random due to the behavior of readdir](https://www.ibm.com/support/pages/order-directory-contents-returned-calls-readdir). Additionally, any duplicate layer names in either the component layer list, or globally among all enabled layers, during calls to `vkCreateInstance` or `vkCreateDevice` will simply be ignored by the loader. Only the first occurrence of any layer name will be used. ### Layer Manifest File Usage On Windows, Linux, and macOS systems, JSON-formatted manifest files are used to store layer information. In order to find system-installed layers, the Vulkan loader will read the JSON files to identify the names and attributes of layers and their extensions. The use of manifest files allows the loader to avoid loading any shared library files when the application does not query nor request any extensions. The format of [Layer Manifest File](#layer-manifest-file-format) is detailed below. The Android loader does not use manifest files. Instead, the loader queries the layer properties using special functions known as "introspection" functions. The intent of these functions is to determine the same required information gathered from reading the manifest files. These introspection functions are not used by the Khronos loader but should be present in layers to maintain consistency. The specific "introspection" functions are called out in the [Layer Manifest File Format](#layer-manifest-file-format) table. ### Android Layer Discovery On Android, the loader looks for layers to enumerate in the `/data/local/debug/vulkan` folder. An application enabled for debug has the ability to enumerate and enable any layers in that location. ### Windows Layer Discovery In order to find system-installed layers, the Vulkan loader will scan the values in the following Windows registry keys: ``` HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\ExplicitLayers HKEY_CURRENT_USER\SOFTWARE\Khronos\Vulkan\ExplicitLayers HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\ImplicitLayers HKEY_CURRENT_USER\SOFTWARE\Khronos\Vulkan\ImplicitLayers ``` Except when running a 32-bit application on 64-bit Windows, when the loader will instead scan the 32-bit registry location: ``` HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Khronos\Vulkan\ExplicitLayers HKEY_CURRENT_USER\SOFTWARE\WOW6432Node\Khronos\Vulkan\ExplicitLayers HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Khronos\Vulkan\ImplicitLayers HKEY_CURRENT_USER\SOFTWARE\WOW6432Node\Khronos\Vulkan\ImplicitLayers ``` For each value in these keys which has DWORD data set to 0, the loader opens the JSON manifest file specified by the name of the value. Each name must be an absolute path to the manifest file. Additionally, the `HKEY_CURRENT_USER` locations will only be searched if an application is not being executed with administrative privileges. This is done to ensure that an application with administrative privileges does not run layers that did not need administrator access to install. Because some layers are installed alongside drivers, the loader will scan through registry keys specific to Display Adapters and all Software Components associated with these adapters for the locations of JSON manifest files. These keys are located in device keys created during driver installation and contain configuration information for base settings, including Vulkan, OpenGL, and Direct3D ICD location. The Device Adapter and Software Component key paths should be obtained through the PnP Configuration Manager API. The `000X` key will be a numbered key, where each device is assigned a different number. ``` HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Class\{Adapter GUID}\000X\VulkanExplicitLayers HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Class\{Adapter GUID}\000X\VulkanImplicitLayers HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Class\{Software Component GUID}\000X\VulkanExplicitLayers HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Class\{Software Component GUID}\000X\VulkanImplicitLayers ``` In addition, on 64-bit systems there may be another set of registry values, listed below. These values record the locations of 32-bit layers on 64-bit operating systems, in the same way as the Windows-on-Windows functionality. ``` HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Class\{Adapter GUID}\000X\VulkanExplicitLayersWow HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Class\{Adapter GUID}\000X\VulkanImplicitLayersWow HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Class\{Software Component GUID}\000X\VulkanExplicitLayersWow HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Class\{Software Component GUID}\000X\VulkanImplicitLayersWow ``` If any of the above values exist and is of type `REG_SZ`, the loader will open the JSON manifest file specified by the key value. Each value must be an absolute path to a JSON manifest file. A key value may also be of type `REG_MULTI_SZ`, in which case the value will be interpreted as a list of paths to JSON manifest files. In general, applications should install layers into the `SOFTWARE\Khronos\Vulkan` paths. The PnP registry locations are intended specifically for layers that are distributed as part of a driver installation. An application installer should not modify the device-specific registries, while a device driver should not modify the system registries. The Vulkan loader will open each manifest file to obtain information about the layer, including the name or pathname of a shared library (".dll") file. If `VK_LAYER_PATH` is defined, then the loader will look at the paths defined by that variable for explicit layer manifest files instead of using the information provided by the explicit layer registry keys. If `VK_ADD_LAYER_PATH` is defined, then the loader will look at the provided paths for explicit layer manifest files in addition to using the information provided by the explicit layer registry keys. The paths provided by `VK_ADD_LAYER_PATH` are added before the standard list of search folders and will therefore be searched first. If `VK_LAYER_PATH` is present, then `VK_ADD_LAYER_PATH` will not be used by the loader and any values will be ignored. For security reasons, both `VK_LAYER_PATH` and `VK_ADD_LAYER_PATH` are ignored if running with elevated privileges. See [Exception for Elevated Privileges](#exception-for-elevated-privileges) for more info. See [Forcing Layer Source Folders](LoaderApplicationInterface.md#forcing-layer-source-folders) in the [LoaderApplicationInterface.md document](LoaderApplicationInterface.md) for more information on this. ### Linux Layer Discovery On Linux, the Vulkan loader will scan for manifest files using environment variables or corresponding fallback values if the corresponding environment variable is not defined:
Search Order | Directory/Environment Variable | Fallback | Additional Notes |
---|---|---|---|
1 | $XDG_CONFIG_HOME | $HOME/.config | This path is ignored when running with elevated privileges such as
setuid, setgid, or filesystem capabilities. This is done because under these scenarios it is not safe to trust that the environment variables are non-malicious. |
1 | $XDG_CONFIG_DIRS | /etc/xdg | |
2 | SYSCONFDIR | /etc | Compile-time option set to possible location of layers installed from non-Linux-distribution-provided packages. |
3 | EXTRASYSCONFDIR | /etc | Compile-time option set to possible location of layers installed from non-Linux-distribution-provided packages. Typically only set if SYSCONFDIR is set to something other than /etc |
4 | $XDG_DATA_HOME | $HOME/.local/share | This path is ignored when running with elevated privileges such as
setuid, setgid, or filesystem capabilities. This is done because under these scenarios it is not safe to trust that the environment variables are non-malicious. |
5 | $XDG_DATA_DIRS | /usr/local/share/:/usr/share/ |
JSON Node | Description and Notes | Introspection Query |
---|---|---|
"file_format_version" | Manifest format major.minor.patch version number. Supported versions are: 1.0.0, 1.0.1, 1.1.0, 1.1.1, and 1.1.2. |
N/A |
"layer" | The identifier used to group a single layer's information together. | vkEnumerateInstanceLayerProperties |
"layers" | The identifier used to group multiple layers' information together. This requires a minimum Manifest file format version of 1.0.1. | vkEnumerateInstanceLayerProperties |
"name" | The string used to uniquely identify this layer to applications. | vkEnumerateInstanceLayerProperties |
"type" | This field indicates the type of layer. The values can be: GLOBAL, or
INSTANCE. NOTE: Prior to deprecation, the "type" node was used to indicate which layer chain(s) to activate the layer upon: instance, device, or both. Distinct instance and device layers are deprecated; there are now just instance layers. Originally, allowable values were "INSTANCE", "GLOBAL" and, "DEVICE." But now "DEVICE" layers are skipped over by the loader as if they were not found. |
vkEnumerate*LayerProperties |
"library_path" | Specifies either a filename, a relative pathname, or a full pathname to
a layer shared library file.
If "library_path" specifies a relative pathname, it is relative to the
path of the JSON manifest file (e.g. for cases when an application
provides a layer that is in the same folder hierarchy as the rest of the
application files).
If "library_path" specifies a filename, the library must live in the
system's shared object search path.
There are no rules about the name of the layer shared library files
other than it should end with the appropriate suffix (".DLL" on Windows,
".so" on Linux, and ".dylib" on macOS). This field must not be present if "component_layers" is defined. |
N/A |
"api_version" | The major.minor.patch version number of the Vulkan API that the shared library file for the library was built against. For example: 1.0.33. | vkEnumerateInstanceLayerProperties |
"implementation_version" | The version of the layer implemented. If the layer itself has any major changes, this number should change so the loader and/or application can identify it properly. | vkEnumerateInstanceLayerProperties |
"description" | A high-level description of the layer and its intended use. | vkEnumerateInstanceLayerProperties |
"functions" | OPTIONAL: This section can be used to identify a different function name for the loader to use in place of standard layer interface functions. The "functions" node is required if the layer is using an alternative name for `vkNegotiateLoaderLayerInterfaceVersion`. | vkGet*ProcAddr |
"instance_extensions" | OPTIONAL: Contains the list of instance extension names supported by this layer. One "instance_extensions" node with an array of one or more elements is required if any instance extensions are supported by a layer; otherwise the node is optional. Each element of the array must have the nodes "name" and "spec_version" which correspond to `VkExtensionProperties` "extensionName" and "specVersion" respectively. | vkEnumerateInstanceExtensionProperties |
"device_extensions" | OPTIONAL: Contains the list of device extension names supported by this layer. One "device\_extensions" node with an array of one or more elements is required if any device extensions are supported by a layer; otherwise the node is optional. Each element of the array must have the nodes "name" and "spec_version" which correspond to `VkExtensionProperties` "extensionName" and "specVersion" respectively. Additionally, each element of the array of device extensions must have the node "entrypoints" if the device extension adds Vulkan API functions; otherwise this node is not required. The "entrypoint" node is an array of the names of all entry-points added by the supported extension. | vkEnumerateDeviceExtensionProperties |
"enable_environment" | Implicit Layers Only - OPTIONAL: Indicates an environment
variable used to enable the Implicit Layer (when defined to any
non-empty string value). This environment variable (which may vary with each variation of the layer) must be set to the given value or else the implicit layer is not loaded. This is for application environments (e.g. Steam) which want to enable a layer(s) only for applications that they launch, and allows for applications run outside of an application environment to not get that implicit layer(s). |
N/A |
"disable_environment" | Implicit Layers Only - REQUIRED: Indicates an environment
variable used to disable the Implicit Layer (when defined to any
non-empty string value). In rare cases of an application not working with an implicit layer, the application can set this environment variable (before calling Vulkan functions) in order to "blacklist" the layer. This environment variable (which may vary with each variation of the layer) must be set (not particularly to any value). If both the "enable_environment" and "disable_environment" variables are set, the implicit layer is disabled. |
N/A |
"component_layers" | Meta-layers Only - Indicates the component layer names that are
part of a meta-layer.
The names listed must be the "name" identified in each of the component
layer's Mainfest file "name" tag (this is the same as the name of the
layer that is passed to the `vkCreateInstance` command).
All component layers must be present on the system and found by the
loader in order for this meta-layer to be available and activated. This field must not be present if "library_path" is defined. |
N/A |
"pre_instance_functions" | Implicit Layers Only - OPTIONAL: Indicates which
functions the layer wishes to intercept, that do not require that an
instance has been created.
This should be an object where each function to be intercepted is
defined as a string entry where the key is the Vulkan function name and
the value is the name of the intercept function in the layer's dynamic
library.
Available in layer manifest versions 1.1.2 and up. See Pre-Instance Functions for more information. |
vkEnumerateInstance*Properties |
Requirement Number | Requirement Description | Result of Non-Compliance | Applicable to Android? | Enforceable by Loader? | Reference Section |
---|---|---|---|---|---|
LLP_LAYER_1 | A layer, when inserted into an otherwise compliant Vulkan environment, must still result in a compliant Vulkan environment unless it intends to mimic non-compliant behavior (such as a device simulation layer). | The behavior is undefined and may result in crashes or corruption. | Yes | No It is not a simple task for the loader to find the cause of failure in a layer chain. |
Layer Conventions and Rules |
LLP_LAYER_2 | A layer must not cause other layers or drivers to fail, crash, or
otherwise misbehave. It must not make invalid calls to, or rely on undefined behaviors of the layers or drivers below it. |
The behavior is undefined and may result in crashes or corruption. | Yes | No It is not a simple task for the loader to find the cause of failure in a layer chain. |
Layer Conventions and Rules |
LLP_LAYER_3 | Any new layer developed should adhere to the naming rules defined in the "Layer Conventions and Rules" section which also correspond to the naming rules defined in the Vulkan Style Guide section 3.4 on "Version, Extension, and Layer Naming Conventions". | Layer developers could produce conflicting names causing unexpected behavior if more than one layer with the same name is available on a user's platform. | Yes | Yes Can not immediately enforce since it will cause some shipping layers to stop working. |
Vulkan Style Guide section 3.4 Layer Conventions and Rules |
LLP_LAYER_4 | A layer should export the
vkNegotiateLoaderLayerInterfaceVersion entry-point to negotiate
an interface version. A layer using interface 2 or newer must export this function. |
The layer will not be loaded. | No | Yes | Layer Version Negotiation |
LLP_LAYER_5 | A layer must be able to negotiate a supported version of the loader/layer interface with the loader in accordance with the stated negotiation process. | The layer will not be loaded. | No | Yes | Interface Negotiation |
LLP_LAYER_6 | A layer must have a valid JSON manifest file for the loader to process that ends with the ".json" suffix. It is recommended validating the layer manifest file against the layer schema prior to publication. The only exception is on Android which determines layer functionality through the introspection functions defined in Layer Library API Version 0 section and in the Layer Manifest File Format table. | The layer will not be loaded. | No | Yes | Manifest File Usage |
LLP_LAYER_7 | If a layer is a Meta-layer, each component layer in its manifest file must be present on the system. | The layer will not be loaded. | No | Yes | Meta-Layers |
LLP_LAYER_8 | If a layer is a Meta-layer, each component layer in its manifest file must report the same or a newer Vulkan API major and minor version than the meta-layer. | The layer will not be loaded. | No | Yes | Meta-Layers |
LLP_LAYER_9 | A layer installed as an Implicit Layer must define a disable environment variable so it can be disabled globally. | The layer will not be loaded if it does not define the environment variable. | Yes | Yes | Manifest File Format, see "disable_environment" variable |
LLP_LAYER_10 | If a layer wraps individual object handles, it must unwrap those handles when passing the handles down the chain to the next layer. | The behavior is undefined and may result in crashes or corruption. | Yes | No | Cautions About Wrapping |
LLP_LAYER_11 | Any layer shipped with a driver must be validated against conformance with the corresponding driver. | The behavior is undefined and may result in crashes or corruption. | Yes | No | Vulkan CTS Documentation |
LLP_LAYER_12 | During vkCreateInstance, a layer must process the
VkLayerInstanceCreateInfo chain links appropriately. This includes getting the next layer's vkGetInstanceProcAddr function for building a dispatch table as well as updating the VkLayerInstanceCreateInfo chain link to point to the next structure in the chain for the next layer prior to calling down to the next layer's vkCreateInstance function. An example of such usage is shown in detail in the Example Code for CreateInstance section. |
The behavior will result in crashes or corruption as any following layers will access incorrect content. | Yes | No With the current loader/layer design, it is difficult for the loader to diagnose this without adding additional overhead that could impact performance. This is because the loader calls all layers at once and has no data on the intermediate state of the pNext chain contents. This could be done in the future, but requires re-designing the layer initialization process. |
Layer Dispatch Initialization | LLP_LAYER_13 | During vkCreateDevice, a layer must process the
VkLayerDeviceCreateInfo chain links appropriately. This includes updating the VkLayerDeviceCreateInfo chain link to point to the next structure in the chain for the next layer prior to calling down to the next layer's vkCreateDevice function. An example of such usage is shown in detail in the Example Code for CreateDevice section. |
The behavior will result in crashes or corruption as any following layers will access incorrect content. | Yes | No With the current loader/layer design, it is difficult for the loader to diagnose this without adding additional overhead that could impact performance. |
Layer Dispatch Initialization |
LLP_LAYER_14 | A layer should use the application provided memory allocator functions when they are provided so that applications can keep track of allocated memory. | The allocator functions may be provided for the purpose of limiting or tracking the memory used by the Vulkan components. Because of this, if a layer ignores these allocators, it may result in undefined behavior possibly including crashes or corruption. | Yes | No | Layer Conventions and Rules |
LLP_LAYER_15 | A layer must enumerate only its own extension properties during a
call of vkEnumerateInstanceExtensionProperties when
pLayerName refers to itself. Otherwise, it must return VK_ERROR_LAYER_NOT_PRESENT, including when pLayerName is NULL. |
The loader could become confused on what support is present in a specific layer which will result in undefined behavior possibly including crashes or corruption. | Yes | No | Layer Conventions and Rules |
LLP_LAYER_16 | A layer must enumerate only its own extension properties during a
call of vkEnumerateDeviceExtensionProperties when
pLayerName refers to itself. Otherwise, it must ignore the call other than passing it down the standard call chain. |
The loader could become confused on what support is present in a specific layer which will result in undefined behavior possibly including crashes or corruption. | Yes | No | Layer Conventions and Rules |
LLP_LAYER_17 | A layer's vkCreateInstance must not generate an error for unrecognized extension names as the extension could be implemented by a lower layer or driver. | The behavior is undefined and may result in crashes or corruption. | Yes | Yes | Layer Conventions and Rules |
LLP_LAYER_18 | A layer must return NULL from vkGetInstanceProcAddr or vkGetDeviceProcAddr for entry-points that it does not support or that have not been enabled properly (for example not enabling the extension certain entry-points are associated with should result in vkGetInstanceProcAddr returning NULL when requesting them). | The behavior is undefined and may result in crashes or corruption. | Yes | No With the current loader/layer design, it is difficult for the loader to determine this without adding additional overhead that could impact performance. |
Layer Conventions and Rules |
LLP_LAYER_19 | If a layer creates dispatchable objects, either because it is wrapping objects or implementing an extension not supported by the loader or underlying drivers, it must create the dispatch table appropriately for all created dispatchable objects. | The behavior is undefined and may result in crashes or corruption. | Yes | No | Creating New Dispatchable Objects |
LLP_LAYER_20 | A layer must remove all manifest files and references
to those files (i.e. Registry entries on Windows) when uninstalling.
Similarly, on updating the layer files, the old files must be all updated or removed. |
The loader ignores duplicate attempts to load the same manifest file, but if an old file is left pointing to an incorrect library, it will result in undefined behavior which may include crashes or corruption. | No | No The loader has no idea what layer files are new, old, or incorrect. Any type of layer file verification would quickly become very complex since it would require the loader to maintain an internal database tracking badly behaving layers based on the layer name, version, targeted platform(s), and possibly other criteria. | N/A |
LLP_LAYER_21 | During vkCreateInstance, a layer must not modify the
pInstance pointer during prior to calling down to the lower
layers. This is because the loader passes information in this pointer that is necessary for the initialization code in the loader's terminator function. Instead, if the layer is overriding the pInstance pointer, it must do so only after the call to the lower layers returns. |
The loader will likely crash. | No | Yes | N/A |
Requirement Number | Requirement Description | Result of Non-Compliance | Applicable to Android? | Reference Section |
---|---|---|---|---|
LLP_LOADER_1 | A loader must support Vulkan layers. | Users will not have access to critical parts of the Vulkan ecosystem such as Validation Layers, GfxReconstruct, or RenderDoc. | Yes | N/A |
LLP_LOADER_2 | A loader must support a mechanism to load layers in one or
more non-standard locations. This is to allow application/engine-specific layers as well as evaluating in-development layers without global installation. |
It will be more difficult to use a Vulkan loader by certain tools and driver developers. | No | Layer Discovery |
LLP_LOADER_3 | A loader must filter out duplicate layer names in the various enable lists, keeping only the first occurrence. | The behavior is undefined and may result in crashes or corruption. | Yes | Layer Discovery |
LLP_LOADER_4 | A loader must not load a Vulkan layer which defines an API version that is incompatible with itself. | The behavior is undefined and may result in crashes or corruption. | Yes | Layer Discovery |
LLP_LOADER_5 | A loader must ignore any layer for which a compatible interface version can not be negotiated. | The loader would load a layer improperly resulting in undefined behavior which may include crashes or corruption. | No | Interface Negotiation |
LLP_LOADER_6 | If a layer is implicit, and it has an enable environment variable,
then a loader must not consider the layer enabled unless that
enable environment variable is defined. If an implicit layer does not have an enable environment variable, it will be considered enabled by default. |
Some layers may be used when not intended. | No | Manifest File Format, see "enable_environment" variable |
LLP_LOADER_7 | If an implicit layer is enabled, but has been disabled by some other mechanism (such as the defining of the layer's disable environment variable or through the blacklisting mechanism of the Override Layer), then a loader must not load that layer. | Some layers may be used when not intended. | No | Manifest File Format, see "disable_environment" variable |
LLP_LOADER_8 | A loader must pass a linked list of initialization structures to each layer via the VkLayerInstanceCreateInfo structure in the pNext field of the VkInstanceCreateInfo structure. This contains necessary information for setting up the instance call chain including providing a function pointer to the next links vkGetInstanceProcAddr. | Layers will crash as they attempt to load invalid data. | Yes | Layer Dispatch Initialization |
LLP_LOADER_9 | A loader must pass a linked list of initialization structures to each layer via the VkLayerDeviceCreateInfo structure in the pNext field of the VkDeviceCreateInfo structure. This contains necessary information for setting up the device call chain including providing a function pointer to the next links vkGetDeviceProcAddr. | Layers will crash as they attempt to load invalid data. | Yes | Layer Dispatch Initialization |
LLP_LOADER_10 | A loader must verify that all meta-layers contain valid component layers that the loader can find on the system and that also report the same Vulkan API version as the meta-layer itself before it loads the meta-layer. | The behavior is undefined and may result in crashes or corruption. | No | Meta-Layers |
LLP_LOADER_11 | If the override meta-layer is present, a loader must load it and corresponding component layers after all other implicit layers have been added to the call chain. | The behavior is undefined and may result in crashes or corruption. | No | Override Meta-Layer |
LLP_LOADER_12 | If the override meta-layer is present and has a blacklist of layers to remove, a loader must disable all layers listed in the blacklist. | The behavior is undefined and may result in crashes or corruption. | No | Override Meta-Layer |
LLP_LOADER_13 | A loader must not load from user-defined paths (including the
use of either VK_LAYER_PATH or VK_ADD_LAYER_PATH
environment variables) when running elevated (Administrator/Super-user)
applications. This is for security reasons. |
The behavior is undefined and may result in computer security lapses, crashes or corruption. | No | Layer Discovery |