Sfoglia il codice sorgente

Non-flags enums should not be used in bitwise operations (#5214)

Marco Carvalho 2 anni fa
parent
commit
0e95a8271a

+ 3 - 0
src/ARMeilleure/IntermediateRepresentation/Intrinsic.cs

@@ -1,5 +1,8 @@
+using System;
+
 namespace ARMeilleure.IntermediateRepresentation
 {
+    [Flags]
     enum Intrinsic : ushort
     {
         // X86 (SSE and AVX)

+ 3 - 0
src/Ryujinx.Graphics.Shader/Decoders/InstDecoders.cs

@@ -1,3 +1,5 @@
+using System;
+
 namespace Ryujinx.Graphics.Shader.Decoders
 {
     enum AlSize
@@ -711,6 +713,7 @@ namespace Ryujinx.Graphics.Shader.Decoders
         TexSamplerBorderColor = 22,
     }
 
+    [Flags]
     enum VectorSelect
     {
         U8B0 = 0,

+ 3 - 0
src/Ryujinx.Graphics.Shader/Decoders/InstProps.cs

@@ -1,5 +1,8 @@
+using System;
+
 namespace Ryujinx.Graphics.Shader.Decoders
 {
+    [Flags]
     enum InstProps : ushort
     {
         None = 0,

+ 4 - 1
src/Ryujinx.Graphics.Shader/Translation/AggregateType.cs

@@ -1,5 +1,8 @@
-namespace Ryujinx.Graphics.Shader.Translation
+using System;
+
+namespace Ryujinx.Graphics.Shader.Translation
 {
+    [Flags]
     enum AggregateType
     {
         Invalid,

+ 3 - 0
src/Ryujinx.HLE/HOS/Kernel/Threading/ThreadSchedState.cs

@@ -1,5 +1,8 @@
+using System;
+
 namespace Ryujinx.HLE.HOS.Kernel.Threading
 {
+    [Flags]
     enum ThreadSchedState : ushort
     {
         LowMask        = 0xf,