diff --git a/include/vkcv/Swapchain.hpp b/include/vkcv/Swapchain.hpp index 9dbd6f08bef06b157e0d20933c05cd3eae565010..c7741c652926fad5d581ecf7465ed74af9e2db37 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 d0aa26db9c661ea40caf06349a72cc9188e791a9..dc5c73df3bbf7d701880c7ffd6ff2d04e8805da5 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; + } }