ndsol / volcano

Get started with Vulkan. Keep it simple, short and sweet. See https://github.com/ndsol/VolcanoSamples
GNU General Public License v3.0
5 stars 1 forks source link

Add a way to request custom layers #3

Closed volcanoauthors closed 5 years ago

volcanoauthors commented 7 years ago

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().

volcanoauthors commented 5 years ago

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).