Skip to content

Commit 0635fb2

Browse files
committed
CVulkanCommon.h new convert functions to replace static_cast (more maintainable in the future)
1 parent 3e226ab commit 0635fb2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/nbl/video/CVulkanCommon.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,26 @@ static inline std::pair<VkDebugUtilsMessageSeverityFlagsEXT, VkDebugUtilsMessage
661661
return result;
662662
}
663663

664+
static inline VkBlendFactor getVkBlendFactorFromBlendFactor(const asset::E_BLEND_FACTOR in)
665+
{
666+
return static_cast<VkBlendFactor>(in);
667+
}
668+
669+
static inline VkBlendOp getVkBlendOpFromBlendOp(const asset::E_BLEND_OP in)
670+
{
671+
return static_cast<VkBlendOp>(in);
672+
}
673+
674+
static inline VkLogicOp getVkLogicOpFromLogicOp(const asset::E_LOGIC_OP in)
675+
{
676+
return static_cast<VkLogicOp>(in);
677+
}
678+
679+
static inline VkColorComponentFlags getVkColorComponentFlagsFromColorWriteMask(const uint64_t in)
680+
{
681+
return static_cast<VkColorComponentFlags>(in);
682+
}
683+
664684
}
665685

666686
#define __NBL_VIDEO_C_VULKAN_COMMON_H_INCLUDED__

0 commit comments

Comments
 (0)