Use Quads on OpenGL host when supported. (#2331)
Improves OpenGL performance on FAST RMX and Xenoblade DE/2. Will probably only work on NVIDIA GPUs, but the emulated quads path will still be valid for other GPUs. Note: SLOW RMX gets a bit faster in handheld mode. I'd recommend checking on platforms without supported host quads to make sure a GL error is actually thrown when attempting GL.Begin(PrimitiveType.Quads)
This commit is contained in:
parent
7527c5b906
commit
fe29aff266
2 changed files with 15 additions and 4 deletions
|
@ -182,11 +182,11 @@ namespace Ryujinx.Graphics.OpenGL
|
|||
|
||||
PreDraw();
|
||||
|
||||
if (_primitiveType == PrimitiveType.Quads)
|
||||
if (_primitiveType == PrimitiveType.Quads && !HwCapabilities.SupportsQuads)
|
||||
{
|
||||
DrawQuadsImpl(vertexCount, instanceCount, firstVertex, firstInstance);
|
||||
}
|
||||
else if (_primitiveType == PrimitiveType.QuadStrip)
|
||||
else if (_primitiveType == PrimitiveType.QuadStrip && !HwCapabilities.SupportsQuads)
|
||||
{
|
||||
DrawQuadStripImpl(vertexCount, instanceCount, firstVertex, firstInstance);
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ namespace Ryujinx.Graphics.OpenGL
|
|||
|
||||
IntPtr indexBaseOffset = _indexBaseOffset + firstIndex * indexElemSize;
|
||||
|
||||
if (_primitiveType == PrimitiveType.Quads)
|
||||
if (_primitiveType == PrimitiveType.Quads && !HwCapabilities.SupportsQuads)
|
||||
{
|
||||
DrawQuadsIndexedImpl(
|
||||
indexCount,
|
||||
|
@ -320,7 +320,7 @@ namespace Ryujinx.Graphics.OpenGL
|
|||
firstVertex,
|
||||
firstInstance);
|
||||
}
|
||||
else if (_primitiveType == PrimitiveType.QuadStrip)
|
||||
else if (_primitiveType == PrimitiveType.QuadStrip && !HwCapabilities.SupportsQuads)
|
||||
{
|
||||
DrawQuadStripIndexedImpl(
|
||||
indexCount,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue