/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
 */

#pragma once

#include <set>
#include <string>
#include <vector>
#include <vulkan/vulkan.hpp>

#if VK_HEADER_VERSION > 302
// Vulkan 1.4.303 moved the dynamic dispatch loader definition,
// this is a workaround to allow building for both the old and the new verisons
namespace vk
{
	using DispatchLoaderDynamic = detail::DispatchLoaderDynamic;
}
#endif

namespace OpenVulkano::Vulkan
{
	class Debug
	{
	public:
		static std::set<std::string> GetAvailableValidationLayers();

		static std::vector<const char*> GetValidationLayers();

		static void SetupValidationLayers(const vk::Instance& instance, const vk::DebugReportFlagsEXT& flags, vk::DispatchLoaderDynamic& dispatchLoaderDynamic);

		static void CloseValidationLayers(const vk::Instance& instance, vk::DispatchLoaderDynamic& dispatchLoaderDynamic);
	};
}
