diff --git a/ChocolArm64/Decoder/ADecoderHelper.cs b/ChocolArm64/Decoder/ADecoderHelper.cs index b101e58e48..506689ffe3 100644 --- a/ChocolArm64/Decoder/ADecoderHelper.cs +++ b/ChocolArm64/Decoder/ADecoderHelper.cs @@ -7,7 +7,7 @@ namespace ChocolArm64.Decoder public struct BitMask { public long WMask; - public long Mask; + public long TMask; public int Pos; public int Shift; public bool IsUndefined; @@ -48,7 +48,7 @@ namespace ChocolArm64.Decoder return new BitMask() { WMask = ABitUtils.Replicate(wMask, size), - Mask = ABitUtils.Replicate(mask, size), + TMask = ABitUtils.Replicate(mask, size), Pos = immS, Shift = immR diff --git a/ChocolArm64/Decoder/AOpCodeBfm.cs b/ChocolArm64/Decoder/AOpCodeBfm.cs index 2399542a8f..8bfee48ed2 100644 --- a/ChocolArm64/Decoder/AOpCodeBfm.cs +++ b/ChocolArm64/Decoder/AOpCodeBfm.cs @@ -5,7 +5,7 @@ namespace ChocolArm64.Decoder internal class AOpCodeBfm : AOpCodeAlu { public long WMask { get; private set; } - public long Mask { get; private set; } + public long TMask { get; private set; } public int Pos { get; private set; } public int Shift { get; private set; } @@ -21,7 +21,7 @@ namespace ChocolArm64.Decoder } WMask = bm.WMask; - Mask = bm.Mask; + TMask = bm.TMask; Pos = bm.Pos; Shift = bm.Shift; } diff --git a/ChocolArm64/Instruction/AInstEmitBfm.cs b/ChocolArm64/Instruction/AInstEmitBfm.cs index 4f05aa7b75..8807ab5791 100644 --- a/ChocolArm64/Instruction/AInstEmitBfm.cs +++ b/ChocolArm64/Instruction/AInstEmitBfm.cs @@ -14,13 +14,13 @@ namespace ChocolArm64.Instruction EmitBfmLoadRn(context); context.EmitLdintzr(op.Rd); - context.EmitLdc_I(~op.WMask & op.Mask); + context.EmitLdc_I(~op.WMask & op.TMask); context.Emit(OpCodes.And); context.Emit(OpCodes.Or); context.EmitLdintzr(op.Rd); - context.EmitLdc_I(~op.Mask); + context.EmitLdc_I(~op.TMask); context.Emit(OpCodes.And); context.Emit(OpCodes.Or); @@ -63,7 +63,7 @@ namespace ChocolArm64.Instruction context.EmitLsl(bitsCount - 1 - op.Pos); context.EmitAsr(bitsCount - 1); - context.EmitLdc_I(~op.Mask); + context.EmitLdc_I(~op.TMask); context.Emit(OpCodes.And); context.Emit(OpCodes.Or); @@ -201,7 +201,7 @@ namespace ChocolArm64.Instruction context.EmitRor(op.Shift); - context.EmitLdc_I(op.WMask & op.Mask); + context.EmitLdc_I(op.WMask & op.TMask); context.Emit(OpCodes.And); } diff --git a/ChocolArm64/Instruction/ASoftFallback.cs b/ChocolArm64/Instruction/ASoftFallback.cs index 4967b1f4d6..aa4e805fdf 100644 --- a/ChocolArm64/Instruction/ASoftFallback.cs +++ b/ChocolArm64/Instruction/ASoftFallback.cs @@ -528,17 +528,17 @@ namespace ChocolArm64.Instruction return Sha256Hash(hashAbcd, hashEfgh, wk, false); } - public static Vector128 SchedulePart1(Vector128 w03, Vector128 w47) + public static Vector128 SchedulePart1(Vector128 w0_3, Vector128 w4_7) { Vector128 result = new Vector128(); for (int e = 0; e <= 3; e++) { - uint elt = (uint)VectorExtractIntZx(e <= 2 ? w03 : w47, (byte)(e <= 2 ? e + 1 : 0), 2); + uint elt = (uint)VectorExtractIntZx(e <= 2 ? w0_3 : w4_7, (byte)(e <= 2 ? e + 1 : 0), 2); elt = elt.Ror(7) ^ elt.Ror(18) ^ elt.Lsr(3); - elt += (uint)VectorExtractIntZx(w03, (byte)e, 2); + elt += (uint)VectorExtractIntZx(w0_3, (byte)e, 2); result = VectorInsertInt((ulong)elt, result, (byte)e, 2); } @@ -546,11 +546,11 @@ namespace ChocolArm64.Instruction return result; } - public static Vector128 SchedulePart2(Vector128 w03, Vector128 w811, Vector128 w1215) + public static Vector128 SchedulePart2(Vector128 w0_3, Vector128 w8_11, Vector128 w1_215) { Vector128 result = new Vector128(); - ulong t1 = VectorExtractIntZx(w1215, (byte)1, 3); + ulong t1 = VectorExtractIntZx(w1_215, (byte)1, 3); for (int e = 0; e <= 1; e++) { @@ -558,8 +558,8 @@ namespace ChocolArm64.Instruction elt = elt.Ror(17) ^ elt.Ror(19) ^ elt.Lsr(10); - elt += (uint)VectorExtractIntZx(w03, (byte)e, 2); - elt += (uint)VectorExtractIntZx(w811, (byte)(e + 1), 2); + elt += (uint)VectorExtractIntZx(w0_3, (byte)e, 2); + elt += (uint)VectorExtractIntZx(w8_11, (byte)(e + 1), 2); result = VectorInsertInt((ulong)elt, result, (byte)e, 2); } @@ -572,8 +572,8 @@ namespace ChocolArm64.Instruction elt = elt.Ror(17) ^ elt.Ror(19) ^ elt.Lsr(10); - elt += (uint)VectorExtractIntZx(w03, (byte)e, 2); - elt += (uint)VectorExtractIntZx(e == 2 ? w811 : w1215, (byte)(e == 2 ? 3 : 0), 2); + elt += (uint)VectorExtractIntZx(w0_3, (byte)e, 2); + elt += (uint)VectorExtractIntZx(e == 2 ? w8_11 : w1_215, (byte)(e == 2 ? 3 : 0), 2); result = VectorInsertInt((ulong)elt, result, (byte)e, 2); } @@ -585,21 +585,21 @@ namespace ChocolArm64.Instruction { for (int e = 0; e <= 3; e++) { - uint chs = ShAchoose((uint)VectorExtractIntZx(y, (byte)0, 2), + uint chs = ShaChoose((uint)VectorExtractIntZx(y, (byte)0, 2), (uint)VectorExtractIntZx(y, (byte)1, 2), (uint)VectorExtractIntZx(y, (byte)2, 2)); - uint maj = ShAmajority((uint)VectorExtractIntZx(x, (byte)0, 2), + uint maj = ShaMajority((uint)VectorExtractIntZx(x, (byte)0, 2), (uint)VectorExtractIntZx(x, (byte)1, 2), (uint)VectorExtractIntZx(x, (byte)2, 2)); uint t1 = (uint)VectorExtractIntZx(y, (byte)3, 2); - t1 += ShAhashSigma1((uint)VectorExtractIntZx(y, (byte)0, 2)) + chs; + t1 += ShaHashSigma1((uint)VectorExtractIntZx(y, (byte)0, 2)) + chs; t1 += (uint)VectorExtractIntZx(w, (byte)e, 2); uint t2 = t1 + (uint)VectorExtractIntZx(x, (byte)3, 2); x = VectorInsertInt((ulong)t2, x, (byte)3, 2); - t2 = t1 + ShAhashSigma0((uint)VectorExtractIntZx(x, (byte)0, 2)) + maj; + t2 = t1 + ShaHashSigma0((uint)VectorExtractIntZx(x, (byte)0, 2)) + maj; y = VectorInsertInt((ulong)t2, y, (byte)3, 2); Rol32_256(ref y, ref x); @@ -622,22 +622,22 @@ namespace ChocolArm64.Instruction x = VectorInsertInt((ulong)yE3, x, (byte)0, 2); } - private static uint ShAhashSigma0(uint x) + private static uint ShaHashSigma0(uint x) { return x.Ror(2) ^ x.Ror(13) ^ x.Ror(22); } - private static uint ShAhashSigma1(uint x) + private static uint ShaHashSigma1(uint x) { return x.Ror(6) ^ x.Ror(11) ^ x.Ror(25); } - private static uint ShAmajority(uint x, uint y, uint z) + private static uint ShaMajority(uint x, uint y, uint z) { return (x & y) | ((x | y) & z); } - private static uint ShAchoose(uint x, uint y, uint z) + private static uint ShaChoose(uint x, uint y, uint z) { return ((y ^ z) & x) ^ z; } diff --git a/ChocolArm64/Instruction/AVectorHelper.cs b/ChocolArm64/Instruction/AVectorHelper.cs index befffaa656..4e33f93c43 100644 --- a/ChocolArm64/Instruction/AVectorHelper.cs +++ b/ChocolArm64/Instruction/AVectorHelper.cs @@ -9,13 +9,13 @@ namespace ChocolArm64.Instruction { internal static class AVectorHelper { - private static readonly Vector128 _zero32128Mask; + private static readonly Vector128 _zero32_128Mask; static AVectorHelper() { if (!Sse2.IsSupported) throw new PlatformNotSupportedException(); - _zero32128Mask = Sse.StaticCast(Sse2.SetVector128(0, 0, 0, 0xffffffff)); + _zero32_128Mask = Sse.StaticCast(Sse2.SetVector128(0, 0, 0, 0xffffffff)); } public static void EmitCall(AILEmitterCtx context, string name64, string name128) @@ -497,7 +497,7 @@ namespace ChocolArm64.Instruction [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 VectorZero32_128(Vector128 vector) { - if (Sse.IsSupported) return Sse.And(vector, _zero32128Mask); + if (Sse.IsSupported) return Sse.And(vector, _zero32_128Mask); throw new PlatformNotSupportedException(); } diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLExtension.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLExtension.cs index 43879173a6..eb3d500c48 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLExtension.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLExtension.cs @@ -5,13 +5,13 @@ namespace Ryujinx.Graphics.Gal.OpenGL { internal static class OGLExtension { - private static Lazy _sEnhancedLayouts = new Lazy(() => HasExtension("GL_ARB_enhanced_layouts")); - private static Lazy _sTextureMirrorClamp = new Lazy(() => HasExtension("GL_EXT_texture_mirror_clamp")); - private static Lazy _sViewportArray = new Lazy(() => HasExtension("GL_ARB_viewport_array")); + private static Lazy _enhancedLayouts = new Lazy(() => HasExtension("GL_ARB_enhanced_layouts")); + private static Lazy _textureMirrorClamp = new Lazy(() => HasExtension("GL_EXT_texture_mirror_clamp")); + private static Lazy _viewportArray = new Lazy(() => HasExtension("GL_ARB_viewport_array")); - public static bool EnhancedLayouts => _sEnhancedLayouts.Value; - public static bool TextureMirrorClamp => _sTextureMirrorClamp.Value; - public static bool ViewportArray => _sViewportArray.Value; + public static bool EnhancedLayouts => _enhancedLayouts.Value; + public static bool TextureMirrorClamp => _textureMirrorClamp.Value; + public static bool ViewportArray => _viewportArray.Value; private static bool HasExtension(string name) { diff --git a/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs b/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs index 468517604f..8893af3eb9 100644 --- a/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs +++ b/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs @@ -55,29 +55,29 @@ namespace Ryujinx.Graphics.Gal.Shader private string _stagePrefix; - private Dictionary _mCbTextures; + private Dictionary _cbTextures; - private Dictionary _mTextures; - private Dictionary _mUniforms; + private Dictionary _textures; + private Dictionary _uniforms; - private Dictionary _mAttributes; - private Dictionary _mInAttributes; - private Dictionary _mOutAttributes; + private Dictionary _attributes; + private Dictionary _inAttributes; + private Dictionary _outAttributes; - private Dictionary _mGprs; - private Dictionary _mPreds; + private Dictionary _gprs; + private Dictionary _preds; - public IReadOnlyDictionary CbTextures => _mCbTextures; + public IReadOnlyDictionary CbTextures => _cbTextures; - public IReadOnlyDictionary Textures => _mTextures; - public IReadOnlyDictionary Uniforms => _mUniforms; + public IReadOnlyDictionary Textures => _textures; + public IReadOnlyDictionary Uniforms => _uniforms; - public IReadOnlyDictionary Attributes => _mAttributes; - public IReadOnlyDictionary InAttributes => _mInAttributes; - public IReadOnlyDictionary OutAttributes => _mOutAttributes; + public IReadOnlyDictionary Attributes => _attributes; + public IReadOnlyDictionary InAttributes => _inAttributes; + public IReadOnlyDictionary OutAttributes => _outAttributes; - public IReadOnlyDictionary Gprs => _mGprs; - public IReadOnlyDictionary Preds => _mPreds; + public IReadOnlyDictionary Gprs => _gprs; + public IReadOnlyDictionary Preds => _preds; public GalShaderType ShaderType { get; private set; } @@ -85,17 +85,17 @@ namespace Ryujinx.Graphics.Gal.Shader { ShaderType = shaderType; - _mCbTextures = new Dictionary(); + _cbTextures = new Dictionary(); - _mTextures = new Dictionary(); - _mUniforms = new Dictionary(); + _textures = new Dictionary(); + _uniforms = new Dictionary(); - _mAttributes = new Dictionary(); - _mInAttributes = new Dictionary(); - _mOutAttributes = new Dictionary(); + _attributes = new Dictionary(); + _inAttributes = new Dictionary(); + _outAttributes = new Dictionary(); - _mGprs = new Dictionary(); - _mPreds = new Dictionary(); + _gprs = new Dictionary(); + _preds = new Dictionary(); } public GlslDecl(ShaderIrBlock[] blocks, GalShaderType shaderType, ShaderHeader header) @@ -111,7 +111,7 @@ namespace Ryujinx.Graphics.Gal.Shader for (int component = 0; component < 4; component++) if (header.OmapTargets[attachment].ComponentEnabled(component)) { - _mGprs.TryAdd(index, new ShaderDeclInfo(GetGprName(index), index)); + _gprs.TryAdd(index, new ShaderDeclInfo(GetGprName(index), index)); index++; } @@ -120,7 +120,7 @@ namespace Ryujinx.Graphics.Gal.Shader { index = header.DepthRegister; - _mGprs.TryAdd(index, new ShaderDeclInfo(GetGprName(index), index)); + _gprs.TryAdd(index, new ShaderDeclInfo(GetGprName(index), index)); } } @@ -136,25 +136,25 @@ namespace Ryujinx.Graphics.Gal.Shader { GlslDecl combined = new GlslDecl(GalShaderType.Vertex); - Merge(combined._mTextures, vpA._mTextures, vpB._mTextures); - Merge(combined._mUniforms, vpA._mUniforms, vpB._mUniforms); + Merge(combined._textures, vpA._textures, vpB._textures); + Merge(combined._uniforms, vpA._uniforms, vpB._uniforms); - Merge(combined._mAttributes, vpA._mAttributes, vpB._mAttributes); - Merge(combined._mOutAttributes, vpA._mOutAttributes, vpB._mOutAttributes); + Merge(combined._attributes, vpA._attributes, vpB._attributes); + Merge(combined._outAttributes, vpA._outAttributes, vpB._outAttributes); - Merge(combined._mGprs, vpA._mGprs, vpB._mGprs); - Merge(combined._mPreds, vpA._mPreds, vpB._mPreds); + Merge(combined._gprs, vpA._gprs, vpB._gprs); + Merge(combined._preds, vpA._preds, vpB._preds); //Merge input attributes. - foreach (KeyValuePair kv in vpA._mInAttributes) combined._mInAttributes.TryAdd(kv.Key, kv.Value); + foreach (KeyValuePair kv in vpA._inAttributes) combined._inAttributes.TryAdd(kv.Key, kv.Value); - foreach (KeyValuePair kv in vpB._mInAttributes) + foreach (KeyValuePair kv in vpB._inAttributes) //If Vertex Program A already writes to this attribute, //then we don't need to add it as an input attribute since //Vertex Program A will already have written to it anyway, //and there's no guarantee that there is an input attribute //for this slot. - if (!vpA._mOutAttributes.ContainsKey(kv.Key)) combined._mInAttributes.TryAdd(kv.Key, kv.Value); + if (!vpA._outAttributes.ContainsKey(kv.Key)) combined._inAttributes.TryAdd(kv.Key, kv.Value); return combined; } @@ -210,7 +210,7 @@ namespace Ryujinx.Graphics.Gal.Shader string name = _stagePrefix + TextureName + index; - _mTextures.TryAdd(handle, new ShaderDeclInfo(name, handle)); + _textures.TryAdd(handle, new ShaderDeclInfo(name, handle)); } else if (op.Inst == ShaderIrInst.Texb) { @@ -235,7 +235,7 @@ namespace Ryujinx.Graphics.Gal.Shader { string name = _stagePrefix + TextureName + "_cb" + cbuf.Index + "_" + cbuf.Pos; - _mCbTextures.Add(op, new ShaderDeclInfo(name, cbuf.Pos, true, cbuf.Index)); + _cbTextures.Add(op, new ShaderDeclInfo(name, cbuf.Pos, true, cbuf.Index)); } else { @@ -247,13 +247,13 @@ namespace Ryujinx.Graphics.Gal.Shader case ShaderIrOperCbuf cbuf: { - if (!_mUniforms.ContainsKey(cbuf.Index)) + if (!_uniforms.ContainsKey(cbuf.Index)) { string name = _stagePrefix + UniformName + cbuf.Index; ShaderDeclInfo declInfo = new ShaderDeclInfo(name, cbuf.Pos, true, cbuf.Index); - _mUniforms.Add(cbuf.Index, declInfo); + _uniforms.Add(cbuf.Index, declInfo); } break; } @@ -281,30 +281,30 @@ namespace Ryujinx.Graphics.Gal.Shader if (parent is ShaderIrAsg asg && asg.Dst == node) { - if (!_mOutAttributes.TryGetValue(index, out declInfo)) + if (!_outAttributes.TryGetValue(index, out declInfo)) { declInfo = new ShaderDeclInfo(OutAttrName + glslIndex, glslIndex); - _mOutAttributes.Add(index, declInfo); + _outAttributes.Add(index, declInfo); } } else { - if (!_mInAttributes.TryGetValue(index, out declInfo)) + if (!_inAttributes.TryGetValue(index, out declInfo)) { declInfo = new ShaderDeclInfo(InAttrName + glslIndex, glslIndex); - _mInAttributes.Add(index, declInfo); + _inAttributes.Add(index, declInfo); } } declInfo.Enlarge(elem + 1); - if (!_mAttributes.ContainsKey(index)) + if (!_attributes.ContainsKey(index)) { declInfo = new ShaderDeclInfo(AttrName + glslIndex, glslIndex, false, 0, 4); - _mAttributes.Add(index, declInfo); + _attributes.Add(index, declInfo); } Traverse(nodes, abuf, abuf.Vertex); @@ -318,18 +318,18 @@ namespace Ryujinx.Graphics.Gal.Shader { string name = GetGprName(gpr.Index); - _mGprs.TryAdd(gpr.Index, new ShaderDeclInfo(name, gpr.Index)); + _gprs.TryAdd(gpr.Index, new ShaderDeclInfo(name, gpr.Index)); } break; } case ShaderIrOperPred pred: { - if (!pred.IsConst && !HasName(_mPreds, pred.Index)) + if (!pred.IsConst && !HasName(_preds, pred.Index)) { string name = PredName + pred.Index; - _mPreds.TryAdd(pred.Index, new ShaderDeclInfo(name, pred.Index)); + _preds.TryAdd(pred.Index, new ShaderDeclInfo(name, pred.Index)); } break; } diff --git a/Ryujinx.Graphics/Memory/NvGpuPBEntry.cs b/Ryujinx.Graphics/Memory/NvGpuPBEntry.cs index 473e1ff991..5af23f1fca 100644 --- a/Ryujinx.Graphics/Memory/NvGpuPBEntry.cs +++ b/Ryujinx.Graphics/Memory/NvGpuPBEntry.cs @@ -9,15 +9,15 @@ namespace Ryujinx.Graphics.Memory public int SubChannel { get; private set; } - private int[] _mArguments; + private int[] _arguments; - public ReadOnlyCollection Arguments => Array.AsReadOnly(_mArguments); + public ReadOnlyCollection Arguments => Array.AsReadOnly(_arguments); public NvGpuPBEntry(int method, int subChannel, params int[] arguments) { Method = method; SubChannel = subChannel; - _mArguments = arguments; + _arguments = arguments; } } } \ No newline at end of file diff --git a/Ryujinx.Graphics/NvGpuEngine3d.cs b/Ryujinx.Graphics/NvGpuEngine3d.cs index cd77de4c4f..49363659bb 100644 --- a/Ryujinx.Graphics/NvGpuEngine3d.cs +++ b/Ryujinx.Graphics/NvGpuEngine3d.cs @@ -387,14 +387,14 @@ namespace Ryujinx.Graphics if (state.BlendEnabled) { - state.BlendSeparateAlpha = ReadRegisterBool(NvGpuEngine3dReg.BlendNSeparateAlpha); + state.BlendSeparateAlpha = ReadRegisterBool(NvGpuEngine3dReg.IBlendNSeparateAlpha); - state.BlendEquationRgb = (GalBlendEquation)ReadRegister(NvGpuEngine3dReg.BlendNEquationRgb); - state.BlendFuncSrcRgb = (GalBlendFactor)ReadRegister(NvGpuEngine3dReg.BlendNFuncSrcRgb); - state.BlendFuncDstRgb = (GalBlendFactor)ReadRegister(NvGpuEngine3dReg.BlendNFuncDstRgb); - state.BlendEquationAlpha = (GalBlendEquation)ReadRegister(NvGpuEngine3dReg.BlendNEquationAlpha); - state.BlendFuncSrcAlpha = (GalBlendFactor)ReadRegister(NvGpuEngine3dReg.BlendNFuncSrcAlpha); - state.BlendFuncDstAlpha = (GalBlendFactor)ReadRegister(NvGpuEngine3dReg.BlendNFuncDstAlpha); + state.BlendEquationRgb = (GalBlendEquation)ReadRegister(NvGpuEngine3dReg.IBlendNEquationRgb); + state.BlendFuncSrcRgb = (GalBlendFactor)ReadRegister(NvGpuEngine3dReg.IBlendNFuncSrcRgb); + state.BlendFuncDstRgb = (GalBlendFactor)ReadRegister(NvGpuEngine3dReg.IBlendNFuncDstRgb); + state.BlendEquationAlpha = (GalBlendEquation)ReadRegister(NvGpuEngine3dReg.IBlendNEquationAlpha); + state.BlendFuncSrcAlpha = (GalBlendFactor)ReadRegister(NvGpuEngine3dReg.IBlendNFuncSrcAlpha); + state.BlendFuncDstAlpha = (GalBlendFactor)ReadRegister(NvGpuEngine3dReg.IBlendNFuncDstAlpha); } } diff --git a/Ryujinx.Graphics/NvGpuEngine3dReg.cs b/Ryujinx.Graphics/NvGpuEngine3dReg.cs index c7f5a583e0..b78e5d900b 100644 --- a/Ryujinx.Graphics/NvGpuEngine3dReg.cs +++ b/Ryujinx.Graphics/NvGpuEngine3dReg.cs @@ -37,7 +37,7 @@ namespace Ryujinx.Graphics ZetaVert = 0x48b, ZetaArrayMode = 0x48c, DepthTestEnable = 0x4b3, - BlendEnable = 0x4b9, + IBlendEnable = 0x4b9, DepthWriteEnable = 0x4ba, DepthTestFunction = 0x4c3, BlendSeparateAlpha = 0x4cf, @@ -48,7 +48,7 @@ namespace Ryujinx.Graphics BlendFuncSrcAlpha = 0x4d4, BlendFuncDstAlpha = 0x4d6, BlendEnableMaster = 0x4d7, - BlendNEnable = 0x4d8, + BlendNEnable = 0x4d8, StencilEnable = 0x4e0, StencilFrontOpFail = 0x4e1, StencilFrontOpZFail = 0x4e2, @@ -88,13 +88,13 @@ namespace Ryujinx.Graphics VertexArrayNControl = 0x700, VertexArrayNAddress = 0x701, VertexArrayNDivisor = 0x703, - BlendNSeparateAlpha = 0x780, - BlendNEquationRgb = 0x781, - BlendNFuncSrcRgb = 0x782, - BlendNFuncDstRgb = 0x783, - BlendNEquationAlpha = 0x784, - BlendNFuncSrcAlpha = 0x785, - BlendNFuncDstAlpha = 0x786, + IBlendNSeparateAlpha = 0x780, + IBlendNEquationRgb = 0x781, + IBlendNFuncSrcRgb = 0x782, + IBlendNFuncDstRgb = 0x783, + IBlendNEquationAlpha = 0x784, + IBlendNFuncSrcAlpha = 0x785, + IBlendNFuncDstAlpha = 0x786, VertexArrayNEndAddr = 0x7c0, ShaderNControl = 0x800, ShaderNOffset = 0x801, diff --git a/Ryujinx.Graphics/Texture/ImageUtils.cs b/Ryujinx.Graphics/Texture/ImageUtils.cs index b20c96fe5b..584f363a3c 100644 --- a/Ryujinx.Graphics/Texture/ImageUtils.cs +++ b/Ryujinx.Graphics/Texture/ImageUtils.cs @@ -42,7 +42,7 @@ namespace Ryujinx.Graphics.Texture private const GalImageFormat Float = GalImageFormat.Float; private const GalImageFormat Srgb = GalImageFormat.Srgb; - private static readonly Dictionary _sTextureTable = + private static readonly Dictionary _textureTable = new Dictionary() { { GalTextureFormat.Rgba32, GalImageFormat.Rgba32 | Sint | Uint | Float }, @@ -89,7 +89,7 @@ namespace Ryujinx.Graphics.Texture { GalTextureFormat.Astc2D10X6, GalImageFormat.Astc2D10X6 | Unorm | Srgb } }; - private static readonly Dictionary _sImageTable = + private static readonly Dictionary _imageTable = new Dictionary() { { GalImageFormat.Rgba32, new ImageDescriptor(16, 1, 1, TargetBuffer.Color) }, @@ -146,7 +146,7 @@ namespace Ryujinx.Graphics.Texture { if (rType != gType || rType != bType || rType != aType) throw new NotImplementedException("Per component types are not implemented!"); - if (!_sTextureTable.TryGetValue(format, out GalImageFormat imageFormat)) throw new NotImplementedException($"Format 0x{(int)format:x} not implemented!"); + if (!_textureTable.TryGetValue(format, out GalImageFormat imageFormat)) throw new NotImplementedException($"Format 0x{(int)format:x} not implemented!"); GalImageFormat formatType = convSrgb ? Srgb : GetFormatType(rType); @@ -358,7 +358,7 @@ namespace Ryujinx.Graphics.Texture { GalImageFormat pixelFormat = format & GalImageFormat.FormatMask; - if (_sImageTable.TryGetValue(pixelFormat, out ImageDescriptor descriptor)) return descriptor; + if (_imageTable.TryGetValue(pixelFormat, out ImageDescriptor descriptor)) return descriptor; throw new NotImplementedException($"Format \"{pixelFormat}\" not implemented!"); }