yuzu-emu
/
yuzu
Archived
1
0
Fork 0

vk_rasterizer: Fix vertex range assert

End can be equal to start in CalculateVertexArraysSize. This is quite
common when the vertex size is zero.
This commit is contained in:
ReinUsesLisp 2020-03-15 04:04:17 -03:00
parent 4dfd5c84ea
commit a7131af7d6
1 changed files with 1 additions and 1 deletions

View File

@ -1151,7 +1151,7 @@ std::size_t RasterizerVulkan::CalculateVertexArraysSize() const {
// This implementation assumes that all attributes are used in the shader. // This implementation assumes that all attributes are used in the shader.
const GPUVAddr start{regs.vertex_array[index].StartAddress()}; const GPUVAddr start{regs.vertex_array[index].StartAddress()};
const GPUVAddr end{regs.vertex_array_limit[index].LimitAddress()}; const GPUVAddr end{regs.vertex_array_limit[index].LimitAddress()};
DEBUG_ASSERT(end > start); DEBUG_ASSERT(end >= start);
size += (end - start + 1) * regs.vertex_array[index].enable; size += (end - start + 1) * regs.vertex_array[index].enable;
} }