mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-12-22 06:15:40 +00:00
Fix divide by zero when recovering from missed draw (Vulkan) (#52)
This commit is contained in:
parent
c4ee9c7555
commit
e5fdbd0b83
@ -55,8 +55,10 @@ namespace Ryujinx.Graphics.Vulkan
|
|||||||
if (_handle != BufferHandle.Null)
|
if (_handle != BufferHandle.Null)
|
||||||
{
|
{
|
||||||
// May need to restride the vertex buffer.
|
// 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);
|
autoBuffer = gd.BufferManager.GetAlignedVertexBuffer(cbs, _handle, _offset, _size, _stride, alignment);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user