rsx: Handle non-zero base vertex better

- Vertex buffer contents treat the base vertex as vertex 0 so we do the same for indices

rsx: Fix vertex base indexing

rsx: Properly fix non-zero offset indexed rendering
This commit is contained in:
kd-11 2017-06-16 16:03:12 +03:00
parent 5c6cf77c57
commit 11317acdbe
2 changed files with 21 additions and 19 deletions

View file

@ -673,8 +673,9 @@ namespace rsx
}
u32 first = std::get<0>(draw_indexed_clause.front());
u32 count = std::get<0>(draw_indexed_clause.back()) + std::get<1>(draw_indexed_clause.back()) - first;
const gsl::byte* ptr = static_cast<const gsl::byte*>(vm::base(address));
return{ ptr, count * type_size };
return{ ptr + first * type_size, count * type_size };
}
gsl::span<const gsl::byte> thread::get_raw_vertex_buffer(const rsx::data_array_format_info& vertex_array_info, u32 base_offset, const std::vector<std::pair<u32, u32>>& vertex_ranges) const