diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-06-02 11:44:52 -0300 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-06-02 11:44:52 -0300 |
| commit | 4731c7545d31900c44e25f40d6bbc1ad5e8cba66 (patch) | |
| tree | d8f971edc41183910db4231fb4c0b99e699595d3 /Ryujinx.Graphics | |
| parent | 7a6ce481844d40779f71d1706e3ba92f11137760 (diff) | |
Fix mistake on astc conversion, make some static methods that shouldn't be public private, remove old commmented out code
Diffstat (limited to 'Ryujinx.Graphics')
| -rw-r--r-- | Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs | 15 | ||||
| -rw-r--r-- | Ryujinx.Graphics/Gal/Shader/ShaderDecodeAlu.cs | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics/Gal/Shader/ShaderDecodeMem.cs | 5 |
3 files changed, 12 insertions, 10 deletions
diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs index 75f09faa..46c15dcc 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs @@ -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) diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeAlu.cs b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeAlu.cs index 2e3fb6dd..065ab344 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeAlu.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeAlu.cs @@ -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. diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeMem.cs b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeMem.cs index ec03622d..c50f0144 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeMem.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeMem.cs @@ -216,11 +216,6 @@ namespace Ryujinx.Graphics.Gal.Shader } Block.AddNode(GetPredNode(new ShaderIrAsg(Dst, Src), OpCode)); - - /*if (IsScalar) - { - break; - }*/ } } |
