X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fbackends%2Fvulkan%2Fdevice_backend.cpp;h=3be29c63c9524b04be53aedff3fe808222f4b334;hp=efdd596cdc873a1e3bcb02acb0263fe35e11de0e;hb=dd503e748c430d26b6adda57b59f04177e4105fa;hpb=b84ce32a8dfcacd54c3497c6e7facb5d65e82827 diff --git a/source/backends/vulkan/device_backend.cpp b/source/backends/vulkan/device_backend.cpp index efdd596c..3be29c63 100644 --- a/source/backends/vulkan/device_backend.cpp +++ b/source/backends/vulkan/device_backend.cpp @@ -1,8 +1,11 @@ +#include #include #include "device.h" #include "device_backend.h" #include "vulkan.h" +using namespace std; + namespace Msp { namespace GL { @@ -27,7 +30,11 @@ Graphics::VulkanOptions VulkanDevice::create_default_options() Graphics::VulkanOptions opts; opts.enable_geometry_shader = true; #ifdef DEBUG - opts.enable_validation = true; + const char *disable_ptr = getenv("MSPGL_DISABLE_VALIDATION"); + if(disable_ptr && *disable_ptr) + opts.enable_validation = !lexical_cast(string(disable_ptr)); + else + opts.enable_validation = true; opts.enable_debug_report = true; #endif return opts;