From 837080396fed33ad074381c71239aabd8f3b02c6 Mon Sep 17 00:00:00 2001 From: Sebastian Gaida <sebastian-gaida@gmx.de> Date: Fri, 3 Sep 2021 18:40:26 +0200 Subject: [PATCH] [#89] add queueFamilyIndex as presentQueueIndex to Surface --- include/vkcv/Swapchain.hpp | 11 +++++++++-- src/vkcv/Swapchain.cpp | 4 ++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/include/vkcv/Swapchain.hpp b/include/vkcv/Swapchain.hpp index 9dbd6f08..c7741c65 100644 --- a/include/vkcv/Swapchain.hpp +++ b/include/vkcv/Swapchain.hpp @@ -22,6 +22,7 @@ namespace vkcv std::vector<vk::SurfaceFormatKHR> formats; vk::SurfaceCapabilitiesKHR capabilities; std::vector<vk::PresentModeKHR> presentModes; + uint32_t presentQueueIndex; }; Surface m_Surface; @@ -121,7 +122,13 @@ namespace vkcv */ [[nodiscard]] const vk::Extent2D& getExtent() const; - - }; + + /** + * @return the familyQueueIndex for the surface + */ + [[nodiscard]] + const uint32_t& getPresentQueueIndex() const; + + }; } diff --git a/src/vkcv/Swapchain.cpp b/src/vkcv/Swapchain.cpp index d0aa26db..dc5c73df 100644 --- a/src/vkcv/Swapchain.cpp +++ b/src/vkcv/Swapchain.cpp @@ -261,4 +261,8 @@ namespace vkcv uint32_t Swapchain::getImageCount() const { return m_ImageCount; } + + const uint32_t &Swapchain::getPresentQueueIndex() const { + return m_Surface.presentQueueIndex; + } } -- GitLab