rsx: Fix vertex count if all the streams are disabled

This commit is contained in:
eladash 2018-09-24 10:07:46 +03:00 committed by kd-11
parent e0a676a3fe
commit 06572c6011
2 changed files with 2 additions and 2 deletions

View File

@ -158,7 +158,7 @@ namespace
vertex_input_state operator()(const rsx::draw_inlined_array& command)
{
const u32 vertex_count = (u32)command.inline_vertex_array.size() * sizeof(u32) / m_vertex_layout.interleaved_blocks[0].attribute_stride;
const u32 vertex_count = m_vertex_layout.interleaved_blocks[0].locations.size() ? ((u32)command.inline_vertex_array.size() * sizeof(u32)) / m_vertex_layout.interleaved_blocks[0].attribute_stride : 0;
if (!gl::is_primitive_native(rsx::method_registers.current_draw_clause.primitive))
{

View File

@ -212,7 +212,7 @@ namespace
auto &draw_clause = rsx::method_registers.current_draw_clause;
VkPrimitiveTopology prims = vk::get_appropriate_topology(draw_clause.primitive, primitives_emulated);
const u32 vertex_count = (u32)command.inline_vertex_array.size() * sizeof(u32) / m_vertex_layout.interleaved_blocks[0].attribute_stride;
const u32 vertex_count = m_vertex_layout.interleaved_blocks[0].locations.size() ? ((u32)command.inline_vertex_array.size() * sizeof(u32)) / m_vertex_layout.interleaved_blocks[0].attribute_stride : 0;
if (!primitives_emulated)
{