Lines Matching refs:layer
14 Application, Vulkan driver and Vulkan layer developers.
16 Any developers interested in understanding more about loader and layer behavior
76 first layer’s vkCreateInstance which will call the next finally terminating in
78 saves the results. This allows every enabled layer for this chain to set up
149 use various layers or extensions. A layer cannot add new or modify existing
160 layer names to be enabled at vkCreateDevice. At vkCreateInstance and
164 application) layer inserted in the chain and the last array element is closest
172 (Linux)/semi-colon (Windows) separated list of layer names to enable. Order is
173 relevant with the first layer in the list being the topmost layer (closest to
174 the application) and the last layer in the list being the bottommost layer
183 layer VK\_LAYER\_LUNARG\_param\_checker on Windows or Linux is as follows:
194 layers regardless of which method is used to enable the layer (application or
200 application (or environment variable) by providing the layer name. Implicit
205 Explicitly enabling a layer that is implicitly enabled has no additional
206 effect: the layer will still be enabled implicitly by the loader.
208 Extensions are optional functionality provided by a layer, the loader or an
217 pLayerName parameter in these functions is used to select either a single layer
220 are enumerated. If pLayerName is equal to a discovered layer module name then
221 any extensions from that layer (which may be implicit or explicit) are
222 enumerated. Duplicate extensions (e.g. an implicit layer and ICD might report
224 ICD version is reported and the layer version is culled. Extensions must
241 if an enabled layer intercepts the call (e.g. vkDestroyDevice) the loader
614 - The loader will not call the ICD for vkEnumerate\*LayerProperties() as layer
615 properties are obtained from the layer libraries and layer JSON files.
616 - If an ICD library wants to implement a layer it can do so by having the
617 appropriate layer JSON manifest file refer to the ICD library file.
625 loader queries layer and extension information directly from the
629 Vulkan layer interface with the loader
645 files. For example, a layer shared library file may contain multiple
665 distinguishes a layer as implicit or explicit is by which registry key its
666 layer information file is referenced by.
673 layer, including the name or pathname of a shared library (".dll") file.
681 - (required) "name" - layer name
683 - (required) "type" - which layer chains should the layer be activated on.
692 - (required) "implementation\_version" - layer version, a single number
695 - (required) "description" - informative description of the layer.
710 multiple layers exist within the same shared library (or if a layer is in the
711 same shared library as an ICD), this must be specified to allow each layer to
720 environment variable and value required to enable an implicit layer. This
721 environment variable (which should vary with each "version" of the layer, as in
723 layer is not loaded. This is for application environments (e.g. Steam) which
724 want to enable a layer(s) only for applications that they launch, and allows
726 implicit layer(s).
729 environment variable and value required to disable an implicit layer. Note: in
730 rare cases of an application not working with an implicit layer, the
732 in order to "blacklist" the layer. This environment variable (which should vary
733 with each "version" of the layer, as in "DISABLE\_LAYER\_FOO\_1") must be set
735 "disable\_environment" variables are set, the implicit layer is disabled.
742 "layer": {
748 "description" : "LunarG HUD layer",
778 pathname to a layer shared library (".dll") file, which the loader will attempt
779 to load using LoadLibrary(). If the layer is specified via a relative pathname,
781 provides a layer that is in the same folder hierarchy as the rest of the
782 application files). If the layer is specified via a filename, the shared
788 There are no rules about the name of the layer shared library files.
797 folders that contain layer info files. Only the folder listed in
801 - The full pathname of a folder containing layer info files
813 files contain more information than ICD info files. For example, a layer shared
836 enabled explicitly. What distinguishes a layer as implicit or explicit is by
837 which directory its layer information file exists in.
850 - (required) "name" - layer name
852 - (required) "type" - which layer chains should the layer be activated on.
861 - (required) "implementation\_version" – layer version, a single number
864 - (required) "description" – informative description of the layer.
879 multiple layers exist within the same shared library (or if a layer is in the
880 same shared library as an ICD), this must be specified to allow each layer to
887 environment variable and value required to enable an implicit layer. This
888 environment variable (which should vary with each "version" of the layer, as in
890 layer is not loaded. This is for application environments (e.g. Steam) which
891 want to enable a layer(s) only for applications that they launch, and allows
893 implicit layer(s).
896 environment variable and value required to disable an implicit layer. Note: in
897 rare cases of an application not working with an implicit layer, the
899 in order to "blacklist" the layer. This environment variable (which should vary
900 with each "version" of the layer, as in "DISABLE\_LAYER\_FOO\_1") must be set
902 "disable\_environment" variables are set, the implicit layer is disabled.
908 "layer": {
914 "description" : "LunarG HUD layer",
943 pathname to a layer shared library (".so") file, which the loader will attempt
944 to load using dlopen(). If the layer is specified via a filename, the loader
949 required to do so. If the layer is specified via a relative pathname, it is
951 provides a layer that is in the same directory hierarchy as the rest of the
956 There are no rules about the name of the layer shared library files.
965 directories that contain layer info files. Only the directories listed in
969 - The full pathname of a directory containing layer info files
988 There are two key architectural features that drive the loader to layer library
993 Call chains are the links of calls for a given Vulkan command from layer module
994 to layer module with the loader and or the ICD being the bottom most command.
996 the loader with cooperation from the layer libraries. Instance call chains are
999 CreateDevice. A layer can intercept Vulkan instance commands, device commands
1000 or both. For a layer to intercept instance commands, it must participate in the
1001 instance call chain. For a layer to intercept device commands, it must
1005 Normally, when a layer intercepts a given Vulkan command, it will call down the
1006 instance or device chain as needed. The loader and all layer libraries that
1010 each layer is responsible for properly calling the next entity in the device or
1012 layer intercepts. For Vulkan commands that are not intercepted by a layer, or
1013 if the layer chooses to terminate a given Vulkan command by not calling down
1016 commands, that a layer intercepts is a dispatching mechanism by the layer
1029 #### Discovery of layer entry points
1031 For the layer libraries that have been discovered by the loader, their
1033 chain need to be available to the loader or whatever layer is before them in
1035 - A layer intercepting instance level Vulkan commands (aka an instance level
1036 layer) must implement a vkGetInstanceProcAddr type of function.
1037 - This vkGetInstanceProcAddr type function must be exported by the layer
1038 library. The name of this function is specified in various ways: 1) the layer
1042 - A layer intercepting device level Vulkan commands (aka a device level layer)
1044 - This vkGetDeviceProcAddr type function must be exported by the layer library.
1045 The name of this function is specified in various ways: 1) the layer manifest
1049 - A layer's vkGetInstanceProcAddr function (regardless of its name) must return
1052 - A layer's vkGetDeviceProcAddr function (regardless of its name) must return
1055 - There are no requirements on the names of the intercepting functions a layer
1058 - Currently a layer's VkGetInstanceProcAddr must be able to handle a VkInstance
1061 - Currently a layer's VkGetDeviceProcAddr must be able to handle a VkDevice
1068 - Other than the two vkGet*ProcAddr, all other functions intercepted by a layer
1069 need NOT be exported by the layer.
1070 - For any Vulkan command a layer intercepts which has a non-void return value,
1071 an appropriate value must be returned by the layer intercept function.
1072 - The layer intercept function must call down the chain to the corresponding
1073 Vulkan command in the next entity. Undefined results will occur if a layer
1078 addition to the intercept. For example, a layer intercepting vkQueueSubmit may
1080 vkQueueSubmit. Any additional calls inserted by a layer must be on the same
1085 - For each entry point a layer intercepts, it must keep track of the entry
1087 words, the layer must have a list of pointers to functions of the appropriate
1090 - A layer can use the VkLayerDispatchTable structure as a device dispatch table
1092 - A layer can use the VkLayerInstanceDispatchTable structure as a instance
1103 - A layer initializes its instance dispatch table within its vkCreateInstance
1105 - A layer initializes its device dispatch table within its vkCreateDevice
1123 by a layer.
1125 vkGetDeviceProcAddr used by a layer.
1126 - Given the above structures set up by the loader, layer must initialize their
1139 - Initialize your layer dispatch table by calling the next entity's
1175 // layer will store any persistent state it needs for
1179 // Create layer's dispatch table using GetInstanceProcAddr of
1180 // next layer in the chain.
1192 // Other layer initialization
1234 // layer will store any persistent state it needs for
1247 // Other layer initialization
1255 A layer may want to associate it's own private data with one or more Vulkan
1260 passing them down the chain. This implies the layer must intercept every Vulkan
1262 layer will see the wrapped object. Layers which wrap dispatchable objects must
1269 // whatever data layer wants to add to this object
1276 // whatever data layer wants to add to this object
1280 Alternatively, a layer may want to use a hash map to associate data with a
1282 dispatchable objects at a given level (eg device or instance) the layer may
1285 VkDevice or VkInstance object is not a great map key. Instead the layer should
1291 created object. Thus, the layer must fill in the dispatch table pointer if the
1292 loader trampoline will not do so. Common cases where a layer (or ICD) may create a
1301 the layer should copy the dispatch pointer, which is always the first entry in the structure, from …