Add support for saturation on some shader instructions, fix ReadTexture alignment and add ColorMask support (#451)

* Add support for saturation on some shader instructions, fix ReadTexture alignment

* Add ColorMask support, other tweaks
This commit is contained in:
gdkchan 2018-10-13 23:54:14 -03:00 committed by GitHub
parent 894459fcd7
commit 72317d7777
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 63 additions and 12 deletions

View file

@ -195,6 +195,11 @@ namespace Ryujinx.Graphics.Gal.OpenGL
Enable(EnableCap.StencilTest, New.StencilTestEnabled);
}
if (New.StencilTwoSideEnabled != Old.StencilTwoSideEnabled)
{
Enable((EnableCap)All.StencilTestTwoSideExt, New.StencilTwoSideEnabled);
}
if (New.StencilTestEnabled)
{
if (New.StencilBackFuncFunc != Old.StencilBackFuncFunc ||
@ -298,6 +303,18 @@ namespace Ryujinx.Graphics.Gal.OpenGL
}
}
if (New.ColorMaskR != Old.ColorMaskR ||
New.ColorMaskG != Old.ColorMaskG ||
New.ColorMaskB != Old.ColorMaskB ||
New.ColorMaskA != Old.ColorMaskA)
{
GL.ColorMask(
New.ColorMaskR,
New.ColorMaskG,
New.ColorMaskB,
New.ColorMaskA);
}
if (New.PrimitiveRestartEnabled != Old.PrimitiveRestartEnabled)
{
Enable(EnableCap.PrimitiveRestart, New.PrimitiveRestartEnabled);