vulkan_instance.h 1.2 KB

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