From f1d382b62d674616de7979f5f3d78f74ea31f0e0 Mon Sep 17 00:00:00 2001 From: assiduous Date: Mon, 3 Aug 2020 14:00:00 -0700 Subject: Added comparison opertors to SubpassDependencyDesc struct --- Graphics/GraphicsEngine/interface/RenderPass.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'Graphics/GraphicsEngine') diff --git a/Graphics/GraphicsEngine/interface/RenderPass.h b/Graphics/GraphicsEngine/interface/RenderPass.h index e9f3027d..3f822e0c 100644 --- a/Graphics/GraphicsEngine/interface/RenderPass.h +++ b/Graphics/GraphicsEngine/interface/RenderPass.h @@ -311,6 +311,29 @@ struct SubpassDependencyDesc /// A bitmask of ACCESS_FLAGS specifying a destination access mask. ACCESS_FLAGS DstAccessMask DEFAULT_INITIALIZER(ACCESS_FLAG_NONE); + +#if DILIGENT_CPP_INTERFACE + /// Tests if two structures are equivalent + + /// \param [in] RHS - reference to the structure to perform comparison with + /// \return + /// - True if all members of the two structures are equal. + /// - False otherwise + bool operator == (const SubpassDependencyDesc& RHS) const + { + return SrcSubpass == RHS.SrcSubpass && + DstSubpass == RHS.DstSubpass && + SrcStageMask == RHS.SrcStageMask && + DstStageMask == RHS.DstStageMask && + SrcAccessMask == RHS.SrcAccessMask && + DstAccessMask == RHS.DstAccessMask; + } + + bool operator != (const SubpassDependencyDesc& RHS) const + { + return !(*this == RHS); + } +#endif }; typedef struct SubpassDependencyDesc SubpassDependencyDesc; -- cgit v1.2.3