| 26 | static_assert(BX_COUNTOF(s_descriptorTypeToId) == DescriptorType::Count); |
| 27 | |
| 28 | DescriptorType::Enum idToDescriptorType(uint16_t _id) |
| 29 | { |
| 30 | for (uint32_t ii = 0; ii < BX_COUNTOF(s_descriptorTypeToId); ++ii) |
| 31 | { |
| 32 | if (s_descriptorTypeToId[ii].id == _id) |
| 33 | { |
| 34 | return s_descriptorTypeToId[ii].type; |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | return DescriptorType::Count; |
| 39 | } |
| 40 | |
| 41 | uint16_t descriptorTypeToId(DescriptorType::Enum _type) |
| 42 | { |