From 84f9ec9ff324a209569ba23992f5c54e979c9d1f Mon Sep 17 00:00:00 2001 From: assiduous Date: Sun, 22 Oct 2023 13:33:53 -0700 Subject: [PATCH] TextureFormatAttribs: added IsDepthStencil convenience method --- Graphics/GraphicsEngine/interface/GraphicsTypes.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Graphics/GraphicsEngine/interface/GraphicsTypes.h b/Graphics/GraphicsEngine/interface/GraphicsTypes.h index a2290874f..6c2450e94 100644 --- a/Graphics/GraphicsEngine/interface/GraphicsTypes.h +++ b/Graphics/GraphicsEngine/interface/GraphicsTypes.h @@ -4152,6 +4152,11 @@ struct TextureFormatAttribs } constexpr TextureFormatAttribs() noexcept {} + + constexpr bool IsDepthStencil() const noexcept + { + return ComponentType == COMPONENT_TYPE_DEPTH || ComponentType == COMPONENT_TYPE_DEPTH_STENCIL; + } #endif }; typedef struct TextureFormatAttribs TextureFormatAttribs;