mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-10 10:41:43 +00:00
Use signed and unsigned vertex types (#370)
This commit is contained in:
parent
d021d5dfa9
commit
afdeee2b86
1 changed files with 42 additions and 17 deletions
|
@ -25,7 +25,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL
|
||||||
{ GalVertexAttribSize._11_11_10, 3 }
|
{ GalVertexAttribSize._11_11_10, 3 }
|
||||||
};
|
};
|
||||||
|
|
||||||
private static Dictionary<GalVertexAttribSize, VertexAttribPointerType> AttribTypes =
|
private static Dictionary<GalVertexAttribSize, VertexAttribPointerType> SignedAttribTypes =
|
||||||
new Dictionary<GalVertexAttribSize, VertexAttribPointerType>()
|
new Dictionary<GalVertexAttribSize, VertexAttribPointerType>()
|
||||||
{
|
{
|
||||||
{ GalVertexAttribSize._32_32_32_32, VertexAttribPointerType.Int },
|
{ GalVertexAttribSize._32_32_32_32, VertexAttribPointerType.Int },
|
||||||
|
@ -40,8 +40,26 @@ namespace Ryujinx.Graphics.Gal.OpenGL
|
||||||
{ GalVertexAttribSize._8_8, VertexAttribPointerType.Byte },
|
{ GalVertexAttribSize._8_8, VertexAttribPointerType.Byte },
|
||||||
{ GalVertexAttribSize._16, VertexAttribPointerType.Short },
|
{ GalVertexAttribSize._16, VertexAttribPointerType.Short },
|
||||||
{ GalVertexAttribSize._8, VertexAttribPointerType.Byte },
|
{ GalVertexAttribSize._8, VertexAttribPointerType.Byte },
|
||||||
{ GalVertexAttribSize._10_10_10_2, VertexAttribPointerType.Int }, //?
|
{ GalVertexAttribSize._10_10_10_2, VertexAttribPointerType.Int2101010Rev }
|
||||||
{ GalVertexAttribSize._11_11_10, VertexAttribPointerType.Int } //?
|
};
|
||||||
|
|
||||||
|
private static Dictionary<GalVertexAttribSize, VertexAttribPointerType> UnsignedAttribTypes =
|
||||||
|
new Dictionary<GalVertexAttribSize, VertexAttribPointerType>()
|
||||||
|
{
|
||||||
|
{ GalVertexAttribSize._32_32_32_32, VertexAttribPointerType.UnsignedInt },
|
||||||
|
{ GalVertexAttribSize._32_32_32, VertexAttribPointerType.UnsignedInt },
|
||||||
|
{ GalVertexAttribSize._16_16_16_16, VertexAttribPointerType.UnsignedShort },
|
||||||
|
{ GalVertexAttribSize._32_32, VertexAttribPointerType.UnsignedInt },
|
||||||
|
{ GalVertexAttribSize._16_16_16, VertexAttribPointerType.UnsignedShort },
|
||||||
|
{ GalVertexAttribSize._8_8_8_8, VertexAttribPointerType.UnsignedByte },
|
||||||
|
{ GalVertexAttribSize._16_16, VertexAttribPointerType.UnsignedShort },
|
||||||
|
{ GalVertexAttribSize._32, VertexAttribPointerType.UnsignedInt },
|
||||||
|
{ GalVertexAttribSize._8_8_8, VertexAttribPointerType.UnsignedByte },
|
||||||
|
{ GalVertexAttribSize._8_8, VertexAttribPointerType.UnsignedByte },
|
||||||
|
{ GalVertexAttribSize._16, VertexAttribPointerType.UnsignedShort },
|
||||||
|
{ GalVertexAttribSize._8, VertexAttribPointerType.UnsignedByte },
|
||||||
|
{ GalVertexAttribSize._10_10_10_2, VertexAttribPointerType.UnsignedInt2101010Rev },
|
||||||
|
{ GalVertexAttribSize._11_11_10, VertexAttribPointerType.UnsignedInt10F11F11FRev }
|
||||||
};
|
};
|
||||||
|
|
||||||
private GalPipelineState Old;
|
private GalPipelineState Old;
|
||||||
|
@ -341,7 +359,14 @@ namespace Ryujinx.Graphics.Gal.OpenGL
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Type = AttribTypes[Attrib.Size] + (Unsigned ? 1 : 0);
|
if (Unsigned)
|
||||||
|
{
|
||||||
|
Type = UnsignedAttribTypes[Attrib.Size];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Type = SignedAttribTypes[Attrib.Size];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int Size = AttribElements[Attrib.Size];
|
int Size = AttribElements[Attrib.Size];
|
||||||
|
|
Loading…
Reference in a new issue