StorageKind.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. GlobalMemory
  15. }
  16. static class StorageKindExtensions
  17. {
  18. public static bool IsInputOrOutput(this StorageKind storageKind)
  19. {
  20. return storageKind == StorageKind.Input ||
  21. storageKind == StorageKind.InputPerPatch ||
  22. storageKind == StorageKind.Output ||
  23. storageKind == StorageKind.OutputPerPatch;
  24. }
  25. public static bool IsOutput(this StorageKind storageKind)
  26. {
  27. return storageKind == StorageKind.Output ||
  28. storageKind == StorageKind.OutputPerPatch;
  29. }
  30. public static bool IsPerPatch(this StorageKind storageKind)
  31. {
  32. return storageKind == StorageKind.InputPerPatch ||
  33. storageKind == StorageKind.OutputPerPatch;
  34. }
  35. }
  36. }