declarations.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // Copyright 2019 yuzu Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. namespace vk {
  6. class DispatchLoaderDynamic;
  7. }
  8. namespace Vulkan {
  9. constexpr vk::DispatchLoaderDynamic* dont_use_me_dld = nullptr;
  10. }
  11. #define VULKAN_HPP_DEFAULT_DISPATCHER (*::Vulkan::dont_use_me_dld)
  12. #define VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL 0
  13. #define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1
  14. #include <vulkan/vulkan.hpp>
  15. namespace Vulkan {
  16. // vulkan.hpp unique handlers use DispatchLoaderStatic
  17. template <typename T>
  18. using UniqueHandle = vk::UniqueHandle<T, vk::DispatchLoaderDynamic>;
  19. using UniqueAccelerationStructureNV = UniqueHandle<vk::AccelerationStructureNV>;
  20. using UniqueBuffer = UniqueHandle<vk::Buffer>;
  21. using UniqueBufferView = UniqueHandle<vk::BufferView>;
  22. using UniqueCommandBuffer = UniqueHandle<vk::CommandBuffer>;
  23. using UniqueCommandPool = UniqueHandle<vk::CommandPool>;
  24. using UniqueDescriptorPool = UniqueHandle<vk::DescriptorPool>;
  25. using UniqueDescriptorSet = UniqueHandle<vk::DescriptorSet>;
  26. using UniqueDescriptorSetLayout = UniqueHandle<vk::DescriptorSetLayout>;
  27. using UniqueDescriptorUpdateTemplate = UniqueHandle<vk::DescriptorUpdateTemplate>;
  28. using UniqueDevice = UniqueHandle<vk::Device>;
  29. using UniqueDeviceMemory = UniqueHandle<vk::DeviceMemory>;
  30. using UniqueEvent = UniqueHandle<vk::Event>;
  31. using UniqueFence = UniqueHandle<vk::Fence>;
  32. using UniqueFramebuffer = UniqueHandle<vk::Framebuffer>;
  33. using UniqueImage = UniqueHandle<vk::Image>;
  34. using UniqueImageView = UniqueHandle<vk::ImageView>;
  35. using UniqueInstance = UniqueHandle<vk::Instance>;
  36. using UniqueIndirectCommandsLayoutNVX = UniqueHandle<vk::IndirectCommandsLayoutNVX>;
  37. using UniqueObjectTableNVX = UniqueHandle<vk::ObjectTableNVX>;
  38. using UniquePipeline = UniqueHandle<vk::Pipeline>;
  39. using UniquePipelineCache = UniqueHandle<vk::PipelineCache>;
  40. using UniquePipelineLayout = UniqueHandle<vk::PipelineLayout>;
  41. using UniqueQueryPool = UniqueHandle<vk::QueryPool>;
  42. using UniqueRenderPass = UniqueHandle<vk::RenderPass>;
  43. using UniqueSampler = UniqueHandle<vk::Sampler>;
  44. using UniqueSamplerYcbcrConversion = UniqueHandle<vk::SamplerYcbcrConversion>;
  45. using UniqueSemaphore = UniqueHandle<vk::Semaphore>;
  46. using UniqueShaderModule = UniqueHandle<vk::ShaderModule>;
  47. using UniqueSurfaceKHR = UniqueHandle<vk::SurfaceKHR>;
  48. using UniqueSwapchainKHR = UniqueHandle<vk::SwapchainKHR>;
  49. using UniqueValidationCacheEXT = UniqueHandle<vk::ValidationCacheEXT>;
  50. using UniqueDebugReportCallbackEXT = UniqueHandle<vk::DebugReportCallbackEXT>;
  51. using UniqueDebugUtilsMessengerEXT = UniqueHandle<vk::DebugUtilsMessengerEXT>;
  52. } // namespace Vulkan