and validation layers explore the vulkan loader...the validation layers are used during app...

53
Explore the Vulkan Loader and Validation Layers

Upload: others

Post on 27-Dec-2019

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

Explore the Vulkan Loaderand Validation Layers

Page 2: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

Jon AshburnPrincipal EngineerVulkan Loader Architect

Courtney GoeltzenleuchterPrincipal Engineer Loader & Validation Layers Architect

Karl SchultzPrincipal EngineerValidation Layers and LunarG SDK

Tobin EhlisEngineerValidation Layers Lead Engineer

Explore the Vulkan Loader and Validation Layers

Mark LobodzinskiSenior Engineer Validation Layers

Rolando Caloca Sr. Rendering EngineerUnreal Engine 4 port to Vulkan

Page 3: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

● LunarG.com (http://www.lunarg.com)- BoF slides: https://lunarg.com/lunarg-birds-feather-session-siggraph-july-26-2016/

● Khronos Loader and Validation Layers github- github: https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers- Loader specification and architecture: https://github.com/KhronosGroup/Vulkan-

LoaderAndValidationLayers/blob/master/loader/LoaderAndLayerInterface.md

● Khronos Vulkan API- Vulkan landing page: https://www.khronos.org/vulkan/- Vulkan forum: https://forums.khronos.org/forumdisplay.php/114-Vulkan-High-

Efficiency-GPU-Graphics-and-Compute

● LunarG Vulkan SDK - Download SDK, report SDK issues, read documentation: https://vulkan.lunarg.com

Where to find info…

Page 4: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Vulkan Loader

• Vulkan Validation Layers

• Epic Games: Vulkan on Unreal Engine 4 - Validation Layers

• Q&A

Agenda

4

Page 5: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

Vulkan Loader

Page 6: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Validation

● Plug-n-play experience

● Extensible

Vulkan Loader - Goals

Page 7: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

••

• Layers- Vulkan has been designed to support plug-in layers- The loader is the consistent method for enabling layers- Same layers for Windows, Linux and Android

● Plug-n-play experience

● Extensible

Vulkan Loader - Goals

Page 8: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Layers- Vulkan has been designed to support plug-in layers- The loader is the consistent method for enabling layers- Same layers for Windows, Linux and Android

• Plug-n-play experience- Support multiple Vulkan devices on desktop

• Extensible

Vulkan Loader - Goals

Page 9: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

●●●●

• Layers- Vulkan has been designed to support plug-in layers- The loader is the consistent method for enabling layers- Same layers for Windows, Linux and Android

• Plug-n-play experience- Support multiple Vulkan devices on desktop

• Extensible- Layers can extend/enhance the API

- Performance profiling- Image capture for image-based regression testing- API Dump

- Layers or drivers can support extensions

Vulkan Loader - Goals

Page 10: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Open source- Developed by LunarG, owned by Khronos

• JSON manifest files

Vulkan Loader - Windows & Linux

●●

10

Page 11: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Open source- Developed by LunarG, owned by Khronos

• JSON manifest files- Encode library details in json files- Security, lower system impact

Vulkan Loader - Windows & Linux

●●

11

Page 12: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Open source- Developed by LunarG, owned by Khronos

• JSON manifest files- Encode library details in json files- Security, lower system impact

Vulkan Loader - Windows & Linux

●●●

○○

12

Page 13: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Search paths for driver and layer json manifest files- Linux: /etc/vulkan/*, /usr/share/vulkan/*, $HOME/.local/share/vulkan/*- Windows: HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\*- Environment override: VK_LAYER_PATH and VK_ICD_FILENAMES

• Implicit layers

• Other useful environment variables

Vulkan Loader - Windows & Linux

● Linux: /etc/vulkan/*, /usr/share/vulkan/*, $HOME/.local/share/vulkan/*● Windows: registry HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\*● environment variables can be used to override these search paths (VK_LAYER_PATH

and VK_ICD_FILENAMES)

13

Page 14: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Search paths for driver and layer json manifest files- Linux: /etc/vulkan/*, /usr/share/vulkan/*, $HOME/.local/share/vulkan/*- Windows: registry HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\*- Environment override VK_LAYER_PATH and VK_ICD_FILENAMES

• Implicit layers- Automatically enabled by the loader- Disable if needed- Limited environments

• Other useful environment variables

Vulkan Loader - Windows & Linux

● platform installed layers such as the Steam overlay● enabled automatically by the loader rather than by the app● for security each implicit layer must have a environment variable disable● environment variable for enabling in limited environments within a platform

14

Page 15: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Search paths for driver and layer json manifest files- Linux: /etc/vulkan/*, /usr/share/vulkan/*, $HOME/.local/share/vulkan/*- Windows: registry HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\*- Environment override VK_LAYER_PATH and VK_ICD_FILENAMES

• Implicit layers- Steam overlay- Automatically enabled by the loader- Disable if needed- Limited environments

• Other useful environment variables- VK_INSTANCE_LAYERS= layers to be enabled at CreateInstance- VK_LOADER_DEBUG= (all, error, info, warn, debug)

Vulkan Loader - Windows & Linux

● VK_INSTANCE_LAYERS= a list of layers to be enabled at CreateInstance● VK_LOADER_DEBUG= (all, error, info, warn, debug) log loader messages to (debug)

console

15

Page 16: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Same loader-layer interface, but own code- See LoaderAndLayerInterface.md for details

• Nougat / Android-24

Vulkan Loader - Android

●○○

16

Page 17: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Same loader-layer interface, but own code- See LoaderAndLayerInterface.md for details

• Nougat / Android-24- Includes Vulkan headers and vulkan.so library to link against- Android loader available on all Nougat devices- Some support on Marshmallow (e.g. NVIDIA Shield Tablet and Shield

Console, Samsung S7)- Use vkEnumeratePhysicalDevices to determine if Vulkan is supported- Layer source & binaries included with Android NDK v12 and newer

Details: https://developer.android.com/ndk/guides/graphics/index.html

Vulkan Loader - Android

17

Page 18: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Layers- No json, layers must implement introspection functions (e.g.

vkEnumerateInstanceLayerProperties)- Same layer source as Windows/Linux- No implicit layers.- Latest layer source on Github

• Applications own Layers

Vulkan Loader - Android

18

Page 19: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Layers- No json, layers must implement introspection functions (e.g.

vkEnumerateInstanceLayerProperties)- Same layer source as Windows/Linux- No implicit layers.- Latest layer source on Github

• Applications own Layers- Application must include layers in apk- No “VK_LAYER_LUNARG_standard_validation”- Debuggable application can enumerate and enable layers located in

/data/local/vulkan/debug.- Check logcat for loader messages

Vulkan Loader - Android

19

Page 20: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

Vulkan Validation Layers

Page 21: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

Validation Layers - Overview & future

threading

parameter_validation

object_tracker

image

core_validation

swapchain

unique_objects

Vulkan Application

Gfx Driver

VK

_LA

YER

_LU

NA

RG

_st

and

ard

_va

lidat

ion

The

distant

future

core_validation

Single layer presented to

loader

Stores shared state

Dispatch checks to separate modules

Vulkan App

Gfx Driver

threading

params

descriptor sets

memory

shaders

...

swapchain

Targ

eted

Fu

nct

ion

al M

odu

les

?

?

?

?

?

?

?

Selective enable w/ levels

Exp

licit

ord

erin

g r

equ

ired

on

An

dro

id first

last

early

early

late

late

late

The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an application, the app should be “validation clean” meaning that it runs without triggering any errors. In release mode the validation layers will not be enabled so they have no performance impact for a release app.

● Threading -- Checks that objects are not violating threading restrictions● Parameter Validation -- Stateless API parameter validation - valid

usage, validity, device limits, etc.● Object Tracker -- Validates objects for correctness, proper creation,

and lifetime● Image -- Validates items related to image generation and usage● Core Validation -- Draw_state, shader_checker, mem_tracker,

device_limits. Main layer for validation● Swapchain -- Validates swapchain-related API calls ● Unique Objects -- Remaps object handles to enforce that they are

unique

Layer ordering requires threading at the top of the chain and unique_objects at the bottom. This must be explicitly enabled when requesting layers on Android. On desktop the alternative, single meta-layer “VK_LAYER_LUNARG_standard_validation” can be used.

In the future we’d like to move to a single layer that handles all of the top-level intercepts. This layer then dispatches work for checks to specific functional 21

Page 22: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

domain modules. These modules will be able to be enabled and disabled as a whole using “level” flags. This will allow for more fine-grained control so that early on in app development, all levels can be turned on, then, as sections of code solidify those areas of validation can be selectively disabled to improve performance.

Also, by consolidating to single layer it will simplify enabling layers for app developers going forward in that the list of layers will never change. Developers who are interested in the fine-grained control of levels can use that capability, while other developers can just run with all levels enabled. The checks may also be divided into 2-3 “meta-levels” that capture broad swaths of validation capability.

Page 23: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Validation Layer Output- Debug Callbacks

- Leverage layer settings file

- Debug callbacks return true/false to continue with subject API call

Validation Layers - Usage

Page 24: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Validation Layer Output- Debug Callbacks

- Temp- Default- Application

- Leverage layer settings file

- Debug callbacks return true/false to continue with subject API call

Validation Layers - Usage

Page 25: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Validation Layer Output- Debug Callbacks

- Temp- Default- Application

- Leverage layer settings file- Set level info, warn, error, perf_warn- Output to VK_DBG_LAYER_ACTION_LOG_MSG or

VK_DBG_LAYER_ACTION_DEBUG_OUTPUT

- Debug callbacks return true/false to continue with subject API call

Validation Layers - Usage

Page 26: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Validation Layer Output- Debug Callbacks

- Temp- Default- Application

- Leverage layer settings file- Set level info, warn, error, perf_warn- Output to VK_DBG_LAYER_ACTION_LOG_MSG or

VK_DBG_LAYER_ACTION_DEBUG_OUTPUT

- Debug callbacks return true/false to continue with subject API call

Validation Layers - Usage

Page 27: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

LAYER DEPENDENCIES: Examples -- unique_objects, parameter validation, object tracker, etc.

● Order does matter. unique_objects must be closest to the driver● threading, parameter_validation and object_tracker need to go early in the chain to

prevent invalid references, etc.● Easiest way (on desktop) is to use the standard_validation meta-layer. On mobile,

use the list referenced in vk_validation_layer_details.md or layers.html● For performance, some layers can be disabled temporarily -- threading, uniq

ERRORS can cascade to cause further validation failures

WARNING is a signal to make sure you know what you are doing, NOT a failure.

API-dump: Like many of us used to do with APITrace, we can follow execution and dependencies through time. EG., Layout Transitions -- Many reports of incorrect validation - most turn out to be application-side issues. API-dump is excellent for this.

VK_LOADER_DEBUG=all useful for validating that layers are getting loaded correctly

- Use when possible- Address s immediately - errors result in undefined behavior and often to

crashes- does not imply incorrect behavior- The layer is your friend- Debug layer loading issues with VK_LOADER_DEBUG=all

Validation Layers - Usage• Best Practices

Page 28: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Activity- For SDKs 1.0.1 through 1.0.21 (8 SDKs over about 6 months):

- 1450+ commits- 222+ Github and 180+ LunarXchange issues closed

• Coverage

Validation Layers - Status

Page 29: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Activity- For SDKs 1.0.1 through 1.0.21 (8 SDKs over ~ 6 months):

- 1450+ commits- 222+ Github and 180+ LunarXchange issues resolved

• Coverage- All areas of the spec have coverage - ongoing work in thinner

areas- Valid usage coverage is in the 60-70% range at a minimum- Areas needing additional attention:

- Compute- Sparse resources- Compressed format validation

Validation Layers - Status

Page 30: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• For GitHub issues for both the loader and layers- Provide test case for issue- Pull requests preferred!- See CONTRIBUTING file in the GitHub repo for details- https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers

• For validation layer issues- Submit issues for false positives as well as for missing validation checks

• For SDK-specific issues- Report issues with SDK or issues related to loader and layers- Ask questions- Submit to LunarXchange @ https://vulkan.lunarg.com

How You Can Help: submit issues

Page 31: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

Vulkan on UE4: Validation Layers

Page 32: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• What to expect• Be sure to check out tomorrow’s talk!

- Will explain how UE4 works with Vulkan and the Protostar demo

Vulkan on UE4: Validation Layers

Page 33: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Use the Validation Layers!- To find bugs:

- Try to draw using deleted sampler- Present using uninitialized image/backbuffer

- To diagnose cross-platform issues:- Missing resource transitions/barriers on images- Memory leaks- Bad bits/properties

- To check for performance issues:- Writing to disabled attachments

• Vital for getting UE4 up & running!

Vulkan on UE4: Key Learnings

Page 34: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Draw using deleted Sampler- VK ERROR: [OBJTRACK] Code 4 : Invalid VkSampler Object 0x443

Vulkan on UE4: Validations

Page 35: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Present with uninitialized image/backbuffer- VK ERROR: [MEM] Code 12 : vkQueuePresentKHR(): Cannot read invalid

swapchain image 0x42a, please fill the memory before using.

Vulkan on UE4: Validations

Page 36: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

Vulkan on UE4: Bad image layouts

Page 37: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

Vulkan on UE4: Missing barriers

Page 38: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

Vulkan on UE4: Missing barriers

Page 39: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Memory leak- VK ERROR: [OBJTRACK] Code 3 : OBJ ERROR :

VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT object 0x43d has not been destroyed.

Vulkan on UE4: Validations

Page 40: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Cross platform potential issues- VK ERROR: [DS] Code 27 : vkUpdateDescriptorsSets() failed write update

validation for Descriptor Set 0x17de with error: Write update to descriptor in set 00000000000017DE binding #1 failed with error message: Attempted write update to combined image sampler descriptor failed due to: ImageView (00000000000017AC) has layout VK_IMAGE_LAYOUT_GENERAL and is using depth/stencil image of format VK_FORMAT_D24_UNORM_S8_UINT but it has both STENCIL and DEPTH aspects set, which is illegal. When using a depth/stencil image in a descriptor set, please only set either VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT depending on whether it will be used for depth reads or stencil reads respectively.

Vulkan on UE4: Validations

Page 41: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Cross platform potential issues- VK ERROR: [DS] Code 27 : vkUpdateDescriptorsSets() failed write update

validation for Descriptor Set 0x17de [...]

Vulkan on UE4: Validations

Page 42: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• But:- Be wary of runtime performance cost- Selectively enable validation layers:

- Start with all the layers:- VK_LAYER_LUNARG_standard_validation

- At minimum keep:- VK_LAYER_LUNARG_parameter_validation

- Mem leaks:- VK_LAYER_LUNARG_object_tracker

Vulkan on UE4: Layer Performance

Page 43: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

Vulkan on UE4: All Validation Layers On

Page 44: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

Vulkan on UE4: No Validation Layers

Page 45: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• In this sample (x64 optimized)- ~80 draw calls- Draw call time: 3.14ms -> 0.26ms- vkUpdateDescriptorSets: 0.81ms ->0.02ms- vkCmdBindPipeline and BindDescriptorSets: 1.11ms->0.

05ms

Vulkan on UE4: Layer Performance

Page 46: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Step into Validation Layers source code!- Immensely useful to find out *why* it’s failing- Even after reading the spec, it might not be clear *how*

it’s supposed to work, so the source will guide you on the how

• Continuously improving- Every SDK has had more information added and catches

more error/perf cases• But:

- All software has bugs :)- Make sure a new warning is not a bug in the validation

layer itself!

Vulkan on UE4: Key Learnings

Page 47: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• But wait, there’s more!- With great power comes more complexity!- Layer usage is non-negotiable :)- Having a second machine is useful as sometimes it *is* a

driver issue...

Vulkan on UE4

Page 48: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

Vulkan on UE4: Sad Trombone

Page 49: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

• Finally...- Write your own layers!- Report bugs!- Contribute!

• Thanks!

Vulkan on UE4

Page 50: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

● LunarG.com (http://www.lunarg.com)- BoF slides: https://lunarg.com/lunarg-birds-feather-session-siggraph-july-26-2016/

● Khronos Loader and Validation Layers github- github: https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers- Loader specification and architecture: https://github.com/KhronosGroup/Vulkan-

LoaderAndValidationLayers/blob/master/loader/LoaderAndLayerInterface.md

● Khronos Vulkan API- Vulkan landing page: https://www.khronos.org/vulkan/- Vulkan forum: https://forums.khronos.org/forumdisplay.php/114-Vulkan-High-

Efficiency-GPU-Graphics-and-Compute

● LunarG Vulkan SDK - Download SDK, report SDK issues, read documentation: https://vulkan.lunarg.com

Where to find info…

Page 51: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

BACKUP SLIDES

Page 52: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

QUESTIONS1) If I was worried about perf with layers enabled, what is the minimum validation you would recommend?2) What could cause my application to work when layers are enabled, but fail when layers are disabled?

(unique objects, threading locking, bugs in layers may hide incorrect behavior...)3) Where can we find info on suggested behaviours to consider when creating a new layer? (i.e. no wrapping,

continue down the call-chain, loader and layer interface guide, look at existing layers, …)4) Can I write a layer and get it added to Android? (common layer open source ecosystem, contribute and ends

up on all platforms including Android if you did a good job)5) What if I wanted to insert my own layer in the middle of the standard validation layers?6) What happened to device layers?7) Why isn’t the loader owned by the OS like it is on OpenGL? (MS doesn’t do this….)8) Can I write my own loader? (yes, but why?)9) Where is the specification for the layers? (no formal spec, look at validation layer implementation, see

loader-layer interface document in the SDK)10) Should there be formal spec definition of validation cases? (spec describes correct behavior. many many

cases for incorrect behavior and almost impossible to specify)11) What are the most important validation tasks going fwd? (coverage of valid usage cases, performance, code

clean up)12) Why does performance take such a hit with my multi-threaded app when I turn on validation? Plans to

improve? (validation is complex, many un-optimized locks, work is ongoing to improve)13) Can a Vulkan application run on Android Marshmallow?

Page 53: and Validation Layers Explore the Vulkan Loader...The Validation layers are used during app development to flag errors in the application’s use of the API. Prior to releasing an

Instance ExtensionsInstance extensions are intended to cover / affect all Vulkan devices, layers, etc. Current instance extensions all use different aggregation mechanisms that are implemented inside the loader. We expect future instance extensions to likewise require specific loader support and recommend developers to avoid them if possible.

Device ExtensionsDevice extensions are implemented in drivers and/or layers and shouldn’t require specific loader support.

Vulkan Loader - Extensions

53