Procházet zdrojové kódy

misc: chore: Use explicit types in GAL

Evan Husted před 1 rokem
rodič
revize
93539e7d45

+ 1 - 1
src/Ryujinx.Graphics.GAL/Multithreading/ThreadedPipeline.cs

@@ -359,7 +359,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading
 
         public bool TryHostConditionalRendering(ICounterEvent value, ulong compare, bool isEqual)
         {
-            var evt = value as ThreadedCounterEvent;
+            ThreadedCounterEvent evt = value as ThreadedCounterEvent;
             if (evt != null)
             {
                 if (compare == 0 && evt.Type == CounterType.SamplesPassed && evt.ClearCounter)

+ 7 - 7
src/Ryujinx.Graphics.GAL/Multithreading/ThreadedRenderer.cs

@@ -294,7 +294,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading
 
         public IImageArray CreateImageArray(int size, bool isBuffer)
         {
-            var imageArray = new ThreadedImageArray(this);
+            ThreadedImageArray imageArray = new(this);
             New<CreateImageArrayCommand>().Set(Ref(imageArray), size, isBuffer);
             QueueCommand();
 
@@ -303,7 +303,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading
 
         public IProgram CreateProgram(ShaderSource[] shaders, ShaderInfo info)
         {
-            var program = new ThreadedProgram(this);
+            ThreadedProgram program = new(this);
 
             SourceProgramRequest request = new(program, shaders, info);
 
@@ -319,7 +319,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading
 
         public ISampler CreateSampler(SamplerCreateInfo info)
         {
-            var sampler = new ThreadedSampler(this);
+            ThreadedSampler sampler = new(this);
             New<CreateSamplerCommand>().Set(Ref(sampler), info);
             QueueCommand();
 
@@ -337,7 +337,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading
         {
             if (IsGpuThread())
             {
-                var texture = new ThreadedTexture(this, info);
+                ThreadedTexture texture = new ThreadedTexture(this, info);
                 New<CreateTextureCommand>().Set(Ref(texture), info);
                 QueueCommand();
 
@@ -345,7 +345,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading
             }
             else
             {
-                var texture = new ThreadedTexture(this, info)
+                ThreadedTexture texture = new ThreadedTexture(this, info)
                 {
                     Base = _baseRenderer.CreateTexture(info),
                 };
@@ -355,7 +355,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading
         }
         public ITextureArray CreateTextureArray(int size, bool isBuffer)
         {
-            var textureArray = new ThreadedTextureArray(this);
+            ThreadedTextureArray textureArray = new ThreadedTextureArray(this);
             New<CreateTextureArrayCommand>().Set(Ref(textureArray), size, isBuffer);
             QueueCommand();
 
@@ -414,7 +414,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading
 
         public IProgram LoadProgramBinary(byte[] programBinary, bool hasFragmentShader, ShaderInfo info)
         {
-            var program = new ThreadedProgram(this);
+            ThreadedProgram program = new ThreadedProgram(this);
 
             BinaryProgramRequest request = new(program, programBinary, hasFragmentShader, info);
             Programs.Add(request);

+ 1 - 1
src/Ryujinx.Graphics.GAL/ResourceLayout.cs

@@ -126,7 +126,7 @@ namespace Ryujinx.Graphics.GAL
 
             if (Descriptors != null)
             {
-                foreach (var descriptor in Descriptors)
+                foreach (ResourceDescriptor descriptor in Descriptors)
                 {
                     hasher.Add(descriptor);
                 }