From 54e6338c9bf87719908b173ab9023c7b56a9df6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 27 Oct 2020 16:00:15 +0100 Subject: 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. --- core/engine.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/engine.h') diff --git a/core/engine.h b/core/engine.h index fef330c0c1..799773c687 100644 --- a/core/engine.h +++ b/core/engine.h @@ -64,6 +64,7 @@ private: uint64_t _physics_frames = 0; float _physics_interpolation_fraction = 0.0f; bool abort_on_gpu_errors = false; + bool use_validation_layers = false; uint64_t _idle_frames = 0; bool _in_physics = false; @@ -127,6 +128,7 @@ public: String get_license_text() const; bool is_abort_on_gpu_errors_enabled() const; + bool is_validation_layers_enabled() const; Engine(); virtual ~Engine() {} -- cgit v1.2.3