Some small gpu improvements and shader improvements, add support for ASTC 4x4 textures (slow!)

This commit is contained in:
gdkchan 2018-06-02 00:50:56 -03:00
parent aeb1bbf50c
commit 53a6922f87
11 changed files with 332 additions and 100 deletions

View file

@ -119,14 +119,24 @@ namespace Ryujinx.Graphics.Gal.Shader
return new ShaderIrOperImmf(Value);
}
public static ShaderIrOperPred GetOperPred0(long OpCode)
{
return new ShaderIrOperPred((int)(OpCode >> 0) & 7);
}
public static ShaderIrOperPred GetOperPred3(long OpCode)
{
return new ShaderIrOperPred((int)(OpCode >> 3) & 7);
}
public static ShaderIrOperPred GetOperPred0(long OpCode)
public static ShaderIrOperPred GetOperPred12(long OpCode)
{
return new ShaderIrOperPred((int)(OpCode >> 0) & 7);
return new ShaderIrOperPred((int)(OpCode >> 12) & 7);
}
public static ShaderIrOperPred GetOperPred29(long OpCode)
{
return new ShaderIrOperPred((int)(OpCode >> 29) & 7);
}
public static ShaderIrNode GetOperPred39N(long OpCode)
@ -184,7 +194,7 @@ namespace Ryujinx.Graphics.Gal.Shader
throw new ArgumentException(nameof(OpCode));
}
public static ShaderIrInst GetBLop(long OpCode)
public static ShaderIrInst GetBLop45(long OpCode)
{
switch ((int)(OpCode >> 45) & 3)
{
@ -196,6 +206,18 @@ namespace Ryujinx.Graphics.Gal.Shader
throw new ArgumentException(nameof(OpCode));
}
public static ShaderIrInst GetBLop24(long OpCode)
{
switch ((int)(OpCode >> 24) & 3)
{
case 0: return ShaderIrInst.Band;
case 1: return ShaderIrInst.Bor;
case 2: return ShaderIrInst.Bxor;
}
throw new ArgumentException(nameof(OpCode));
}
public static ShaderIrNode GetPredNode(ShaderIrNode Node, long OpCode)
{
ShaderIrOperPred Pred = GetPredNode(OpCode);