From 031191c54a33ef58f8ed556166eb4472eba6f05c Mon Sep 17 00:00:00 2001 From: hyzboy Date: Mon, 27 Sep 2021 20:54:13 +0800 Subject: [PATCH] added GetDescriptorSetsTypeName function. --- inc/hgl/graph/VK.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/inc/hgl/graph/VK.h b/inc/hgl/graph/VK.h index 4f2cecd1..53de8695 100644 --- a/inc/hgl/graph/VK.h +++ b/inc/hgl/graph/VK.h @@ -84,6 +84,19 @@ enum class DescriptorSetType const DescriptorSetType CheckDescriptorSetType(const char *str); +constexpr char *DescriptSetsTypeName[]= +{ + "Global","Material","Value","Renderable" +}; + +inline const char *GetDescriptorSetsTypeName(const enum class DescriptorSetType &type) +{ + if(!ENUM_CLASS_RANGE_CHECK(DescriptorSetType,type)) + return nullptr; + + return DescriptSetsTypeName[(size_t)type]; +} + struct PipelineLayoutData; class DescriptorSets;