Index: ps/trunk/source/renderer/backend/vulkan/Device.cpp =================================================================== --- ps/trunk/source/renderer/backend/vulkan/Device.cpp +++ ps/trunk/source/renderer/backend/vulkan/Device.cpp @@ -674,7 +674,6 @@ std::unique_ptr CDevice::CreateGraphicsPipelineState( const SGraphicsPipelineStateDesc& pipelineStateDesc) { - UNUSED2(pipelineStateDesc); return CGraphicsPipelineState::Create(this, pipelineStateDesc); } @@ -778,8 +777,12 @@ void CDevice::OnWindowResize(const uint32_t width, const uint32_t height) { - UNUSED2(width); - UNUSED2(height); + if (!IsSwapChainValid() || + width != m_SwapChain->GetDepthTexture()->GetWidth() || + height != m_SwapChain->GetDepthTexture()->GetHeight()) + { + RecreateSwapChain(); + } } bool CDevice::IsTextureFormatSupported(const Format format) const Index: ps/trunk/source/renderer/backend/vulkan/SwapChain.h =================================================================== --- ps/trunk/source/renderer/backend/vulkan/SwapChain.h +++ ps/trunk/source/renderer/backend/vulkan/SwapChain.h @@ -62,6 +62,8 @@ const AttachmentLoadOp depthStencilAttachmentLoadOp, const AttachmentStoreOp depthStencilAttachmentStoreOp); + CTexture* GetDepthTexture() { return m_DepthTexture.get(); } + private: friend class CDevice;