From c5a1f8930fa55016cb5bbbdcfab6362932bdcf0b Mon Sep 17 00:00:00 2001 From: vlj Date: Tue, 26 May 2015 15:58:03 +0200 Subject: [PATCH] d3d12: Another fix for vertex buffer not big enough buffer --- rpcs3/Emu/RSX/D3D12/D3D12Buffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Emu/RSX/D3D12/D3D12Buffer.cpp b/rpcs3/Emu/RSX/D3D12/D3D12Buffer.cpp index 66bd5917f6..49c1c8aae3 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12Buffer.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12Buffer.cpp @@ -170,7 +170,7 @@ std::vector FormatVertexData(RSXVertexData *m_vertex_data) // If there is a single element, stride is 0, use the size of element instead size_t stride = m_vertex_data[i].stride; size_t elementSize = m_vertex_data[i].GetTypeSize(); - std::pair range = std::make_pair(m_vertex_data[i].addr, m_vertex_data[i].addr + elementSize + (elementCount - 1) * stride); + std::pair range = std::make_pair(m_vertex_data[i].addr, m_vertex_data[i].addr + elementSize + elementCount * stride); bool isMerged = false; for (VertexBufferFormat &vbf : Result)