diff options
| author | Alex Barney <thealexbarney@gmail.com> | 2019-07-01 21:39:22 -0500 |
|---|---|---|
| committer | Ac_K <Acoustik666@gmail.com> | 2019-07-02 04:39:22 +0200 |
| commit | b2b736abc2569ab5d8199da666aef8d8394844a0 (patch) | |
| tree | 88bcc2ae4fb0d4161c95df2cd7edb12388de922a /Ryujinx.Graphics/Gal | |
| parent | 10c74182babaf8cf6bedaeffd64c3109df4ea816 (diff) | |
Misc cleanup (#708)
* Fix typos
* Remove unneeded using statements
* Enforce var style more
* Remove redundant qualifiers
* Fix some indentation
* Disable naming warnings on files with external enum names
* Fix build
* Mass find & replace for comments with no spacing
* Standardize todo capitalization and for/if spacing
Diffstat (limited to 'Ryujinx.Graphics/Gal')
| -rw-r--r-- | Ryujinx.Graphics/Gal/GalImageFormat.cs | 3 | ||||
| -rw-r--r-- | Ryujinx.Graphics/Gal/GalVertexBinding.cs | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics/Gal/OpenGL/OglEnumConverter.cs | 4 | ||||
| -rw-r--r-- | Ryujinx.Graphics/Gal/OpenGL/OglPipeline.cs | 8 | ||||
| -rw-r--r-- | Ryujinx.Graphics/Gal/OpenGL/OglRenderTarget.cs | 12 | ||||
| -rw-r--r-- | Ryujinx.Graphics/Gal/OpenGL/OglShader.cs | 8 | ||||
| -rw-r--r-- | Ryujinx.Graphics/Gal/OpenGL/OglTexture.cs | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics/Gal/ShaderDumper.cs | 8 |
8 files changed, 24 insertions, 23 deletions
diff --git a/Ryujinx.Graphics/Gal/GalImageFormat.cs b/Ryujinx.Graphics/Gal/GalImageFormat.cs index 8dcde182..19ce6cfc 100644 --- a/Ryujinx.Graphics/Gal/GalImageFormat.cs +++ b/Ryujinx.Graphics/Gal/GalImageFormat.cs @@ -1,4 +1,5 @@ -using System; +// ReSharper disable InconsistentNaming +using System; namespace Ryujinx.Graphics.Gal { diff --git a/Ryujinx.Graphics/Gal/GalVertexBinding.cs b/Ryujinx.Graphics/Gal/GalVertexBinding.cs index 0c3c845d..2337c2e3 100644 --- a/Ryujinx.Graphics/Gal/GalVertexBinding.cs +++ b/Ryujinx.Graphics/Gal/GalVertexBinding.cs @@ -2,7 +2,7 @@ namespace Ryujinx.Graphics.Gal { public struct GalVertexBinding { - //VboKey shouldn't be here, but ARB_vertex_attrib_binding is core since 4.3 + // VboKey shouldn't be here, but ARB_vertex_attrib_binding is core since 4.3 public bool Enabled; public int Stride; diff --git a/Ryujinx.Graphics/Gal/OpenGL/OglEnumConverter.cs b/Ryujinx.Graphics/Gal/OpenGL/OglEnumConverter.cs index a3f9957f..c36d8bf9 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OglEnumConverter.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OglEnumConverter.cs @@ -275,7 +275,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL } else { - //Fallback to non-mirrored clamps + // Fallback to non-mirrored clamps switch (wrap) { case GalTextureWrap.MirrorClampToEdge: return TextureWrapMode.ClampToEdge; @@ -291,7 +291,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL GalTextureFilter minFilter, GalTextureMipFilter mipFilter) { - //TODO: Mip (needs mipmap support first). + // TODO: Mip (needs mipmap support first). switch (minFilter) { case GalTextureFilter.Nearest: return TextureMinFilter.Nearest; diff --git a/Ryujinx.Graphics/Gal/OpenGL/OglPipeline.cs b/Ryujinx.Graphics/Gal/OpenGL/OglPipeline.cs index 64768e28..8d886be4 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OglPipeline.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OglPipeline.cs @@ -96,7 +96,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL _rasterizer = rasterizer; _shader = shader; - //These values match OpenGL's defaults + // These values match OpenGL's defaults _old = new GalPipelineState { FrontFace = GalFrontFace.Ccw, @@ -564,14 +564,14 @@ namespace Ryujinx.Graphics.Gal.OpenGL { _vaoHandle = GL.GenVertexArray(); - //Vertex arrays shouldn't be used anywhere else in OpenGL's backend - //if you want to use it, move this line out of the if + // Vertex arrays shouldn't be used anywhere else in OpenGL's backend + // if you want to use it, move this line out of the if GL.BindVertexArray(_vaoHandle); } foreach (GalVertexAttrib attrib in binding.Attribs) { - //Skip uninitialized attributes. + // Skip uninitialized attributes. if (attrib.Size == 0) { continue; diff --git a/Ryujinx.Graphics/Gal/OpenGL/OglRenderTarget.cs b/Ryujinx.Graphics/Gal/OpenGL/OglRenderTarget.cs index d36bac1b..11fc98cb 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OglRenderTarget.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OglRenderTarget.cs @@ -77,11 +77,11 @@ namespace Ryujinx.Graphics.Gal.OpenGL private int _cropRight; private int _cropBottom; - //This framebuffer is used to attach guest rendertargets, - //think of it as a dummy OpenGL VAO + // This framebuffer is used to attach guest rendertargets, + // think of it as a dummy OpenGL VAO private int _dummyFrameBuffer; - //These framebuffers are used to blit images + // These framebuffers are used to blit images private int _srcFb; private int _dstFb; @@ -109,8 +109,8 @@ namespace Ryujinx.Graphics.Gal.OpenGL private void TextureDeletionHandler(object sender, int handle) { - //Texture was deleted, the handle is no longer valid, so - //reset all uses of this handle on a render target. + // Texture was deleted, the handle is no longer valid, so + // reset all uses of this handle on a render target. for (int attachment = 0; attachment < RenderTargetsCount; attachment++) { if (_colorHandles[attachment] == handle) @@ -484,7 +484,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL GL.BindBuffer(BufferTarget.PixelPackBuffer, _copyPbo); - //The buffer should be large enough to hold the largest texture. + // The buffer should be large enough to hold the largest texture. int bufferSize = Math.Max(ImageUtils.GetSize(oldImage), ImageUtils.GetSize(newImage)); diff --git a/Ryujinx.Graphics/Gal/OpenGL/OglShader.cs b/Ryujinx.Graphics/Gal/OpenGL/OglShader.cs index 8f4072c5..8da0104e 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OglShader.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OglShader.cs @@ -115,7 +115,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL data[1] = flipY; data[2] = BitConverter.Int32BitsToSingle(instance); - //Invalidate buffer + // Invalidate buffer GL.BufferData(BufferTarget.UniformBuffer, ExtraDataSize * sizeof(float), IntPtr.Zero, BufferUsageHint.StreamDraw); GL.BufferSubData(BufferTarget.UniformBuffer, IntPtr.Zero, ExtraDataSize * sizeof(float), (IntPtr)data); @@ -228,9 +228,9 @@ namespace Ryujinx.Graphics.Gal.OpenGL if (blockIndex < 0) { - //This may be fine, the compiler may optimize away unused uniform buffers, - //and in this case the above call would return -1 as the buffer has been - //optimized away. + // This may be fine, the compiler may optimize away unused uniform buffers, + // and in this case the above call would return -1 as the buffer has been + // optimized away. continue; } diff --git a/Ryujinx.Graphics/Gal/OpenGL/OglTexture.cs b/Ryujinx.Graphics/Gal/OpenGL/OglTexture.cs index b6bf36c5..b5ac6692 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OglTexture.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OglTexture.cs @@ -207,7 +207,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL } else { - //TODO: Use KHR_texture_compression_astc_hdr when available + // TODO: Use KHR_texture_compression_astc_hdr when available if (IsAstc(image.Format)) { int textureBlockWidth = ImageUtils.GetBlockWidth(image.Format); diff --git a/Ryujinx.Graphics/Gal/ShaderDumper.cs b/Ryujinx.Graphics/Gal/ShaderDumper.cs index 726447e4..e25127de 100644 --- a/Ryujinx.Graphics/Gal/ShaderDumper.cs +++ b/Ryujinx.Graphics/Gal/ShaderDumper.cs @@ -38,7 +38,7 @@ namespace Ryujinx.Graphics.Gal ulong instruction = 0; - //Dump until a NOP instruction is found + // Dump until a NOP instruction is found while ((instruction >> 48 & 0xfff8) != 0x50b0) { uint word0 = (uint)memory.ReadInt32(position + 0x50 + offset + 0); @@ -46,8 +46,8 @@ namespace Ryujinx.Graphics.Gal instruction = word0 | (ulong)word1 << 32; - //Zero instructions (other kind of NOP) stop immediatly, - //this is to avoid two rows of zeroes + // Zero instructions (other kind of NOP) stop immediately, + // this is to avoid two rows of zeroes if (instruction == 0) { break; @@ -59,7 +59,7 @@ namespace Ryujinx.Graphics.Gal offset += 8; } - //Align to meet nvdisasm requeriments + // Align to meet nvdisasm requirements while (offset % 0x20 != 0) { fullWriter.Write(0); |
