X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fvulkan%2Fdevice_backend.cpp;h=f1f2e3279160b209c1545df2279b91aa5ea2228c;hb=370eb9e6a1e54da52047ba843e25c36be9789209;hp=efdd596cdc873a1e3bcb02acb0263fe35e11de0e;hpb=51e8675e97b2363f86f5e93c72f81b8026bd24d3;p=libs%2Fgl.git diff --git a/source/backends/vulkan/device_backend.cpp b/source/backends/vulkan/device_backend.cpp index efdd596c..f1f2e327 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 { @@ -15,7 +18,8 @@ VulkanDevice::VulkanDevice(Graphics::Window &wnd, const Graphics::VulkanOptions destroy_queue(*static_cast(this)), synchronizer(*static_cast(this)), transfer_queue(*static_cast(this)), - pipeline_cache(*static_cast(this)) + pipeline_cache(*static_cast(this)), + descriptor_pool(*static_cast(this)) { } // Cause the destructor of RefPtr to be emitted here @@ -27,7 +31,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;