Add support for linked Texture Sampler Control

This commit is contained in:
gdkchan 2018-11-15 13:35:46 -03:00
parent c7a01dc3cb
commit 1af01d5df7
3 changed files with 7 additions and 3 deletions

View file

@ -270,7 +270,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL
case GalTextureFilter.Linear: return TextureMinFilter.Linear;
}
return TextureMinFilter.Linear;
throw new ArgumentException(nameof(MinFilter) + " \"" + MinFilter + "\" is not valid!");
}
public static TextureMagFilter GetTextureMagFilter(GalTextureFilter Filter)
@ -281,7 +281,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL
case GalTextureFilter.Linear: return TextureMagFilter.Linear;
}
return TextureMagFilter.Linear;
throw new ArgumentException(nameof(Filter) + " \"" + Filter + "\" is not valid!");
}
public static BlendEquationMode GetBlendEquation(GalBlendEquation BlendEquation)

View file

@ -537,8 +537,11 @@ namespace Ryujinx.Graphics
return;
}
bool LinkedTsc = ReadRegisterBool(NvGpuEngine3dReg.LinkedTsc);
int TicIndex = (TextureHandle >> 0) & 0xfffff;
int TscIndex = (TextureHandle >> 20) & 0xfff;
int TscIndex = LinkedTsc ? TicIndex : (TextureHandle >> 20) & 0xfff;
long TicPosition = MakeInt64From2xInt32(NvGpuEngine3dReg.TexHeaderPoolOffset);
long TscPosition = MakeInt64From2xInt32(NvGpuEngine3dReg.TexSamplerPoolOffset);

View file

@ -36,6 +36,7 @@ namespace Ryujinx.Graphics
ZetaHoriz = 0x48a,
ZetaVert = 0x48b,
ZetaArrayMode = 0x48c,
LinkedTsc = 0x48d,
DepthTestEnable = 0x4b3,
BlendIndependent = 0x4b9,
DepthWriteEnable = 0x4ba,