public void EnableDebugCallback(VkDebugReportFlagsEXT flags = VkDebugReportFlagsEXT.WarningEXT | VkDebugReportFlagsEXT.ErrorEXT)
        {
            _debugCallbackFunc = DebugCallback;
            IntPtr debugFunctionPtr = Marshal.GetFunctionPointerForDelegate(_debugCallbackFunc);
            VkDebugReportCallbackCreateInfoEXT debugCallbackCI = VkDebugReportCallbackCreateInfoEXT.New();

            debugCallbackCI.flags       = flags;
            debugCallbackCI.pfnCallback = debugFunctionPtr;
            FixedUtf8String debugExtFnName = "vkCreateDebugReportCallbackEXT";
            IntPtr          createFnPtr    = vkGetInstanceProcAddr(_instance, debugExtFnName);
            vkCreateDebugReportCallbackEXT_d createDelegate = Marshal.GetDelegateForFunctionPointer <vkCreateDebugReportCallbackEXT_d>(createFnPtr);

            createDelegate(_instance, &debugCallbackCI, IntPtr.Zero, out _debugCallbackHandle);
        }
 protected override void PlatformDispose()
 {
     _scInfo.Dispose();
     if (_debugCallbackFunc != null)
     {
         _debugCallbackFunc = null;
         FixedUtf8String debugExtFnName = "vkDestroyDebugReportCallbackEXT";
         IntPtr          destroyFuncPtr = vkGetInstanceProcAddr(_instance, debugExtFnName);
         vkDestroyDebugReportCallbackEXT_d destroyDel
             = Marshal.GetDelegateForFunctionPointer <vkDestroyDebugReportCallbackEXT_d>(destroyFuncPtr);
         destroyDel.Invoke(_instance, _debugCallbackHandle, null);
     }
     vkDestroyInstance(_instance, null);
 }