mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2026-05-20 16:21:46 +00:00
Fix divide by zero when recovering from missed draw (Vulkan)
fixes crash in 'Baldo: The Guardian Owls' opening cutscene
This commit is contained in:
parent
c4ee9c7555
commit
15b2d88552
1 changed files with 3 additions and 1 deletions
|
|
@ -56,7 +56,9 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
{
|
||||
// May need to restride the vertex buffer.
|
||||
|
||||
if (gd.NeedsVertexBufferAlignment(AttributeScalarAlignment, out int alignment) && (_stride % alignment) != 0)
|
||||
// Fix divide by zero when recovering from missed draw (Oct. 16 2024)
|
||||
// (fixes crash in 'Baldo: The Guardian Owls' opening cutscene)
|
||||
if (gd.NeedsVertexBufferAlignment(AttributeScalarAlignment, out int alignment) && alignment != 0 && (_stride % alignment) != 0)
|
||||
{
|
||||
autoBuffer = gd.BufferManager.GetAlignedVertexBuffer(cbs, _handle, _offset, _size, _stride, alignment);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue