language.cpp currently only enables VK_LAYER_LUNARG_standard_validation (the code must enable the desired layer AND the layer must be specified in VK_INSTANCE_LAYERS).
It should be fairly easy to get available instance layers (before Instance::ctorError; probably before even instantiating any Instance).
Then a std::vector<std::string> can be added to Instance to request specific layers.
If a requested layer is not found, ignore the request. The app can check which layers were actually enabled after Instance::ctorError().
The Vulkan Loader has been refactored; layers are now controlled by the VK_INSTANCE_LAYERS environment variable (they no longer must be enabled in the code).
It should be fairly easy to get available instance layers (before Instance::ctorError; probably before even instantiating any Instance).
Then a
std::vector<std::string>
can be added to Instance to request specific layers.If a requested layer is not found, ignore the request. The app can check which layers were actually enabled after Instance::ctorError().