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:
parent
894459fcd7
commit
72317d7777
8 changed files with 63 additions and 12 deletions
|
@ -2,6 +2,9 @@ namespace Ryujinx.Graphics.Gal.Shader
|
|||
{
|
||||
static class ShaderDecodeHelper
|
||||
{
|
||||
private static readonly ShaderIrOperImmf ImmfZero = new ShaderIrOperImmf(0);
|
||||
private static readonly ShaderIrOperImmf ImmfOne = new ShaderIrOperImmf(1);
|
||||
|
||||
public static ShaderIrNode GetAluFabsFneg(ShaderIrNode Node, bool Abs, bool Neg)
|
||||
{
|
||||
return GetAluFneg(GetAluFabs(Node, Abs), Neg);
|
||||
|
@ -17,6 +20,11 @@ namespace Ryujinx.Graphics.Gal.Shader
|
|||
return Neg ? new ShaderIrOp(ShaderIrInst.Fneg, Node) : Node;
|
||||
}
|
||||
|
||||
public static ShaderIrNode GetAluFsat(ShaderIrNode Node, bool Sat)
|
||||
{
|
||||
return Sat ? new ShaderIrOp(ShaderIrInst.Fclamp, Node, ImmfZero, ImmfOne) : Node;
|
||||
}
|
||||
|
||||
public static ShaderIrNode GetAluIabsIneg(ShaderIrNode Node, bool Abs, bool Neg)
|
||||
{
|
||||
return GetAluIneg(GetAluIabs(Node, Abs), Neg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue