StorageKind.cs
1 namespace Ryujinx.Graphics.Shader.IntermediateRepresentation 2 { 3 enum StorageKind 4 { 5 None, 6 Input, 7 InputPerPatch, 8 Output, 9 OutputPerPatch, 10 ConstantBuffer, 11 StorageBuffer, 12 LocalMemory, 13 SharedMemory, 14 SharedMemory8, // TODO: Remove this and store type as a field on the Operation class itself. 15 SharedMemory16, // TODO: Remove this and store type as a field on the Operation class itself. 16 GlobalMemory, 17 GlobalMemoryS8, // TODO: Remove this and store type as a field on the Operation class itself. 18 GlobalMemoryS16, // TODO: Remove this and store type as a field on the Operation class itself. 19 GlobalMemoryU8, // TODO: Remove this and store type as a field on the Operation class itself. 20 GlobalMemoryU16, // TODO: Remove this and store type as a field on the Operation class itself. 21 } 22 23 static class StorageKindExtensions 24 { 25 public static bool IsInputOrOutput(this StorageKind storageKind) 26 { 27 return storageKind == StorageKind.Input || 28 storageKind == StorageKind.InputPerPatch || 29 storageKind == StorageKind.Output || 30 storageKind == StorageKind.OutputPerPatch; 31 } 32 33 public static bool IsOutput(this StorageKind storageKind) 34 { 35 return storageKind == StorageKind.Output || 36 storageKind == StorageKind.OutputPerPatch; 37 } 38 39 public static bool IsPerPatch(this StorageKind storageKind) 40 { 41 return storageKind == StorageKind.InputPerPatch || 42 storageKind == StorageKind.OutputPerPatch; 43 } 44 } 45 }