Vulkan: Make validation layers optional

They're now disabled by default, and can be enabled with the command line
argument `--vk-layers`.

When enabled, the errors about them being missing are now warnings, as
users were confused and thought this meant Vulkan is broken for them.

Fix crash in `~VulkanContext` when validation layers are disabled (exposed by
this PR since before they could not be disabled without source modification).

Also moved VulkanContext member initializations to header.

Fixes #37102.
This commit is contained in:
Rémi Verschelde 2020-10-27 16:00:15 +01:00
parent 67f64ef4fe
commit 54e6338c9b
No known key found for this signature in database
GPG key ID: C3336907360768E1
6 changed files with 53 additions and 47 deletions

View file

@ -29,6 +29,7 @@
/*************************************************************************/
#include "vulkan_context_android.h"
#include <vulkan/vulkan_android.h>
const char *VulkanContextAndroid::_get_platform_surface_extension() const {