added GetDescriptorSetsTypeName function.

This commit is contained in:
hyzboy 2021-09-27 20:54:13 +08:00
parent 1cf6d48d02
commit 031191c54a

View File

@ -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;