diff options
| author | Mark Young <marky@lunarg.com> | 2016-06-13 14:49:53 -0600 |
|---|---|---|
| committer | Mark Young <marky@lunarg.com> | 2016-06-14 14:09:03 -0600 |
| commit | a3e077801c33c943553e9de9e7370f93169a0dc8 (patch) | |
| tree | 3301e5e4ad5aa535f7a9cbc720635c4913ddbed0 /loader/LoaderAndLayerInterface.md | |
| parent | 2307beb069a8da6fede656bb3d82bd40449f769d (diff) | |
| download | usermoji-a3e077801c33c943553e9de9e7370f93169a0dc8.tar.xz | |
loader: Fix GH607 by adding proper array support
JSON spec does not allow objects of the same name at the same
level. But, that's what we used to allow with "layer" definitions.
Update new file version to 1.0.1, add "layers" array object, and
add multiple "layer" definition warning.
Change-Id: I040f07897c689800364d243daf3c247f1b3cace7
Diffstat (limited to 'loader/LoaderAndLayerInterface.md')
| -rw-r--r-- | loader/LoaderAndLayerInterface.md | 172 |
1 files changed, 100 insertions, 72 deletions
diff --git a/loader/LoaderAndLayerInterface.md b/loader/LoaderAndLayerInterface.md index 69ad7819..e11923a8 100644 --- a/loader/LoaderAndLayerInterface.md +++ b/loader/LoaderAndLayerInterface.md @@ -738,42 +738,42 @@ See the section [Layer Library Manifest File](#LayerLibraryManifestFile) for mor ``` { -"file_format_version" : "1.0.0", -"layer": { - "name": "VK_LAYER_LUNARG_overlay", - "type": "INSTANCE", - "library_path": "vkOverlayLayer.dll" - "api_version" : "1.0.5", - "implementation_version" : "2", - "description" : "LunarG HUD layer", - "functions": { - "vkGetInstanceProcAddr": "OverlayLayer_GetInstanceProcAddr", - "vkGetDeviceProcAddr": "OverlayLayer_GetDeviceProcAddr" - }, - "instance_extensions": [ - { - "name": "VK_EXT_debug_report", - "spec_version": "1" - }, - { - "name": "VK_VENDOR_ext_x", - "spec_version": "3" - } - ], - "device_extensions": [ - { - "name": "VK_EXT_debug_marker", - "spec_version": "1", - "entrypoints": ["vkCmdDbgMarkerBegin", "vkCmdDbgMarkerEnd"] - } - ], - "enable_environment": { - "ENABLE_LAYER_OVERLAY_1": "1" - } - "disable_environment": { - "DISABLE_LAYER_OVERLAY_1": "" - } -} + "file_format_version" : "1.0.0", + "layer": { + "name": "VK_LAYER_LUNARG_overlay", + "type": "INSTANCE", + "library_path": "vkOverlayLayer.dll" + "api_version" : "1.0.5", + "implementation_version" : "2", + "description" : "LunarG HUD layer", + "functions": { + "vkGetInstanceProcAddr": "OverlayLayer_GetInstanceProcAddr", + "vkGetDeviceProcAddr": "OverlayLayer_GetDeviceProcAddr" + }, + "instance_extensions": [ + { + "name": "VK_EXT_debug_report", + "spec_version": "1" + }, + { + "name": "VK_VENDOR_ext_x", + "spec_version": "3" + } + ], + "device_extensions": [ + { + "name": "VK_EXT_debug_marker", + "spec_version": "1", + "entrypoints": ["vkCmdDbgMarkerBegin", "vkCmdDbgMarkerEnd"] + } + ], + "enable_environment": { + "ENABLE_LAYER_OVERLAY_1": "1" + } + "disable_environment": { + "DISABLE_LAYER_OVERLAY_1": "" + } + } } ``` @@ -786,6 +786,34 @@ application files). If the layer is specified via a filename, the shared library lives in the system's DLL search path (e.g. in the "C:\\Windows\\System32" folder). +If defining multiple layers in a single JSON file prior to "file\_format\_version" +1.0.1, you would simply define multiple "layer" objects. However, this is not +valid JSON syntax. Instead, you should now define "file\_format\_version" +1.0.1 (or newer) and use the new "layers" array object as seen in the +following example: + +``` +{ + "file_format_version" : "1.0.1", + "layers": [ + { + "name": "VK_LAYER_layer_name1", + "type": "INSTANCE", + ... + }, + { + "name": "VK_LAYER_layer_name2", + "type": "INSTANCE", + ... + } + ] +} +``` + +You could use the "layers" array object to define a single layer, as long as +your "file\_format\_version" is defined to at least 1.0.1. It is functionally the +same as using a single "layer" object. + There are no rules about the name of the text files (except the .json suffix). There are no rules about the name of the layer shared library files. @@ -849,42 +877,42 @@ See the section [Layer Library Manifest File](#LayerLibraryManifestFile) for mor ``` { -"file_format_version" : "1.0.0", -"layer": { - "name": "VK_LAYER_LUNARG_overlay", - "type": "INSTANCE", - "library_path": "libvkOverlayLayer.so" - "api_version" : "1.0.5", - "implementation_version" : "2", - "description" : "LunarG HUD layer", - "functions": { - "vkGetInstanceProcAddr": "OverlayLayer_GetInstanceProcAddr", - "vkGetDeviceProcAddr": "OverlayLayer_GetDeviceProcAddr" - }, - "instance_extensions": [ - { - "name": "VK_EXT_debug_report", - "spec_version": "1" - }, - { - "name": "VK_VENDOR_ext_x", - "spec_version": "3" - } - ], - "device_extensions": [ - { - "name": "VK_EXT_debug_marker", - "spec_version": "1", - "entrypoints": ["vkCmdDbgMarkerBegin", "vkCmdDbgMarkerEnd"] - } - ], - "enable_environment": { - "ENABLE_LAYER_OVERLAY_1": "1" - }, - "disable_environment": { - "DISABLE_LAYER_OVERLAY_1": "" - } -} + "file_format_version" : "1.0.0", + "layer": { + "name": "VK_LAYER_LUNARG_overlay", + "type": "INSTANCE", + "library_path": "libvkOverlayLayer.so" + "api_version" : "1.0.5", + "implementation_version" : "2", + "description" : "LunarG HUD layer", + "functions": { + "vkGetInstanceProcAddr": "OverlayLayer_GetInstanceProcAddr", + "vkGetDeviceProcAddr": "OverlayLayer_GetDeviceProcAddr" + }, + "instance_extensions": [ + { + "name": "VK_EXT_debug_report", + "spec_version": "1" + }, + { + "name": "VK_VENDOR_ext_x", + "spec_version": "3" + } + ], + "device_extensions": [ + { + "name": "VK_EXT_debug_marker", + "spec_version": "1", + "entrypoints": ["vkCmdDbgMarkerBegin", "vkCmdDbgMarkerEnd"] + } + ], + "enable_environment": { + "ENABLE_LAYER_OVERLAY_1": "1" + }, + "disable_environment": { + "DISABLE_LAYER_OVERLAY_1": "" + } + } } ``` The "library\_path" specifies either a filename, a relative pathname, or a full |
