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/Shader/Translation/Translator.cs | |
| 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/Shader/Translation/Translator.cs')
| -rw-r--r-- | Ryujinx.Graphics/Shader/Translation/Translator.cs | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Ryujinx.Graphics/Shader/Translation/Translator.cs b/Ryujinx.Graphics/Shader/Translation/Translator.cs index 706f3cfa..fcebe913 100644 --- a/Ryujinx.Graphics/Shader/Translation/Translator.cs +++ b/Ryujinx.Graphics/Shader/Translation/Translator.cs @@ -28,7 +28,7 @@ namespace Ryujinx.Graphics.Shader.Translation if (addressB != 0) { - //Dual vertex shader. + // Dual vertex shader. Operation[] shaderOpsB = DecodeShader(memory, addressB, config.Type); shaderOps = Combine(shaderOps, shaderOpsB); @@ -86,10 +86,10 @@ namespace Ryujinx.Graphics.Shader.Translation if (op is OpCodeSync opSync) { - //If the instruction is a SYNC instruction with only one - //possible target address, then the instruction is basically - //just a simple branch, we can generate code similar to branch - //instructions, with the condition check on the branch itself. + // If the instruction is a SYNC instruction with only one + // possible target address, then the instruction is basically + // just a simple branch, we can generate code similar to branch + // instructions, with the condition check on the branch itself. skipPredicateCheck |= opSync.Targets.Count < 2; } @@ -136,15 +136,15 @@ namespace Ryujinx.Graphics.Shader.Translation private static Operation[] Combine(Operation[] a, Operation[] b) { - //Here we combine two shaders. - //For shader A: - //- All user attribute stores on shader A are turned into copies to a - //temporary variable. It's assumed that shader B will consume them. - //- All return instructions are turned into branch instructions, the - //branch target being the start of the shader B code. - //For shader B: - //- All user attribute loads on shader B are turned into copies from a - //temporary variable, as long that attribute is written by shader A. + // Here we combine two shaders. + // For shader A: + // - All user attribute stores on shader A are turned into copies to a + // temporary variable. It's assumed that shader B will consume them. + // - All return instructions are turned into branch instructions, the + // branch target being the start of the shader B code. + // For shader B: + // - All user attribute loads on shader B are turned into copies from a + // temporary variable, as long that attribute is written by shader A. List<Operation> output = new List<Operation>(a.Length + b.Length); Operand[] temps = new Operand[AttributeConsts.UserAttributesCount * 4]; |
