This commit is contained in:
Isaac Marovitz 2024-05-09 20:28:46 -04:00
parent 0c88c23b30
commit 15978d9c55
No known key found for this signature in database
GPG key ID: 97250B2B09A132E1

View file

@ -537,13 +537,13 @@ namespace Ryujinx.Graphics.OpenGL
{ {
if (firstInstance == 0 && firstVertex == 0 && instanceCount == 1) if (firstInstance == 0 && firstVertex == 0 && instanceCount == 1)
{ {
_api.DrawElements(_primitiveType, indexCount, _elementsType, indexBaseOffset); _api.DrawElements(_primitiveType, (uint)indexCount, _elementsType, indexBaseOffset);
} }
else if (firstInstance == 0 && instanceCount == 1) else if (firstInstance == 0 && instanceCount == 1)
{ {
_api.DrawElementsBaseVertex( _api.DrawElementsBaseVertex(
_primitiveType, _primitiveType,
indexCount, (uint)indexCount,
_elementsType, _elementsType,
indexBaseOffset, indexBaseOffset,
firstVertex); firstVertex);
@ -552,41 +552,41 @@ namespace Ryujinx.Graphics.OpenGL
{ {
_api.DrawElementsInstanced( _api.DrawElementsInstanced(
_primitiveType, _primitiveType,
indexCount, (uint)indexCount,
_elementsType, _elementsType,
indexBaseOffset, indexBaseOffset,
instanceCount); (uint)instanceCount);
} }
else if (firstInstance == 0) else if (firstInstance == 0)
{ {
_api.DrawElementsInstancedBaseVertex( _api.DrawElementsInstancedBaseVertex(
_primitiveType, _primitiveType,
indexCount, (uint)indexCount,
_elementsType, _elementsType,
indexBaseOffset, indexBaseOffset,
instanceCount, (uint)instanceCount,
firstVertex); firstVertex);
} }
else if (firstVertex == 0) else if (firstVertex == 0)
{ {
_api.DrawElementsInstancedBaseInstance( _api.DrawElementsInstancedBaseInstance(
_primitiveType, _primitiveType,
indexCount, (uint)indexCount,
_elementsType, _elementsType,
indexBaseOffset, indexBaseOffset,
instanceCount, (uint)instanceCount,
firstInstance); (uint)firstInstance);
} }
else else
{ {
_api.DrawElementsInstancedBaseVertexBaseInstance( _api.DrawElementsInstancedBaseVertexBaseInstance(
_primitiveType, _primitiveType,
indexCount, (uint)indexCount,
_elementsType, _elementsType,
indexBaseOffset, indexBaseOffset,
instanceCount, (uint)instanceCount,
firstVertex, firstVertex,
firstInstance); (uint)firstInstance);
} }
} }
@ -630,9 +630,9 @@ namespace Ryujinx.Graphics.OpenGL
_primitiveType, _primitiveType,
_elementsType, _elementsType,
(IntPtr)indirectBuffer.Offset, (IntPtr)indirectBuffer.Offset,
(IntPtr)parameterBuffer.Offset, parameterBuffer.Offset,
maxDrawCount, (uint)maxDrawCount,
stride); (uint)stride);
_vertexArray.RestoreIndexBuffer(); _vertexArray.RestoreIndexBuffer();
@ -672,9 +672,9 @@ namespace Ryujinx.Graphics.OpenGL
_api.MultiDrawArraysIndirectCount( _api.MultiDrawArraysIndirectCount(
_primitiveType, _primitiveType,
(IntPtr)indirectBuffer.Offset, (IntPtr)indirectBuffer.Offset,
(IntPtr)parameterBuffer.Offset, parameterBuffer.Offset,
maxDrawCount, (uint)maxDrawCount,
stride); (uint)stride);
PostDraw(); PostDraw();
} }