Add proper support for IndexType and uint32 indices
This commit is contained in:
@@ -25,6 +25,7 @@ namespace Nz
|
||||
inline VkCullModeFlagBits ToVulkan(FaceSide faceSide);
|
||||
inline VkPolygonMode ToVulkan(FaceFilling faceFilling);
|
||||
inline VkFrontFace ToVulkan(FrontFace frontFace);
|
||||
inline VkIndexType ToVulkan(IndexType indexType);
|
||||
inline VkAccessFlagBits ToVulkan(MemoryAccess memoryAccess);
|
||||
inline VkAccessFlags ToVulkan(MemoryAccessFlags memoryAccessFlags);
|
||||
inline VkPipelineStageFlagBits ToVulkan(PipelineStage pipelineStage);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Nz
|
||||
void BeginDebugRegion(const std::string_view& regionName, const Color& color) override;
|
||||
void BeginRenderPass(const Framebuffer& framebuffer, const RenderPass& renderPass, const Recti& renderRect, const ClearValues* clearValues, std::size_t clearValueCount) override;
|
||||
|
||||
void BindIndexBuffer(const RenderBuffer& indexBuffer, UInt64 offset = 0) override;
|
||||
void BindIndexBuffer(const RenderBuffer& indexBuffer, IndexType indexType, UInt64 offset = 0) override;
|
||||
void BindPipeline(const RenderPipeline& pipeline) override;
|
||||
void BindShaderBinding(UInt32 set, const ShaderBinding& binding) override;
|
||||
void BindShaderBinding(const RenderPipelineLayout& pipelineLayout, UInt32 set, const ShaderBinding& binding) override;
|
||||
|
||||
Reference in New Issue
Block a user