Go to the documentation of this file.
53 const NativeWindow& Window);
77 return m_pBackBufferRTV[m_BackBufferIndex];
85 void CreateVulkanSwapChain();
86 void InitBuffersAndViews();
89 void WaitForImageAcquiredFences();
90 void ReleaseSwapChainResources(
DeviceContextVkImpl* pImmediateCtxVk,
bool DestroyVkSwapChain);
92 const NativeWindow m_Window;
94 std::shared_ptr<const VulkanUtilities::VulkanInstance> m_VulkanInstance;
96 Uint32 m_DesiredBufferCount = 0;
98 VkSurfaceKHR m_VkSurface = VK_NULL_HANDLE;
99 VkSwapchainKHR m_VkSwapChain = VK_NULL_HANDLE;
100 VkFormat m_VkColorFormat = VK_FORMAT_UNDEFINED;
106 VkExtent2D m_SurfaceIdentityExtent = {};
109 VkSurfaceTransformFlagBitsKHR m_CurrentSurfaceTransform = VK_SURFACE_TRANSFORM_FLAG_BITS_MAX_ENUM_KHR;
112 std::vector<RefCntAutoPtr<ManagedSemaphore>> m_ImageAcquiredSemaphores;
113 std::vector<RefCntAutoPtr<ManagedSemaphore>> m_DrawCompleteSemaphores;
114 std::vector<VulkanUtilities::FenceWrapper> m_ImageAcquiredFences;
116 std::vector<RefCntAutoPtr<ITextureViewVk>, STDAllocatorRawMem<RefCntAutoPtr<ITextureViewVk>>> m_pBackBufferRTV;
118 std::vector<bool, STDAllocatorRawMem<bool>> m_SwapChainImagesInitialized;
119 std::vector<bool, STDAllocatorRawMem<bool>> m_ImageAcquiredFenceSubmitted;
121 RefCntAutoPtr<ITextureViewVk> m_pDepthBufferDSV;
123 Uint32 m_SemaphoreIndex = 0;
124 uint32_t m_BackBufferIndex = 0;
125 bool m_IsMinimized =
false;
126 bool m_VSyncEnabled =
true;
Base interface for a reference counter object that stores the number of strong and weak references an...
Definition: ReferenceCounters.h:44
Render device implementation in Vulkan backend.
Definition: RenderDeviceVkImpl.hpp:58
virtual void Present(Uint32 SyncInterval) override final
Implementation of ISwapChain::Present() in Vulkan backend.
Definition: SwapChainVkImpl.cpp:680
virtual ITextureViewVk * GetCurrentBackBufferRTV() override final
Implementation of ISwapChain::GetCurrentBackBufferRTV() in Vulkan backend.
Definition: SwapChainVkImpl.hpp:74
virtual void Resize(Uint32 NewWidth, Uint32 NewHeight, SURFACE_TRANSFORM NewPreTransform) override final
Implementation of ISwapChain::Resize() in Vulkan backend.
Definition: SwapChainVkImpl.cpp:870
SURFACE_TRANSFORM
The transform applied to the image content prior to presentation.
Definition: GraphicsTypes.h:1315
virtual void SetWindowedMode() override final
Implementation of ISwapChain::SetWindowedMode() in Vulkan backend.
Definition: SwapChainVkImpl.cpp:973
#define IMPLEMENT_QUERY_INTERFACE_IN_PLACE(InterfaceID, ParentClassName)
Definition: ObjectBase.hpp:59
Display mode attributes.
Definition: GraphicsTypes.h:1269
#define DILIGENT_CALL_TYPE
Definition: CommonDefinitions.h:45
Uint32 BufferCount
The number of buffers in the swap chain.
Definition: GraphicsTypes.h:1379
Base implementation of the swap chain.
Definition: SwapChainBase.hpp:51
~SwapChainVkImpl()
Definition: SwapChainVkImpl.cpp:526
Swap chain description.
Definition: GraphicsTypes.h:1347
uint32_t Uint32
32-bit unsigned integer
Definition: BasicTypes.h:51
virtual ITextureViewVk * GetDepthBufferDSV() override final
Implementation of ISwapChain::GetDepthBufferDSV() in Vulkan backend.
Definition: SwapChainVkImpl.hpp:81
Device context implementation in Vulkan backend.
Definition: DeviceContextVkImpl.hpp:67
virtual void SetFullscreenMode(const DisplayModeAttribs &DisplayMode) override final
Implementation of ISwapChain::SetFullscreenMode() in Vulkan backend.
Definition: SwapChainVkImpl.cpp:969
SwapChainDesc m_SwapChainDesc
Swap chain description.
Definition: SwapChainBase.hpp:122
Swap chain implementation in Vulkan backend.
Definition: SwapChainVkImpl.hpp:44
#define VERIFY_EXPR(...)
Definition: DebugUtilities.hpp:79
virtual VkSwapchainKHR GetVkSwapChain() override final
Implementation of ISwapChainVk::GetVkSwapChain().
Definition: SwapChainVkImpl.hpp:71
Exposes Vulkan-specific functionality of a texture view object.
Definition: TextureViewVk.h:51
SwapChainVkImpl(IReferenceCounters *pRefCounters, const SwapChainDesc &SwapChainDesc, class RenderDeviceVkImpl *pRenderDeviceVk, class DeviceContextVkImpl *pDeviceContextVk, const NativeWindow &Window)
Definition: SwapChainVkImpl.cpp:39
The library uses Direct3D-style math:
Definition: AdvancedMath.hpp:37