Vulkan: use correct vertex layout for calculating vertex count

This commit is contained in:
Pablo Escobar 2020-03-22 21:34:48 +01:00 committed by Бранимир Караџић
parent 126a3fa6da
commit c9fcca6327

View File

@ -6383,10 +6383,10 @@ VK_DESTROY
if (!isValid(draw.m_indexBuffer) )
{
const VertexBufferVK& vertexBuffer = m_vertexBuffers[draw.m_stream[0].m_handle.idx];
const VertexLayout& layout = m_vertexLayouts[draw.m_stream[0].m_layoutHandle.idx];
const VertexLayout* layout = layouts[0];
const uint32_t numVertices = UINT32_MAX == draw.m_numVertices
? vertexBuffer.m_size / layout.m_stride
? vertexBuffer.m_size / layout->m_stride
: draw.m_numVertices
;
vkCmdDraw(m_commandBuffer