Add loader enable/disable env vars #984
I would however make sure in the docs to use "driver manifest filenames" consistently. "driver names" was used a couple of times even though the docs say "drivers don’t have a name".
Add new environment variables that will allow the loader to filter layers and drivers in specific ways. This control should give developers ways to more quickly narrow down issues with a layer or driver. Also, it should give CI environments a mechanism to selectively enable only drivers and layers that are needed for testing. Add tests to support validating the new changes. Add documentation that describes the new changes and also create new loader debugging markdown document to help people debug issues with drivers or layers using the new filter enums. Rename the old get_environment.* source files to loader_environment.*. Then put all the environment variable helpers from loader.c into the new files.
Also remove duplication so that common code is used in several places.
When terminator_EnumerateDeviceExtensionProperties is called, the app now only checks that the type flag is implicit rather than building up a new list of implicit layers, as building a list could cause many suprious log messages and was unecessary. This commit also removes some redundant copies & for loops in the function.
This way users know exactly which version of the loader contains the new environment variables.
The previous commit altered vkCreateInstance erroring out if the application tries to enable an env-var disabled layer, so the tests need to be revised for it. This commit also makes lot of modifications to the tests in addition to that. Also adds tests for when the override layer is present and when implicit layer's enable-environment variables are present.