diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-04-01 02:26:22 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-04-01 02:32:08 +0200 |
commit | 5c90d060d800ee6d26ce107ff7ff83b661911295 (patch) | |
tree | 68c3fae672070573c904e640d5c897bfbf32faa5 /src/video_core/renderer_vulkan/wrapper.h | |
parent | renderer_vulkan/wrapper: Add device handle (diff) | |
download | yuzu-5c90d060d800ee6d26ce107ff7ff83b661911295.tar yuzu-5c90d060d800ee6d26ce107ff7ff83b661911295.tar.gz yuzu-5c90d060d800ee6d26ce107ff7ff83b661911295.tar.bz2 yuzu-5c90d060d800ee6d26ce107ff7ff83b661911295.tar.lz yuzu-5c90d060d800ee6d26ce107ff7ff83b661911295.tar.xz yuzu-5c90d060d800ee6d26ce107ff7ff83b661911295.tar.zst yuzu-5c90d060d800ee6d26ce107ff7ff83b661911295.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_vulkan/wrapper.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/wrapper.h b/src/video_core/renderer_vulkan/wrapper.h index 6ac5a8f59..5d6a0227a 100644 --- a/src/video_core/renderer_vulkan/wrapper.h +++ b/src/video_core/renderer_vulkan/wrapper.h @@ -749,4 +749,44 @@ public: } }; +class PhysicalDevice { +public: + constexpr PhysicalDevice() noexcept = default; + + constexpr PhysicalDevice(VkPhysicalDevice physical_device, const InstanceDispatch& dld) noexcept + : physical_device{physical_device}, dld{&dld} {} + + constexpr operator VkPhysicalDevice() const noexcept { + return physical_device; + } + + VkPhysicalDeviceProperties GetProperties() const noexcept; + + void GetProperties2KHR(VkPhysicalDeviceProperties2KHR&) const noexcept; + + VkPhysicalDeviceFeatures GetFeatures() const noexcept; + + void GetFeatures2KHR(VkPhysicalDeviceFeatures2KHR&) const noexcept; + + VkFormatProperties GetFormatProperties(VkFormat) const noexcept; + + std::vector<VkExtensionProperties> EnumerateDeviceExtensionProperties() const; + + std::vector<VkQueueFamilyProperties> GetQueueFamilyProperties() const; + + bool GetSurfaceSupportKHR(u32 queue_family_index, VkSurfaceKHR) const; + + VkSurfaceCapabilitiesKHR GetSurfaceCapabilitiesKHR(VkSurfaceKHR) const noexcept; + + std::vector<VkSurfaceFormatKHR> GetSurfaceFormatsKHR(VkSurfaceKHR) const; + + std::vector<VkPresentModeKHR> GetSurfacePresentModesKHR(VkSurfaceKHR) const; + + VkPhysicalDeviceMemoryProperties GetMemoryProperties() const noexcept; + +private: + VkPhysicalDevice physical_device = nullptr; + const InstanceDispatch* dld = nullptr; +}; + } // namespace Vulkan::vk |