diff --git a/Ryujinx.Graphics/Gal/EmbeddedResource.cs b/Ryujinx.Graphics/Gal/EmbeddedResource.cs index 45b77da71c..ba6624991e 100644 --- a/Ryujinx.Graphics/Gal/EmbeddedResource.cs +++ b/Ryujinx.Graphics/Gal/EmbeddedResource.cs @@ -5,15 +5,15 @@ namespace Ryujinx.Graphics.Gal { static class EmbeddedResource { - public static string GetString(string Name) + public static string GetString(string name) { - Assembly Asm = typeof(EmbeddedResource).Assembly; + Assembly asm = typeof(EmbeddedResource).Assembly; - using (Stream ResStream = Asm.GetManifestResourceStream(Name)) + using (Stream resStream = asm.GetManifestResourceStream(name)) { - StreamReader Reader = new StreamReader(ResStream); + StreamReader reader = new StreamReader(resStream); - return Reader.ReadToEnd(); + return reader.ReadToEnd(); } } } diff --git a/Ryujinx.Graphics/Gal/GalColorF.cs b/Ryujinx.Graphics/Gal/GalColorF.cs index 7cfb171dcd..e915870c2c 100644 --- a/Ryujinx.Graphics/Gal/GalColorF.cs +++ b/Ryujinx.Graphics/Gal/GalColorF.cs @@ -8,15 +8,15 @@ namespace Ryujinx.Graphics.Gal public float Alpha { get; private set; } public GalColorF( - float Red, - float Green, - float Blue, - float Alpha) + float red, + float green, + float blue, + float alpha) { - this.Red = Red; - this.Green = Green; - this.Blue = Blue; - this.Alpha = Alpha; + Red = red; + Green = green; + Blue = blue; + Alpha = alpha; } } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/GalFrontFace.cs b/Ryujinx.Graphics/Gal/GalFrontFace.cs index 17ad11267b..6cc4a80242 100644 --- a/Ryujinx.Graphics/Gal/GalFrontFace.cs +++ b/Ryujinx.Graphics/Gal/GalFrontFace.cs @@ -2,7 +2,7 @@ { public enum GalFrontFace { - CW = 0x900, - CCW = 0x901 + Cw = 0x900, + Ccw = 0x901 } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/GalImage.cs b/Ryujinx.Graphics/Gal/GalImage.cs index fb904b0925..1345704d29 100644 --- a/Ryujinx.Graphics/Gal/GalImage.cs +++ b/Ryujinx.Graphics/Gal/GalImage.cs @@ -25,63 +25,63 @@ namespace Ryujinx.Graphics.Gal public GalTextureTarget TextureTarget; public GalImage( - int Width, - int Height, - int Depth, - int LayerCount, - int TileWidth, - int GobBlockHeight, - int GobBlockDepth, - GalMemoryLayout Layout, - GalImageFormat Format, - GalTextureTarget TextureTarget, - int MaxMipmapLevel = 1, - GalTextureSource XSource = GalTextureSource.Red, - GalTextureSource YSource = GalTextureSource.Green, - GalTextureSource ZSource = GalTextureSource.Blue, - GalTextureSource WSource = GalTextureSource.Alpha) + int width, + int height, + int depth, + int layerCount, + int tileWidth, + int gobBlockHeight, + int gobBlockDepth, + GalMemoryLayout layout, + GalImageFormat format, + GalTextureTarget textureTarget, + int maxMipmapLevel = 1, + GalTextureSource xSource = GalTextureSource.Red, + GalTextureSource ySource = GalTextureSource.Green, + GalTextureSource zSource = GalTextureSource.Blue, + GalTextureSource wSource = GalTextureSource.Alpha) { - this.Width = Width; - this.Height = Height; - this.LayerCount = LayerCount; - this.Depth = Depth; - this.TileWidth = TileWidth; - this.GobBlockHeight = GobBlockHeight; - this.GobBlockDepth = GobBlockDepth; - this.Layout = Layout; - this.Format = Format; - this.MaxMipmapLevel = MaxMipmapLevel; - this.XSource = XSource; - this.YSource = YSource; - this.ZSource = ZSource; - this.WSource = WSource; - this.TextureTarget = TextureTarget; + Width = width; + Height = height; + LayerCount = layerCount; + Depth = depth; + TileWidth = tileWidth; + GobBlockHeight = gobBlockHeight; + GobBlockDepth = gobBlockDepth; + Layout = layout; + Format = format; + MaxMipmapLevel = maxMipmapLevel; + XSource = xSource; + YSource = ySource; + ZSource = zSource; + WSource = wSource; + TextureTarget = textureTarget; - Pitch = ImageUtils.GetPitch(Format, Width); + Pitch = ImageUtils.GetPitch(format, width); } - public bool SizeMatches(GalImage Image, bool IgnoreLayer = false) + public bool SizeMatches(GalImage image, bool ignoreLayer = false) { if (ImageUtils.GetBytesPerPixel(Format) != - ImageUtils.GetBytesPerPixel(Image.Format)) + ImageUtils.GetBytesPerPixel(image.Format)) { return false; } if (ImageUtils.GetAlignedWidth(this) != - ImageUtils.GetAlignedWidth(Image)) + ImageUtils.GetAlignedWidth(image)) { return false; } - bool Result = Height == Image.Height && Depth == Image.Depth; + bool result = Height == image.Height && Depth == image.Depth; - if (!IgnoreLayer) + if (!ignoreLayer) { - Result = Result && LayerCount == Image.LayerCount; + result = result && LayerCount == image.LayerCount; } - return Result; + return result; } } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/GalPipelineState.cs b/Ryujinx.Graphics/Gal/GalPipelineState.cs index 483a37be0f..c044a55fc3 100644 --- a/Ryujinx.Graphics/Gal/GalPipelineState.cs +++ b/Ryujinx.Graphics/Gal/GalPipelineState.cs @@ -111,9 +111,9 @@ { ConstBufferKeys = new long[Stages][]; - for (int Stage = 0; Stage < Stages; Stage++) + for (int stage = 0; stage < Stages; stage++) { - ConstBufferKeys[Stage] = new long[ConstBuffersPerStage]; + ConstBufferKeys[stage] = new long[ConstBuffersPerStage]; } Blends = new BlendState[RenderTargetsCount]; diff --git a/Ryujinx.Graphics/Gal/GalTextureSampler.cs b/Ryujinx.Graphics/Gal/GalTextureSampler.cs index 1d658cea85..2e57a130c6 100644 --- a/Ryujinx.Graphics/Gal/GalTextureSampler.cs +++ b/Ryujinx.Graphics/Gal/GalTextureSampler.cs @@ -16,26 +16,26 @@ namespace Ryujinx.Graphics.Gal public DepthCompareFunc DepthCompareFunc { get; private set; } public GalTextureSampler( - GalTextureWrap AddressU, - GalTextureWrap AddressV, - GalTextureWrap AddressP, - GalTextureFilter MinFilter, - GalTextureFilter MagFilter, - GalTextureMipFilter MipFilter, - GalColorF BorderColor, - bool DepthCompare, - DepthCompareFunc DepthCompareFunc) + GalTextureWrap addressU, + GalTextureWrap addressV, + GalTextureWrap addressP, + GalTextureFilter minFilter, + GalTextureFilter magFilter, + GalTextureMipFilter mipFilter, + GalColorF borderColor, + bool depthCompare, + DepthCompareFunc depthCompareFunc) { - this.AddressU = AddressU; - this.AddressV = AddressV; - this.AddressP = AddressP; - this.MinFilter = MinFilter; - this.MagFilter = MagFilter; - this.MipFilter = MipFilter; - this.BorderColor = BorderColor; + AddressU = addressU; + AddressV = addressV; + AddressP = addressP; + MinFilter = minFilter; + MagFilter = magFilter; + MipFilter = mipFilter; + BorderColor = borderColor; - this.DepthCompare = DepthCompare; - this.DepthCompareFunc = DepthCompareFunc; + DepthCompare = depthCompare; + DepthCompareFunc = depthCompareFunc; } } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/GalTextureType.cs b/Ryujinx.Graphics/Gal/GalTextureType.cs index f7dd16d15a..b02b8b37b4 100644 --- a/Ryujinx.Graphics/Gal/GalTextureType.cs +++ b/Ryujinx.Graphics/Gal/GalTextureType.cs @@ -6,8 +6,8 @@ Unorm = 2, Sint = 3, Uint = 4, - Snorm_Force_Fp16 = 5, - Unorm_Force_Fp16 = 6, + SnormForceFp16 = 5, + UnormForceFp16 = 6, Float = 7 } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/GalVertexAttrib.cs b/Ryujinx.Graphics/Gal/GalVertexAttrib.cs index 31b648df38..feca5aea33 100644 --- a/Ryujinx.Graphics/Gal/GalVertexAttrib.cs +++ b/Ryujinx.Graphics/Gal/GalVertexAttrib.cs @@ -13,21 +13,21 @@ namespace Ryujinx.Graphics.Gal public bool IsBgra { get; private set; } public GalVertexAttrib( - int Index, - bool IsConst, - int Offset, - byte[] Data, - GalVertexAttribSize Size, - GalVertexAttribType Type, - bool IsBgra) + int index, + bool isConst, + int offset, + byte[] data, + GalVertexAttribSize size, + GalVertexAttribType type, + bool isBgra) { - this.Index = Index; - this.IsConst = IsConst; - this.Data = Data; - this.Offset = Offset; - this.Size = Size; - this.Type = Type; - this.IsBgra = IsBgra; + Index = index; + IsConst = isConst; + Data = data; + Offset = offset; + Size = size; + Type = type; + IsBgra = isBgra; } } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/IGalConstBuffer.cs b/Ryujinx.Graphics/Gal/IGalConstBuffer.cs index 0cdcc2371f..8c4e6d0328 100644 --- a/Ryujinx.Graphics/Gal/IGalConstBuffer.cs +++ b/Ryujinx.Graphics/Gal/IGalConstBuffer.cs @@ -7,11 +7,11 @@ namespace Ryujinx.Graphics.Gal void LockCache(); void UnlockCache(); - void Create(long Key, long Size); + void Create(long key, long size); - bool IsCached(long Key, long Size); + bool IsCached(long key, long size); - void SetData(long Key, long Size, IntPtr HostAddress); - void SetData(long Key, byte[] Data); + void SetData(long key, long size, IntPtr hostAddress); + void SetData(long key, byte[] data); } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/IGalMemory.cs b/Ryujinx.Graphics/Gal/IGalMemory.cs index e6762b50cc..5161d3f5f1 100644 --- a/Ryujinx.Graphics/Gal/IGalMemory.cs +++ b/Ryujinx.Graphics/Gal/IGalMemory.cs @@ -2,6 +2,6 @@ namespace Ryujinx.Graphics.Gal { public unsafe interface IGalMemory { - int ReadInt32(long Position); + int ReadInt32(long position); } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/IGalPipeline.cs b/Ryujinx.Graphics/Gal/IGalPipeline.cs index cba4e7dcc6..4f14968350 100644 --- a/Ryujinx.Graphics/Gal/IGalPipeline.cs +++ b/Ryujinx.Graphics/Gal/IGalPipeline.cs @@ -2,9 +2,9 @@ { public interface IGalPipeline { - void Bind(GalPipelineState State); + void Bind(GalPipelineState state); void ResetDepthMask(); - void ResetColorMask(int Index); + void ResetColorMask(int index); } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/IGalRasterizer.cs b/Ryujinx.Graphics/Gal/IGalRasterizer.cs index 04f7aae50a..33bdeaad8c 100644 --- a/Ryujinx.Graphics/Gal/IGalRasterizer.cs +++ b/Ryujinx.Graphics/Gal/IGalRasterizer.cs @@ -8,29 +8,29 @@ namespace Ryujinx.Graphics.Gal void UnlockCaches(); void ClearBuffers( - GalClearBufferFlags Flags, - int Attachment, - float Red, - float Green, - float Blue, - float Alpha, - float Depth, - int Stencil); + GalClearBufferFlags flags, + int attachment, + float red, + float green, + float blue, + float alpha, + float depth, + int stencil); - bool IsVboCached(long Key, long DataSize); + bool IsVboCached(long key, long dataSize); - bool IsIboCached(long Key, long DataSize); + bool IsIboCached(long key, long dataSize); - void CreateVbo(long Key, int DataSize, IntPtr HostAddress); - void CreateVbo(long Key, byte[] Data); + void CreateVbo(long key, int dataSize, IntPtr hostAddress); + void CreateVbo(long key, byte[] data); - void CreateIbo(long Key, int DataSize, IntPtr HostAddress); - void CreateIbo(long Key, int DataSize, byte[] Buffer); + void CreateIbo(long key, int dataSize, IntPtr hostAddress); + void CreateIbo(long key, int dataSize, byte[] buffer); - void SetIndexArray(int Size, GalIndexFormat Format); + void SetIndexArray(int size, GalIndexFormat format); - void DrawArrays(int First, int Count, GalPrimitiveType PrimType); + void DrawArrays(int first, int count, GalPrimitiveType primType); - void DrawElements(long IboKey, int First, int VertexBase, GalPrimitiveType PrimType); + void DrawElements(long iboKey, int first, int vertexBase, GalPrimitiveType primType); } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/IGalRenderTarget.cs b/Ryujinx.Graphics/Gal/IGalRenderTarget.cs index 90cad856d9..c281fe06c3 100644 --- a/Ryujinx.Graphics/Gal/IGalRenderTarget.cs +++ b/Ryujinx.Graphics/Gal/IGalRenderTarget.cs @@ -4,42 +4,42 @@ namespace Ryujinx.Graphics.Gal { void Bind(); - void BindColor(long Key, int Attachment); + void BindColor(long key, int attachment); - void UnbindColor(int Attachment); + void UnbindColor(int attachment); - void BindZeta(long Key); + void BindZeta(long key); void UnbindZeta(); - void Present(long Key); + void Present(long key); - void SetMap(int[] Map); + void SetMap(int[] map); - void SetTransform(bool FlipX, bool FlipY, int Top, int Left, int Right, int Bottom); + void SetTransform(bool flipX, bool flipY, int top, int left, int right, int bottom); - void SetWindowSize(int Width, int Height); + void SetWindowSize(int width, int height); - void SetViewport(int Attachment, int X, int Y, int Width, int Height); + void SetViewport(int attachment, int x, int y, int width, int height); void Render(); void Copy( - GalImage SrcImage, - GalImage DstImage, - long SrcKey, - long DstKey, - int SrcLayer, - int DstLayer, - int SrcX0, - int SrcY0, - int SrcX1, - int SrcY1, - int DstX0, - int DstY0, - int DstX1, - int DstY1); + GalImage srcImage, + GalImage dstImage, + long srcKey, + long dstKey, + int srcLayer, + int dstLayer, + int srcX0, + int srcY0, + int srcX1, + int srcY1, + int dstX0, + int dstY0, + int dstX1, + int dstY1); - void Reinterpret(long Key, GalImage NewImage); + void Reinterpret(long key, GalImage newImage); } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/IGalRenderer.cs b/Ryujinx.Graphics/Gal/IGalRenderer.cs index 41e95a8789..1acc4d03b1 100644 --- a/Ryujinx.Graphics/Gal/IGalRenderer.cs +++ b/Ryujinx.Graphics/Gal/IGalRenderer.cs @@ -4,7 +4,7 @@ namespace Ryujinx.Graphics.Gal { public interface IGalRenderer { - void QueueAction(Action ActionMthd); + void QueueAction(Action actionMthd); void RunActions(); diff --git a/Ryujinx.Graphics/Gal/IGalShader.cs b/Ryujinx.Graphics/Gal/IGalShader.cs index 4b951fa611..99cd4d7624 100644 --- a/Ryujinx.Graphics/Gal/IGalShader.cs +++ b/Ryujinx.Graphics/Gal/IGalShader.cs @@ -4,16 +4,16 @@ namespace Ryujinx.Graphics.Gal { public interface IGalShader { - void Create(IGalMemory Memory, long Key, GalShaderType Type); + void Create(IGalMemory memory, long key, GalShaderType type); - void Create(IGalMemory Memory, long VpAPos, long Key, GalShaderType Type); + void Create(IGalMemory memory, long vpAPos, long key, GalShaderType type); - IEnumerable GetConstBufferUsage(long Key); - IEnumerable GetTextureUsage(long Key); + IEnumerable GetConstBufferUsage(long key); + IEnumerable GetTextureUsage(long key); - void Bind(long Key); + void Bind(long key); - void Unbind(GalShaderType Type); + void Unbind(GalShaderType type); void BindProgram(); } diff --git a/Ryujinx.Graphics/Gal/IGalTexture.cs b/Ryujinx.Graphics/Gal/IGalTexture.cs index de4ba9cba7..23ce054ae9 100644 --- a/Ryujinx.Graphics/Gal/IGalTexture.cs +++ b/Ryujinx.Graphics/Gal/IGalTexture.cs @@ -5,14 +5,14 @@ namespace Ryujinx.Graphics.Gal void LockCache(); void UnlockCache(); - void Create(long Key, int Size, GalImage Image); + void Create(long key, int size, GalImage image); - void Create(long Key, byte[] Data, GalImage Image); + void Create(long key, byte[] data, GalImage image); - bool TryGetImage(long Key, out GalImage Image); + bool TryGetImage(long key, out GalImage image); - void Bind(long Key, int Index, GalImage Image); + void Bind(long key, int index, GalImage image); - void SetSampler(GalImage Image, GalTextureSampler Sampler); + void SetSampler(GalImage image, GalTextureSampler sampler); } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs index 648fef2532..c39b0d4677 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs @@ -9,8 +9,8 @@ namespace Ryujinx.Graphics.Gal.OpenGL { switch (frontFace) { - case GalFrontFace.CW: return FrontFaceDirection.Cw; - case GalFrontFace.CCW: return FrontFaceDirection.Ccw; + case GalFrontFace.Cw: return FrontFaceDirection.Cw; + case GalFrontFace.Ccw: return FrontFaceDirection.Ccw; } throw new ArgumentException(nameof(frontFace) + " \"" + frontFace + "\" is not valid!"); diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs index 55ca7643b6..f4994e8a80 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs @@ -98,7 +98,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL //These values match OpenGL's defaults _old = new GalPipelineState { - FrontFace = GalFrontFace.CCW, + FrontFace = GalFrontFace.Ccw, CullFaceEnabled = false, CullFace = GalCullFace.Back, diff --git a/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs b/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs index 49989ce290..19025a9722 100644 --- a/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs +++ b/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs @@ -85,7 +85,7 @@ namespace Ryujinx.Graphics.Gal.Shader private GlslDecl(GalShaderType shaderType) { - this.ShaderType = shaderType; + ShaderType = shaderType; m_CbTextures = new Dictionary(); diff --git a/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs b/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs index 7c1a13fdfe..fd0f718963 100644 --- a/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs +++ b/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs @@ -114,8 +114,8 @@ namespace Ryujinx.Graphics.Gal.Shader { ShaderIrInst.Xor, GetXorExpr } }; - this.MaxUboSize = maxUboSize / 16; - this._isNvidiaDriver = isNvidiaDriver; + MaxUboSize = maxUboSize / 16; + _isNvidiaDriver = isNvidiaDriver; } public GlslProgram Decompile( diff --git a/Ryujinx.Graphics/Gal/Shader/GlslProgram.cs b/Ryujinx.Graphics/Gal/Shader/GlslProgram.cs index 75d8b2a94b..be8555d572 100644 --- a/Ryujinx.Graphics/Gal/Shader/GlslProgram.cs +++ b/Ryujinx.Graphics/Gal/Shader/GlslProgram.cs @@ -14,9 +14,9 @@ namespace Ryujinx.Graphics.Gal.Shader IEnumerable textures, IEnumerable uniforms) { - this.Code = code; - this.Textures = textures; - this.Uniforms = uniforms; + Code = code; + Textures = textures; + Uniforms = uniforms; } } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderIrAsg.cs b/Ryujinx.Graphics/Gal/Shader/ShaderIrAsg.cs index 6c3e8b81ce..53871a1451 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderIrAsg.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderIrAsg.cs @@ -7,8 +7,8 @@ namespace Ryujinx.Graphics.Gal.Shader public ShaderIrAsg(ShaderIrNode dst, ShaderIrNode src) { - this.Dst = dst; - this.Src = src; + Dst = dst; + Src = src; } } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderIrBlock.cs b/Ryujinx.Graphics/Gal/Shader/ShaderIrBlock.cs index 22243823cd..49257d2834 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderIrBlock.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderIrBlock.cs @@ -16,7 +16,7 @@ namespace Ryujinx.Graphics.Gal.Shader public ShaderIrBlock(int position) { - this.Position = position; + Position = position; Sources = new List(); diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderIrCmnt.cs b/Ryujinx.Graphics/Gal/Shader/ShaderIrCmnt.cs index 8ae8c88bda..5da04e5ee2 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderIrCmnt.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderIrCmnt.cs @@ -6,7 +6,7 @@ namespace Ryujinx.Graphics.Gal.Shader public ShaderIrCmnt(string comment) { - this.Comment = comment; + Comment = comment; } } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderIrCond.cs b/Ryujinx.Graphics/Gal/Shader/ShaderIrCond.cs index 5f9b6891b3..34acf90d7e 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderIrCond.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderIrCond.cs @@ -9,9 +9,9 @@ namespace Ryujinx.Graphics.Gal.Shader public ShaderIrCond(ShaderIrNode pred, ShaderIrNode child, bool not) { - this.Pred = pred; - this.Child = child; - this.Not = not; + Pred = pred; + Child = child; + Not = not; } } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderIrMetaIpa.cs b/Ryujinx.Graphics/Gal/Shader/ShaderIrMetaIpa.cs index a536212a03..07db646757 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderIrMetaIpa.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderIrMetaIpa.cs @@ -6,7 +6,7 @@ public ShaderIrMetaIpa(ShaderIpaMode mode) { - this.Mode = mode; + Mode = mode; } } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderIrMetaTex.cs b/Ryujinx.Graphics/Gal/Shader/ShaderIrMetaTex.cs index d9a3dc5a18..e0265138c8 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderIrMetaTex.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderIrMetaTex.cs @@ -15,10 +15,10 @@ namespace Ryujinx.Graphics.Gal.Shader public ShaderIrMetaTex(int elem, GalTextureTarget textureTarget, TextureInstructionSuffix textureInstructionSuffix, params ShaderIrNode[] coordinates) { - this.Elem = elem; - this.TextureTarget = textureTarget; - this.TextureInstructionSuffix = textureInstructionSuffix; - this.Coordinates = coordinates; + Elem = elem; + TextureTarget = textureTarget; + TextureInstructionSuffix = textureInstructionSuffix; + Coordinates = coordinates; } } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderIrMetaTexq.cs b/Ryujinx.Graphics/Gal/Shader/ShaderIrMetaTexq.cs index 604a093a15..c925ea4e1a 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderIrMetaTexq.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderIrMetaTexq.cs @@ -8,8 +8,8 @@ namespace Ryujinx.Graphics.Gal.Shader public ShaderIrMetaTexq(ShaderTexqInfo info, int elem) { - this.Info = info; - this.Elem = elem; + Info = info; + Elem = elem; } } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderIrOp.cs b/Ryujinx.Graphics/Gal/Shader/ShaderIrOp.cs index f993401a20..c91c392653 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderIrOp.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderIrOp.cs @@ -15,11 +15,11 @@ namespace Ryujinx.Graphics.Gal.Shader ShaderIrNode operandC = null, ShaderIrMeta metaData = null) { - this.Inst = inst; - this.OperandA = operandA; - this.OperandB = operandB; - this.OperandC = operandC; - this.MetaData = metaData; + Inst = inst; + OperandA = operandA; + OperandB = operandB; + OperandC = operandC; + MetaData = metaData; } } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderIrOperAbuf.cs b/Ryujinx.Graphics/Gal/Shader/ShaderIrOperAbuf.cs index dcd9fa0def..1f339e8051 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderIrOperAbuf.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderIrOperAbuf.cs @@ -8,8 +8,8 @@ namespace Ryujinx.Graphics.Gal.Shader public ShaderIrOperAbuf(int offs, ShaderIrNode vertex) { - this.Offs = offs; - this.Vertex = vertex; + Offs = offs; + Vertex = vertex; } } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderIrOperCbuf.cs b/Ryujinx.Graphics/Gal/Shader/ShaderIrOperCbuf.cs index 3cbd31afec..9f419bbbec 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderIrOperCbuf.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderIrOperCbuf.cs @@ -9,9 +9,9 @@ namespace Ryujinx.Graphics.Gal.Shader public ShaderIrOperCbuf(int index, int pos, ShaderIrNode offs = null) { - this.Index = index; - this.Pos = pos; - this.Offs = offs; + Index = index; + Pos = pos; + Offs = offs; } } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderIrOperGpr.cs b/Ryujinx.Graphics/Gal/Shader/ShaderIrOperGpr.cs index e38b3afc81..0d102d8978 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderIrOperGpr.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderIrOperGpr.cs @@ -15,15 +15,15 @@ namespace Ryujinx.Graphics.Gal.Shader public ShaderIrOperGpr(int index) { - this.Index = index; + Index = index; RegisterSize = ShaderRegisterSize.Single; } public ShaderIrOperGpr(int index, int halfPart) { - this.Index = index; - this.HalfPart = halfPart; + Index = index; + HalfPart = halfPart; RegisterSize = ShaderRegisterSize.Half; } diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderIrOperImm.cs b/Ryujinx.Graphics/Gal/Shader/ShaderIrOperImm.cs index ed6ed37394..6b23b36574 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderIrOperImm.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderIrOperImm.cs @@ -6,7 +6,7 @@ namespace Ryujinx.Graphics.Gal.Shader public ShaderIrOperImm(int value) { - this.Value = value; + Value = value; } } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderIrOperImmf.cs b/Ryujinx.Graphics/Gal/Shader/ShaderIrOperImmf.cs index fc01eb09ad..5b08c5b1c9 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderIrOperImmf.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderIrOperImmf.cs @@ -6,7 +6,7 @@ namespace Ryujinx.Graphics.Gal.Shader public ShaderIrOperImmf(float value) { - this.Value = value; + Value = value; } } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderIrOperPred.cs b/Ryujinx.Graphics/Gal/Shader/ShaderIrOperPred.cs index ab1430e0b5..6c16a145d9 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderIrOperPred.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderIrOperPred.cs @@ -11,7 +11,7 @@ namespace Ryujinx.Graphics.Gal.Shader public ShaderIrOperPred(int index) { - this.Index = index; + Index = index; } } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderOpCodeTable.cs b/Ryujinx.Graphics/Gal/Shader/ShaderOpCodeTable.cs index d1f6310a30..1edf91a015 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderOpCodeTable.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderOpCodeTable.cs @@ -14,8 +14,8 @@ namespace Ryujinx.Graphics.Gal.Shader public ShaderDecodeEntry(ShaderDecodeFunc func, int xBits) { - this.Func = func; - this.XBits = xBits; + Func = func; + XBits = xBits; } } diff --git a/Ryujinx.Graphics/Gal/ShaderDeclInfo.cs b/Ryujinx.Graphics/Gal/ShaderDeclInfo.cs index ed1955cdbb..f1f4650c8f 100644 --- a/Ryujinx.Graphics/Gal/ShaderDeclInfo.cs +++ b/Ryujinx.Graphics/Gal/ShaderDeclInfo.cs @@ -16,29 +16,29 @@ namespace Ryujinx.Graphics.Gal public TextureInstructionSuffix TextureSuffix { get; private set; } public ShaderDeclInfo( - string Name, - int Index, - bool IsCb = false, - int Cbuf = 0, - int Size = 1, - GalTextureTarget TextureTarget = GalTextureTarget.TwoD, - TextureInstructionSuffix TextureSuffix = TextureInstructionSuffix.None) + string name, + int index, + bool isCb = false, + int cbuf = 0, + int size = 1, + GalTextureTarget textureTarget = GalTextureTarget.TwoD, + TextureInstructionSuffix textureSuffix = TextureInstructionSuffix.None) { - this.Name = Name; - this.Index = Index; - this.IsCb = IsCb; - this.Cbuf = Cbuf; - this.Size = Size; + Name = name; + Index = index; + IsCb = isCb; + Cbuf = cbuf; + Size = size; - this.TextureTarget = TextureTarget; - this.TextureSuffix = TextureSuffix; + TextureTarget = textureTarget; + TextureSuffix = textureSuffix; } - internal void Enlarge(int NewSize) + internal void Enlarge(int newSize) { - if (Size < NewSize) + if (Size < newSize) { - Size = NewSize; + Size = newSize; } } } diff --git a/Ryujinx.Graphics/Gal/ShaderDumper.cs b/Ryujinx.Graphics/Gal/ShaderDumper.cs index 21e92491a7..726447e426 100644 --- a/Ryujinx.Graphics/Gal/ShaderDumper.cs +++ b/Ryujinx.Graphics/Gal/ShaderDumper.cs @@ -5,67 +5,67 @@ namespace Ryujinx.Graphics.Gal { static class ShaderDumper { - private static string RuntimeDir; + private static string _runtimeDir; public static int DumpIndex { get; private set; } = 1; - public static void Dump(IGalMemory Memory, long Position, GalShaderType Type, string ExtSuffix = "") + public static void Dump(IGalMemory memory, long position, GalShaderType type, string extSuffix = "") { if (!IsDumpEnabled()) { return; } - string FileName = "Shader" + DumpIndex.ToString("d4") + "." + ShaderExtension(Type) + ExtSuffix + ".bin"; + string fileName = "Shader" + DumpIndex.ToString("d4") + "." + ShaderExtension(type) + extSuffix + ".bin"; - string FullPath = Path.Combine(FullDir(), FileName); - string CodePath = Path.Combine(CodeDir(), FileName); + string fullPath = Path.Combine(FullDir(), fileName); + string codePath = Path.Combine(CodeDir(), fileName); DumpIndex++; - using (FileStream FullFile = File.Create(FullPath)) - using (FileStream CodeFile = File.Create(CodePath)) + using (FileStream fullFile = File.Create(fullPath)) + using (FileStream codeFile = File.Create(codePath)) { - BinaryWriter FullWriter = new BinaryWriter(FullFile); - BinaryWriter CodeWriter = new BinaryWriter(CodeFile); + BinaryWriter fullWriter = new BinaryWriter(fullFile); + BinaryWriter codeWriter = new BinaryWriter(codeFile); for (long i = 0; i < 0x50; i += 4) { - FullWriter.Write(Memory.ReadInt32(Position + i)); + fullWriter.Write(memory.ReadInt32(position + i)); } - long Offset = 0; + long offset = 0; - ulong Instruction = 0; + ulong instruction = 0; //Dump until a NOP instruction is found - while ((Instruction >> 48 & 0xfff8) != 0x50b0) + while ((instruction >> 48 & 0xfff8) != 0x50b0) { - uint Word0 = (uint)Memory.ReadInt32(Position + 0x50 + Offset + 0); - uint Word1 = (uint)Memory.ReadInt32(Position + 0x50 + Offset + 4); + uint word0 = (uint)memory.ReadInt32(position + 0x50 + offset + 0); + uint word1 = (uint)memory.ReadInt32(position + 0x50 + offset + 4); - Instruction = Word0 | (ulong)Word1 << 32; + instruction = word0 | (ulong)word1 << 32; //Zero instructions (other kind of NOP) stop immediatly, //this is to avoid two rows of zeroes - if (Instruction == 0) + if (instruction == 0) { break; } - FullWriter.Write(Instruction); - CodeWriter.Write(Instruction); + fullWriter.Write(instruction); + codeWriter.Write(instruction); - Offset += 8; + offset += 8; } //Align to meet nvdisasm requeriments - while (Offset % 0x20 != 0) + while (offset % 0x20 != 0) { - FullWriter.Write(0); - CodeWriter.Write(0); + fullWriter.Write(0); + codeWriter.Write(0); - Offset += 4; + offset += 4; } } } @@ -87,37 +87,37 @@ namespace Ryujinx.Graphics.Gal private static string DumpDir() { - if (string.IsNullOrEmpty(RuntimeDir)) + if (string.IsNullOrEmpty(_runtimeDir)) { - int Index = 1; + int index = 1; do { - RuntimeDir = Path.Combine(GraphicsConfig.ShadersDumpPath, "Dumps" + Index.ToString("d2")); + _runtimeDir = Path.Combine(GraphicsConfig.ShadersDumpPath, "Dumps" + index.ToString("d2")); - Index++; + index++; } - while (Directory.Exists(RuntimeDir)); + while (Directory.Exists(_runtimeDir)); - Directory.CreateDirectory(RuntimeDir); + Directory.CreateDirectory(_runtimeDir); } - return RuntimeDir; + return _runtimeDir; } - private static string CreateAndReturn(string Dir) + private static string CreateAndReturn(string dir) { - if (!Directory.Exists(Dir)) + if (!Directory.Exists(dir)) { - Directory.CreateDirectory(Dir); + Directory.CreateDirectory(dir); } - return Dir; + return dir; } - private static string ShaderExtension(GalShaderType Type) + private static string ShaderExtension(GalShaderType type) { - switch (Type) + switch (type) { case GalShaderType.Vertex: return "vert"; case GalShaderType.TessControl: return "tesc"; @@ -125,7 +125,7 @@ namespace Ryujinx.Graphics.Gal case GalShaderType.Geometry: return "geom"; case GalShaderType.Fragment: return "frag"; - default: throw new ArgumentException(nameof(Type)); + default: throw new ArgumentException(nameof(type)); } } } diff --git a/Ryujinx.Graphics/Gal/ShaderException.cs b/Ryujinx.Graphics/Gal/ShaderException.cs index 9bc87ff3db..b0aff42bf5 100644 --- a/Ryujinx.Graphics/Gal/ShaderException.cs +++ b/Ryujinx.Graphics/Gal/ShaderException.cs @@ -6,6 +6,6 @@ namespace Ryujinx.Graphics.Gal { public ShaderException() : base() { } - public ShaderException(string Message) : base(Message) { } + public ShaderException(string message) : base(message) { } } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Graphics3d/NvGpuEngine3d.cs b/Ryujinx.Graphics/Graphics3d/NvGpuEngine3d.cs index eb6289fbdb..162ff42dbc 100644 --- a/Ryujinx.Graphics/Graphics3d/NvGpuEngine3d.cs +++ b/Ryujinx.Graphics/Graphics3d/NvGpuEngine3d.cs @@ -67,7 +67,7 @@ namespace Ryujinx.Graphics.Graphics3d WriteRegister(NvGpuEngine3dReg.FrameBufferSrgb, 1); - WriteRegister(NvGpuEngine3dReg.FrontFace, (int)GalFrontFace.CW); + WriteRegister(NvGpuEngine3dReg.FrontFace, (int)GalFrontFace.Cw); for (int Index = 0; Index < GalPipelineState.RenderTargetsCount; Index++) { @@ -364,8 +364,8 @@ namespace Ryujinx.Graphics.Graphics3d { switch (FrontFace) { - case GalFrontFace.CW: FrontFace = GalFrontFace.CCW; break; - case GalFrontFace.CCW: FrontFace = GalFrontFace.CW; break; + case GalFrontFace.Cw: FrontFace = GalFrontFace.Ccw; break; + case GalFrontFace.Ccw: FrontFace = GalFrontFace.Cw; break; } }