Fix mistake on astc conversion, make some static methods that shouldn't be public private, remove old commmented out code

This commit is contained in:
gdkchan 2018-06-02 11:44:52 -03:00
parent 7a6ce48184
commit 4731c7545d
6 changed files with 18 additions and 16 deletions

View File

@ -244,7 +244,7 @@ namespace ChocolArm64.Instruction
nameof(ASoftFallback.ReverseBytes32_32),
nameof(ASoftFallback.ReverseBytes32_64));
public static void EmitFallback32_64(AILEmitterCtx Context, string Name32, string Name64)
private static void EmitFallback32_64(AILEmitterCtx Context, string Name32, string Name64)
{
AOpCodeAlu Op = (AOpCodeAlu)Context.CurrOp;

View File

@ -27,7 +27,7 @@ namespace ChocolArm64.Instruction
public static void Ldr(AILEmitterCtx Context) => EmitLdr(Context, false);
public static void Ldrs(AILEmitterCtx Context) => EmitLdr(Context, true);
public static void EmitLdr(AILEmitterCtx Context, bool Signed)
private static void EmitLdr(AILEmitterCtx Context, bool Signed)
{
AOpCodeMem Op = (AOpCodeMem)Context.CurrOp;

View File

@ -50,7 +50,7 @@ namespace ChocolArm64.Instruction
EmitBitBif(Context, false);
}
public static void EmitBitBif(AILEmitterCtx Context, bool NotRm)
private static void EmitBitBif(AILEmitterCtx Context, bool NotRm)
{
AOpCodeSimdReg Op = (AOpCodeSimdReg)Context.CurrOp;

View File

@ -40,7 +40,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL
{
if (Texture.Format >= GalTextureFormat.Astc2D4x4)
{
ConvertAstcTextureToRgba(Texture);
Texture = ConvertAstcTextureToRgba(Texture);
}
const PixelInternalFormat InternalFmt = PixelInternalFormat.Rgba;
@ -70,14 +70,21 @@ namespace Ryujinx.Graphics.Gal.OpenGL
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureSwizzleA, SwizzleA);
}
private void ConvertAstcTextureToRgba(GalTexture Texture)
private GalTexture ConvertAstcTextureToRgba(GalTexture Texture)
{
int TextureBlockWidth = GetAstcBlockWidth(Texture.Format);
int TextureBlockHeight = GetAstcBlockWidth(Texture.Format);
Texture.Data = ASTCDecoder.DecodeToRGBA8888(
Texture.Data,
GetAstcBlockWidth(Texture.Format),
GetAstcBlockHeight(Texture.Format), 1,
TextureBlockWidth,
TextureBlockHeight, 1,
Texture.Width,
Texture.Height, 1);
Texture.Format = GalTextureFormat.A8B8G8R8;
return Texture;
}
private int GetAstcBlockWidth(GalTextureFormat Format)

View File

@ -620,7 +620,7 @@ namespace Ryujinx.Graphics.Gal.Shader
}
}
public static void EmitRro(ShaderIrBlock Block, long OpCode, ShaderOper Oper)
private static void EmitRro(ShaderIrBlock Block, long OpCode, ShaderOper Oper)
{
//Note: this is a range reduction instruction and is supposed to
//be used with Mufu, here it just moves the value and ignores the operation.

View File

@ -216,11 +216,6 @@ namespace Ryujinx.Graphics.Gal.Shader
}
Block.AddNode(GetPredNode(new ShaderIrAsg(Dst, Src), OpCode));
/*if (IsScalar)
{
break;
}*/
}
}