General cleanup

This commit is contained in:
Alex Barney 2019-03-03 13:58:01 -06:00
commit 0b4651625b
13 changed files with 20 additions and 21 deletions

View file

@ -1,6 +1,6 @@
namespace Ryujinx.Graphics.Gal namespace Ryujinx.Graphics.Gal
{ {
public unsafe interface IGalMemory public interface IGalMemory
{ {
int ReadInt32(long position); int ReadInt32(long position);
} }

View file

@ -646,7 +646,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL
return type; return type;
} }
private unsafe static void SetConstAttrib(GalVertexAttrib attrib) private static unsafe void SetConstAttrib(GalVertexAttrib attrib)
{ {
if (attrib.Size == GalVertexAttribSize._10_10_10_2 || if (attrib.Size == GalVertexAttribSize._10_10_10_2 ||
attrib.Size == GalVertexAttribSize._11_11_10) attrib.Size == GalVertexAttribSize._11_11_10)

View file

@ -1,4 +1,3 @@
using Ryujinx.Graphics.Gal.OpenGL;
using Ryujinx.Graphics.Texture; using Ryujinx.Graphics.Texture;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;

View file

@ -40,7 +40,7 @@ namespace Ryujinx.Graphics.Gal.Shader
return isArray ? GalTextureTarget.TwoDArray : GalTextureTarget.TwoD; return isArray ? GalTextureTarget.TwoDArray : GalTextureTarget.TwoD;
case 4: case 4:
if (isArray) if (isArray)
throw new InvalidOperationException($"ARRAY bit set on a TEX with 3D texture!"); throw new InvalidOperationException("ARRAY bit set on a TEX with 3D texture!");
return GalTextureTarget.ThreeD; return GalTextureTarget.ThreeD;
case 6: case 6:
return isArray ? GalTextureTarget.CubeArray : GalTextureTarget.CubeMap; return isArray ? GalTextureTarget.CubeArray : GalTextureTarget.CubeMap;

View file

@ -1,8 +1,6 @@
using Ryujinx.Common.Logging;
using Ryujinx.Graphics.Gal; using Ryujinx.Graphics.Gal;
using Ryujinx.Graphics.Memory; using Ryujinx.Graphics.Memory;
using Ryujinx.Graphics.Texture; using Ryujinx.Graphics.Texture;
using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace Ryujinx.Graphics namespace Ryujinx.Graphics

View file

@ -1,4 +1,3 @@
using Ryujinx.Common.Logging;
using Ryujinx.Graphics.Gal; using Ryujinx.Graphics.Gal;
using Ryujinx.Graphics.Memory; using Ryujinx.Graphics.Memory;
using Ryujinx.Graphics.Texture; using Ryujinx.Graphics.Texture;

View file

@ -1,5 +1,4 @@
using Ryujinx.Common; using Ryujinx.Common;
using Ryujinx.Common.Logging;
using Ryujinx.Graphics.Gal; using Ryujinx.Graphics.Gal;
using Ryujinx.Graphics.Memory; using Ryujinx.Graphics.Memory;
using Ryujinx.Graphics.Texture; using Ryujinx.Graphics.Texture;
@ -656,7 +655,7 @@ namespace Ryujinx.Graphics.Graphics3d
_gpu.ResourceManager.SendTexture(vmm, key, image); _gpu.ResourceManager.SendTexture(vmm, key, image);
return (Key: key, Image: image, Sampler: sampler); return (key, image, sampler);
} }
private void UploadConstBuffers(NvGpuVmm vmm, GalPipelineState state, long[] keys) private void UploadConstBuffers(NvGpuVmm vmm, GalPipelineState state, long[] keys)

View file

@ -1,4 +1,3 @@
using Ryujinx.Common.Logging;
using Ryujinx.Graphics.Memory; using Ryujinx.Graphics.Memory;
using Ryujinx.Graphics.Texture; using Ryujinx.Graphics.Texture;
using System.Collections.Generic; using System.Collections.Generic;

View file

@ -1,4 +1,3 @@
using Ryujinx.Common.Logging;
using Ryujinx.Graphics.Memory; using Ryujinx.Graphics.Memory;
using Ryujinx.Graphics.Texture; using Ryujinx.Graphics.Texture;
using System.Collections.Generic; using System.Collections.Generic;

View file

@ -1,6 +1,5 @@
using ChocolArm64.Memory; using ChocolArm64.Memory;
using OpenTK.Graphics.OpenGL; using OpenTK.Graphics.OpenGL;
using Ryujinx.Common;
using Ryujinx.Graphics.Gal; using Ryujinx.Graphics.Gal;
using Ryujinx.Graphics.Memory; using Ryujinx.Graphics.Memory;
using System; using System;
@ -159,7 +158,7 @@ namespace Ryujinx.Graphics.Texture
if (!HasDepth(imageFormat) && (rType != gType || rType != bType || rType != aType)) if (!HasDepth(imageFormat) && (rType != gType || rType != bType || rType != aType))
{ {
throw new NotImplementedException($"Per component types are not implemented!"); throw new NotImplementedException("Per component types are not implemented!");
} }
GalImageFormat formatType = convSrgb ? Srgb : GetFormatType(rType); GalImageFormat formatType = convSrgb ? Srgb : GetFormatType(rType);

View file

@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
namespace Ryujinx.Graphics.VDec namespace Ryujinx.Graphics.VDec
{ {
unsafe static class FFmpegWrapper static unsafe class FFmpegWrapper
{ {
private static AVCodec* _codec; private static AVCodec* _codec;
private static AVCodecContext* _context; private static AVCodecContext* _context;

View file

@ -15,9 +15,9 @@ namespace Ryujinx.Graphics.VDec
private int _numRefIdxL1DefaultActiveMinus1; private int _numRefIdxL1DefaultActiveMinus1;
private bool _deblockingFilterControlPresentFlag; private bool _deblockingFilterControlPresentFlag;
private bool _redundantPicCntPresentFlag; private bool _redundantPicCntPresentFlag;
private bool Transform8x8ModeFlag; private bool _transform8x8ModeFlag;
private bool _mbAdaptiveFrameFieldFlag; private bool _mbAdaptiveFrameFieldFlag;
private bool Direct8x8InferenceFlag; private bool _direct8x8InferenceFlag;
private bool _weightedPredFlag; private bool _weightedPredFlag;
private bool _constrainedIntraPredFlag; private bool _constrainedIntraPredFlag;
private bool _fieldPicFlag; private bool _fieldPicFlag;
@ -46,10 +46,10 @@ namespace Ryujinx.Graphics.VDec
_numRefIdxL1DefaultActiveMinus1 = Params.NumRefIdxL1DefaultActiveMinus1; _numRefIdxL1DefaultActiveMinus1 = Params.NumRefIdxL1DefaultActiveMinus1;
_deblockingFilterControlPresentFlag = Params.DeblockingFilterControlPresentFlag; _deblockingFilterControlPresentFlag = Params.DeblockingFilterControlPresentFlag;
_redundantPicCntPresentFlag = Params.RedundantPicCntPresentFlag; _redundantPicCntPresentFlag = Params.RedundantPicCntPresentFlag;
Transform8x8ModeFlag = Params.Transform8x8ModeFlag; _transform8x8ModeFlag = Params.Transform8x8ModeFlag;
_mbAdaptiveFrameFieldFlag = ((Params.Flags >> 0) & 1) != 0; _mbAdaptiveFrameFieldFlag = ((Params.Flags >> 0) & 1) != 0;
Direct8x8InferenceFlag = ((Params.Flags >> 1) & 1) != 0; _direct8x8InferenceFlag = ((Params.Flags >> 1) & 1) != 0;
_weightedPredFlag = ((Params.Flags >> 2) & 1) != 0; _weightedPredFlag = ((Params.Flags >> 2) & 1) != 0;
_constrainedIntraPredFlag = ((Params.Flags >> 3) & 1) != 0; _constrainedIntraPredFlag = ((Params.Flags >> 3) & 1) != 0;
_fieldPicFlag = ((Params.Flags >> 5) & 1) != 0; _fieldPicFlag = ((Params.Flags >> 5) & 1) != 0;
@ -139,7 +139,7 @@ namespace Ryujinx.Graphics.VDec
writer.WriteBit(_mbAdaptiveFrameFieldFlag); writer.WriteBit(_mbAdaptiveFrameFieldFlag);
} }
writer.WriteBit(Direct8x8InferenceFlag); writer.WriteBit(_direct8x8InferenceFlag);
writer.WriteBit(false); //Frame cropping flag writer.WriteBit(false); //Frame cropping flag
writer.WriteBit(false); //VUI parameter present flag writer.WriteBit(false); //VUI parameter present flag
@ -167,7 +167,7 @@ namespace Ryujinx.Graphics.VDec
writer.WriteBit(_deblockingFilterControlPresentFlag); writer.WriteBit(_deblockingFilterControlPresentFlag);
writer.WriteBit(_constrainedIntraPredFlag); writer.WriteBit(_constrainedIntraPredFlag);
writer.WriteBit(_redundantPicCntPresentFlag); writer.WriteBit(_redundantPicCntPresentFlag);
writer.WriteBit(Transform8x8ModeFlag); writer.WriteBit(_transform8x8ModeFlag);
writer.WriteBit(true); writer.WriteBit(true);
@ -178,7 +178,7 @@ namespace Ryujinx.Graphics.VDec
WriteScalingList(writer, _scalingMatrix4, index * 16, 16); WriteScalingList(writer, _scalingMatrix4, index * 16, 16);
} }
if (Transform8x8ModeFlag) if (_transform8x8ModeFlag)
{ {
for (int index = 0; index < 2; index++) for (int index = 0; index < 2; index++)
{ {

View file

@ -4,4 +4,11 @@
<s:String x:Key="/Default/CodeStyle/CSharpVarKeywordUsage/ForOtherTypes/@EntryValue">UseExplicitType</s:String> <s:String x:Key="/Default/CodeStyle/CSharpVarKeywordUsage/ForOtherTypes/@EntryValue">UseExplicitType</s:String>
<s:String x:Key="/Default/CodeStyle/CSharpVarKeywordUsage/ForSimpleTypes/@EntryValue">UseExplicitType</s:String> <s:String x:Key="/Default/CodeStyle/CSharpVarKeywordUsage/ForSimpleTypes/@EntryValue">UseExplicitType</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=TypesAndNamespaces/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"&gt;&lt;ExtraRule Prefix="I" Suffix="" Style="AaBb" /&gt;&lt;/Policy&gt;</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=TypesAndNamespaces/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"&gt;&lt;ExtraRule Prefix="I" Suffix="" Style="AaBb" /&gt;&lt;/Policy&gt;</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Astc/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Luma/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Probs/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Sint/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Snorm/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Srgb/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unorm/@EntryIndexedValue">True</s:Boolean>
</wpf:ResourceDictionary> </wpf:ResourceDictionary>