Add proper support for IndexType and uint32 indices

This commit is contained in:
SirLynix
2022-04-04 09:02:00 +02:00
parent 66ff6cfa81
commit 9d526741b9
34 changed files with 188 additions and 57 deletions

View File

@@ -169,6 +169,19 @@ namespace Nz
return {};
}
inline VkIndexType ToVulkan(IndexType indexType)
{
switch (indexType)
{
case IndexType::U8: return VK_INDEX_TYPE_UINT8_EXT;
case IndexType::U16: return VK_INDEX_TYPE_UINT16;
case IndexType::U32: return VK_INDEX_TYPE_UINT32;
}
NazaraError("Unhandled IndexType 0x" + NumberToString(UnderlyingCast(indexType), 16));
return {};
}
inline VkAccessFlagBits ToVulkan(MemoryAccess memoryAccess)
{
switch (memoryAccess)