mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-23 23:12:01 +00:00
Fix for integer vertex attributes and iset bf flag (#323)
This commit is contained in:
parent
c68bca5396
commit
fa70629fab
2 changed files with 19 additions and 6 deletions
|
@ -278,9 +278,21 @@ namespace Ryujinx.Graphics.Gal.OpenGL
|
||||||
int Size = AttribElements[Attrib.Size];
|
int Size = AttribElements[Attrib.Size];
|
||||||
int Offset = Attrib.Offset;
|
int Offset = Attrib.Offset;
|
||||||
|
|
||||||
|
if (Attrib.Type == GalVertexAttribType.Sint ||
|
||||||
|
Attrib.Type == GalVertexAttribType.Uint)
|
||||||
|
{
|
||||||
|
IntPtr Pointer = new IntPtr(Offset);
|
||||||
|
|
||||||
|
VertexAttribIntegerType IType = (VertexAttribIntegerType)Type;
|
||||||
|
|
||||||
|
GL.VertexAttribIPointer(Attrib.Index, Size, IType, Stride, Pointer);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
GL.VertexAttribPointer(Attrib.Index, Size, Type, Normalize, Stride, Offset);
|
GL.VertexAttribPointer(Attrib.Index, Size, Type, Normalize, Stride, Offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void SetIndexArray(int Size, GalIndexFormat Format)
|
public void SetIndexArray(int Size, GalIndexFormat Format)
|
||||||
{
|
{
|
||||||
|
|
|
@ -873,10 +873,11 @@ namespace Ryujinx.Graphics.Gal.Shader
|
||||||
{
|
{
|
||||||
bool NegA = ((OpCode >> 43) & 1) != 0;
|
bool NegA = ((OpCode >> 43) & 1) != 0;
|
||||||
bool AbsB = ((OpCode >> 44) & 1) != 0;
|
bool AbsB = ((OpCode >> 44) & 1) != 0;
|
||||||
bool BoolFloat = ((OpCode >> 52) & 1) != 0;
|
|
||||||
bool NegB = ((OpCode >> 53) & 1) != 0;
|
bool NegB = ((OpCode >> 53) & 1) != 0;
|
||||||
bool AbsA = ((OpCode >> 54) & 1) != 0;
|
bool AbsA = ((OpCode >> 54) & 1) != 0;
|
||||||
|
|
||||||
|
bool BoolFloat = ((OpCode >> (IsFloat ? 52 : 44)) & 1) != 0;
|
||||||
|
|
||||||
ShaderIrNode OperA = GetOperGpr8(OpCode), OperB;
|
ShaderIrNode OperA = GetOperGpr8(OpCode), OperB;
|
||||||
|
|
||||||
switch (Oper)
|
switch (Oper)
|
||||||
|
|
Loading…
Reference in a new issue