X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fvulkan%2Fdevice_backend.cpp;h=9a8b930d713f6d100f3351a0a91040232c3f19f7;hb=2a70fecfbbe8708be2bdaa75d222dd5a889a8ed3;hp=b5d3db70548701d314a0b1239b829af9c0fd8faf;hpb=99ca354f18119f82f1adeca100cd665a8f640317;p=libs%2Fgl.git diff --git a/source/backends/vulkan/device_backend.cpp b/source/backends/vulkan/device_backend.cpp index b5d3db70..9a8b930d 100644 --- a/source/backends/vulkan/device_backend.cpp +++ b/source/backends/vulkan/device_backend.cpp @@ -1,8 +1,12 @@ +#include #include +#include #include "device.h" #include "device_backend.h" #include "vulkan.h" +using namespace std; + namespace Msp { namespace GL { @@ -13,8 +17,10 @@ VulkanDevice::VulkanDevice(Graphics::Window &wnd, const Graphics::VulkanOptions functions(new VulkanFunctions(context)), allocator(*static_cast(this)), 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 @@ -24,8 +30,13 @@ VulkanDevice::~VulkanDevice() 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;