vulkan_instance.h 1.1 KB

123456789101112131415161718192021222324252627282930
  1. // SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include "common/common_types.h"
  5. #include "common/dynamic_library.h"
  6. #include "core/frontend/emu_window.h"
  7. #include "video_core/vulkan_common/vulkan_wrapper.h"
  8. namespace Vulkan {
  9. /**
  10. * Create a Vulkan instance
  11. *
  12. * @param library Dynamic library to load the Vulkan instance from
  13. * @param dld Dispatch table to load function pointers into
  14. * @param required_version Required Vulkan version (for example, VK_API_VERSION_1_1)
  15. * @param window_type Window system type's enabled extension
  16. * @param enable_validation Whether to enable Vulkan validation layers or not
  17. *
  18. * @return A new Vulkan instance
  19. * @throw vk::Exception on failure
  20. */
  21. [[nodiscard]] vk::Instance CreateInstance(
  22. const Common::DynamicLibrary& library, vk::InstanceDispatch& dld, u32 required_version,
  23. Core::Frontend::WindowSystemType window_type = Core::Frontend::WindowSystemType::Headless,
  24. bool enable_validation = false);
  25. } // namespace Vulkan