diff options
author | Rodrigo Locatti <reinuseslisp@airmail.cc> | 2020-04-13 22:08:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-13 22:08:04 +0200 |
commit | 7e4a132a77fd1c2d48b1410ac1f1da81869daa90 (patch) | |
tree | 79f2f04b5d7233eb3b57f86af3281f6ef5f30282 /src/video_core/renderer_vulkan/vk_swapchain.h | |
parent | Merge pull request #3651 from ReinUsesLisp/line-widths (diff) | |
parent | renderer_vulkan: Drop Vulkan-Hpp (diff) | |
download | yuzu-7e4a132a77fd1c2d48b1410ac1f1da81869daa90.tar yuzu-7e4a132a77fd1c2d48b1410ac1f1da81869daa90.tar.gz yuzu-7e4a132a77fd1c2d48b1410ac1f1da81869daa90.tar.bz2 yuzu-7e4a132a77fd1c2d48b1410ac1f1da81869daa90.tar.lz yuzu-7e4a132a77fd1c2d48b1410ac1f1da81869daa90.tar.xz yuzu-7e4a132a77fd1c2d48b1410ac1f1da81869daa90.tar.zst yuzu-7e4a132a77fd1c2d48b1410ac1f1da81869daa90.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_swapchain.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/video_core/renderer_vulkan/vk_swapchain.h b/src/video_core/renderer_vulkan/vk_swapchain.h index 2f3b2ccd5..a35d61345 100644 --- a/src/video_core/renderer_vulkan/vk_swapchain.h +++ b/src/video_core/renderer_vulkan/vk_swapchain.h @@ -7,7 +7,7 @@ #include <vector> #include "common/common_types.h" -#include "video_core/renderer_vulkan/declarations.h" +#include "video_core/renderer_vulkan/wrapper.h" namespace Layout { struct FramebufferLayout; @@ -20,7 +20,7 @@ class VKFence; class VKSwapchain { public: - explicit VKSwapchain(vk::SurfaceKHR surface, const VKDevice& device); + explicit VKSwapchain(VkSurfaceKHR surface, const VKDevice& device); ~VKSwapchain(); /// Creates (or recreates) the swapchain with a given size. @@ -31,12 +31,12 @@ public: /// Presents the rendered image to the swapchain. Returns true when the swapchains had to be /// recreated. Takes responsability for the ownership of fence. - bool Present(vk::Semaphore render_semaphore, VKFence& fence); + bool Present(VkSemaphore render_semaphore, VKFence& fence); /// Returns true when the framebuffer layout has changed. bool HasFramebufferChanged(const Layout::FramebufferLayout& framebuffer) const; - const vk::Extent2D& GetSize() const { + VkExtent2D GetSize() const { return extent; } @@ -48,15 +48,15 @@ public: return image_index; } - vk::Image GetImageIndex(std::size_t index) const { + VkImage GetImageIndex(std::size_t index) const { return images[index]; } - vk::ImageView GetImageViewIndex(std::size_t index) const { + VkImageView GetImageViewIndex(std::size_t index) const { return *image_views[index]; } - vk::Format GetImageFormat() const { + VkFormat GetImageFormat() const { return image_format; } @@ -65,30 +65,30 @@ public: } private: - void CreateSwapchain(const vk::SurfaceCapabilitiesKHR& capabilities, u32 width, u32 height, + void CreateSwapchain(const VkSurfaceCapabilitiesKHR& capabilities, u32 width, u32 height, bool srgb); void CreateSemaphores(); void CreateImageViews(); void Destroy(); - const vk::SurfaceKHR surface; + const VkSurfaceKHR surface; const VKDevice& device; - UniqueSwapchainKHR swapchain; + vk::SwapchainKHR swapchain; std::size_t image_count{}; - std::vector<vk::Image> images; - std::vector<UniqueImageView> image_views; - std::vector<UniqueFramebuffer> framebuffers; + std::vector<VkImage> images; + std::vector<vk::ImageView> image_views; + std::vector<vk::Framebuffer> framebuffers; std::vector<VKFence*> fences; - std::vector<UniqueSemaphore> present_semaphores; + std::vector<vk::Semaphore> present_semaphores; u32 image_index{}; u32 frame_index{}; - vk::Format image_format{}; - vk::Extent2D extent{}; + VkFormat image_format{}; + VkExtent2D extent{}; u32 current_width{}; u32 current_height{}; |