GPFifoClassState.cs 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. // This file was auto-generated from NVIDIA official Maxwell definitions.
  2. using Ryujinx.Common.Memory;
  3. namespace Ryujinx.Graphics.Gpu.Engine.GPFifo
  4. {
  5. enum SemaphoredOperation
  6. {
  7. Acquire = 1,
  8. Release = 2,
  9. AcqGeq = 4,
  10. AcqAnd = 8,
  11. Reduction = 16
  12. }
  13. enum SemaphoredAcquireSwitch
  14. {
  15. Disabled = 0,
  16. Enabled = 1
  17. }
  18. enum SemaphoredReleaseWfi
  19. {
  20. En = 0,
  21. Dis = 1
  22. }
  23. enum SemaphoredReleaseSize
  24. {
  25. SixteenBytes = 0,
  26. FourBytes = 1
  27. }
  28. enum SemaphoredReduction
  29. {
  30. Min = 0,
  31. Max = 1,
  32. Xor = 2,
  33. And = 3,
  34. Or = 4,
  35. Add = 5,
  36. Inc = 6,
  37. Dec = 7
  38. }
  39. enum SemaphoredFormat
  40. {
  41. Signed = 0,
  42. Unsigned = 1
  43. }
  44. enum MemOpCTlbInvalidatePdb
  45. {
  46. One = 0,
  47. All = 1
  48. }
  49. enum MemOpCTlbInvalidateGpc
  50. {
  51. Enable = 0,
  52. Disable = 1
  53. }
  54. enum MemOpCTlbInvalidateTarget
  55. {
  56. VidMem = 0,
  57. SysMemCoherent = 2,
  58. SysMemNoncoherent = 3
  59. }
  60. enum MemOpDOperation
  61. {
  62. Membar = 5,
  63. MmuTlbInvalidate = 9,
  64. L2PeermemInvalidate = 13,
  65. L2SysmemInvalidate = 14,
  66. L2CleanComptags = 15,
  67. L2FlushDirty = 16
  68. }
  69. enum SyncpointbOperation
  70. {
  71. Wait = 0,
  72. Incr = 1
  73. }
  74. enum SyncpointbWaitSwitch
  75. {
  76. Dis = 0,
  77. En = 1
  78. }
  79. enum WfiScope
  80. {
  81. CurrentScgType = 0,
  82. All = 1
  83. }
  84. enum YieldOp
  85. {
  86. Nop = 0,
  87. PbdmaTimeslice = 1,
  88. RunlistTimeslice = 2,
  89. Tsg = 3
  90. }
  91. struct GPFifoClassState
  92. {
  93. #pragma warning disable CS0649
  94. public uint SetObject;
  95. public int SetObjectNvclass => (int)((SetObject >> 0) & 0xFFFF);
  96. public int SetObjectEngine => (int)((SetObject >> 16) & 0x1F);
  97. public uint Illegal;
  98. public int IllegalHandle => (int)(Illegal);
  99. public uint Nop;
  100. public int NopHandle => (int)(Nop);
  101. public uint Reserved0C;
  102. public uint Semaphorea;
  103. public int SemaphoreaOffsetUpper => (int)((Semaphorea >> 0) & 0xFF);
  104. public uint Semaphoreb;
  105. public int SemaphorebOffsetLower => (int)((Semaphoreb >> 2) & 0x3FFFFFFF);
  106. public uint Semaphorec;
  107. public int SemaphorecPayload => (int)(Semaphorec);
  108. public uint Semaphored;
  109. public SemaphoredOperation SemaphoredOperation => (SemaphoredOperation)((Semaphored >> 0) & 0x1F);
  110. public SemaphoredAcquireSwitch SemaphoredAcquireSwitch => (SemaphoredAcquireSwitch)((Semaphored >> 12) & 0x1);
  111. public SemaphoredReleaseWfi SemaphoredReleaseWfi => (SemaphoredReleaseWfi)((Semaphored >> 20) & 0x1);
  112. public SemaphoredReleaseSize SemaphoredReleaseSize => (SemaphoredReleaseSize)((Semaphored >> 24) & 0x1);
  113. public SemaphoredReduction SemaphoredReduction => (SemaphoredReduction)((Semaphored >> 27) & 0xF);
  114. public SemaphoredFormat SemaphoredFormat => (SemaphoredFormat)((Semaphored >> 31) & 0x1);
  115. public uint NonStallInterrupt;
  116. public int NonStallInterruptHandle => (int)(NonStallInterrupt);
  117. public uint FbFlush;
  118. public int FbFlushHandle => (int)(FbFlush);
  119. public uint Reserved28;
  120. public uint Reserved2C;
  121. public uint MemOpC;
  122. public int MemOpCOperandLow => (int)((MemOpC >> 2) & 0x3FFFFFFF);
  123. public MemOpCTlbInvalidatePdb MemOpCTlbInvalidatePdb => (MemOpCTlbInvalidatePdb)((MemOpC >> 0) & 0x1);
  124. public MemOpCTlbInvalidateGpc MemOpCTlbInvalidateGpc => (MemOpCTlbInvalidateGpc)((MemOpC >> 1) & 0x1);
  125. public MemOpCTlbInvalidateTarget MemOpCTlbInvalidateTarget => (MemOpCTlbInvalidateTarget)((MemOpC >> 10) & 0x3);
  126. public int MemOpCTlbInvalidateAddrLo => (int)((MemOpC >> 12) & 0xFFFFF);
  127. public uint MemOpD;
  128. public int MemOpDOperandHigh => (int)((MemOpD >> 0) & 0xFF);
  129. public MemOpDOperation MemOpDOperation => (MemOpDOperation)((MemOpD >> 27) & 0x1F);
  130. public int MemOpDTlbInvalidateAddrHi => (int)((MemOpD >> 0) & 0xFF);
  131. public uint Reserved38;
  132. public uint Reserved3C;
  133. public uint Reserved40;
  134. public uint Reserved44;
  135. public uint Reserved48;
  136. public uint Reserved4C;
  137. public uint SetReference;
  138. public int SetReferenceCount => (int)(SetReference);
  139. public uint Reserved54;
  140. public uint Reserved58;
  141. public uint Reserved5C;
  142. public uint Reserved60;
  143. public uint Reserved64;
  144. public uint Reserved68;
  145. public uint Reserved6C;
  146. public uint Syncpointa;
  147. public int SyncpointaPayload => (int)(Syncpointa);
  148. public uint Syncpointb;
  149. public SyncpointbOperation SyncpointbOperation => (SyncpointbOperation)((Syncpointb >> 0) & 0x1);
  150. public SyncpointbWaitSwitch SyncpointbWaitSwitch => (SyncpointbWaitSwitch)((Syncpointb >> 4) & 0x1);
  151. public int SyncpointbSyncptIndex => (int)((Syncpointb >> 8) & 0xFFF);
  152. public uint Wfi;
  153. public WfiScope WfiScope => (WfiScope)((Wfi >> 0) & 0x1);
  154. public uint CrcCheck;
  155. public int CrcCheckValue => (int)(CrcCheck);
  156. public uint Yield;
  157. public YieldOp YieldOp => (YieldOp)((Yield >> 0) & 0x3);
  158. // TODO: Eventually move this to per-engine state.
  159. public Array31<uint> Reserved84;
  160. public uint NoOperation;
  161. public uint SetNotifyA;
  162. public uint SetNotifyB;
  163. public uint Notify;
  164. public uint WaitForIdle;
  165. public uint LoadMmeInstructionRamPointer;
  166. public uint LoadMmeInstructionRam;
  167. public uint LoadMmeStartAddressRamPointer;
  168. public uint LoadMmeStartAddressRam;
  169. public uint SetMmeShadowRamControl;
  170. #pragma warning restore CS0649
  171. }
  172. }