From 99717b7902dcd03691093c7b2f8ef8cdc446ad71 Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Fri, 1 Apr 2016 23:42:27 +0200 Subject: [PATCH] gl: Fix vertex buffer size. --- rpcs3/Emu/RSX/GL/vertex_buffer.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/rpcs3/Emu/RSX/GL/vertex_buffer.cpp b/rpcs3/Emu/RSX/GL/vertex_buffer.cpp index 799e58180d..2ee749981e 100644 --- a/rpcs3/Emu/RSX/GL/vertex_buffer.cpp +++ b/rpcs3/Emu/RSX/GL/vertex_buffer.cpp @@ -159,7 +159,6 @@ void GLGSRender::set_vertex_buffer() //merge all vertex arrays std::vector vertex_arrays_data; - u32 vertex_arrays_offsets[rsx::limits::vertex_count]; const std::string reg_table[] = { @@ -342,17 +341,15 @@ void GLGSRender::set_vertex_buffer() size_t size = vertex_array.size(); size_t position = vertex_arrays_data.size(); - vertex_arrays_offsets[index] = gsl::narrow(position); vertex_arrays_data.resize(position + size); u32 gl_type = to_gl_internal_type(vertex_info.type, vertex_info.size); - u32 data_size = element_size * vertex_draw_count; auto &buffer = m_gl_attrib_buffers[index].buffer; auto &texture = m_gl_attrib_buffers[index].texture; - buffer->data(data_size, nullptr); - buffer->sub_data(0, data_size, vertex_array.data()); + buffer->data(static_cast(size), nullptr); + buffer->sub_data(0, static_cast(size), vertex_array.data()); //Attach buffer to texture texture->copy_from(*buffer, gl_type);