0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2024-12-22 23:55:47 +00:00

Do not attempt to read unused attribute, fix attributes count (#520)

This commit is contained in:
gdkchan 2018-12-26 17:29:50 -02:00 committed by GitHub
parent 0f5b6dfbe8
commit 1fd1ec5664
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -878,7 +878,7 @@ namespace Ryujinx.Graphics.Gal.Shader
}
}
if (DeclInfo.Index >= 16)
if (DeclInfo.Index >= 32)
{
throw new InvalidOperationException($"Shader attribute offset {Abuf.Offs} is invalid.");
}

View file

@ -734,6 +734,11 @@ namespace Ryujinx.Graphics.Graphics3d
long VbPosition = MakeInt64From2xInt32(NvGpuEngine3dReg.VertexArrayNAddress + ArrayIndex * 4);
if (VbPosition == 0)
{
continue;
}
bool IsConst = ((Packed >> 6) & 1) != 0;
int Offset = (Packed >> 7) & 0x3fff;