Quad to triangle optimization (#552)
* Fix minor bug with ordering leading to incorrect ordering * Converts quads and quadstrips to triangle * A new line for emmaus * Refactor to remove Ib from quadhelper methods * 20 extra brackets...
This commit is contained in:
parent
016156c288
commit
cf147f1e49
2 changed files with 67 additions and 17 deletions
|
@ -4,17 +4,17 @@ namespace Ryujinx.Graphics
|
|||
{
|
||||
static class QuadHelper
|
||||
{
|
||||
public static int ConvertIbSizeQuadsToTris(int Size)
|
||||
public static int ConvertSizeQuadsToTris(int Size)
|
||||
{
|
||||
return Size <= 0 ? 0 : (Size / 4) * 6;
|
||||
}
|
||||
|
||||
public static int ConvertIbSizeQuadStripToTris(int Size)
|
||||
public static int ConvertSizeQuadStripToTris(int Size)
|
||||
{
|
||||
return Size <= 1 ? 0 : ((Size - 2) / 2) * 6;
|
||||
}
|
||||
|
||||
public static byte[] ConvertIbQuadsToTris(byte[] Data, int EntrySize, int Count)
|
||||
public static byte[] ConvertQuadsToTris(byte[] Data, int EntrySize, int Count)
|
||||
{
|
||||
int PrimitivesCount = Count / 4;
|
||||
|
||||
|
@ -46,7 +46,7 @@ namespace Ryujinx.Graphics
|
|||
return Output;
|
||||
}
|
||||
|
||||
public static byte[] ConvertIbQuadStripToTris(byte[] Data, int EntrySize, int Count)
|
||||
public static byte[] ConvertQuadStripToTris(byte[] Data, int EntrySize, int Count)
|
||||
{
|
||||
int PrimitivesCount = (Count - 2) / 2;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue