DmaClassState.cs 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. // This file was auto-generated from NVIDIA official Maxwell definitions.
  2. namespace Ryujinx.Graphics.Gpu.Engine.Dma
  3. {
  4. /// <summary>
  5. /// Physical mode target.
  6. /// </summary>
  7. enum SetPhysModeTarget
  8. {
  9. LocalFb = 0,
  10. CoherentSysmem = 1,
  11. NoncoherentSysmem = 2,
  12. }
  13. /// <summary>
  14. /// DMA data transfer type.
  15. /// </summary>
  16. enum LaunchDmaDataTransferType
  17. {
  18. None = 0,
  19. Pipelined = 1,
  20. NonPipelined = 2,
  21. }
  22. /// <summary>
  23. /// DMA semaphore type.
  24. /// </summary>
  25. enum LaunchDmaSemaphoreType
  26. {
  27. None = 0,
  28. ReleaseOneWordSemaphore = 1,
  29. ReleaseFourWordSemaphore = 2,
  30. }
  31. /// <summary>
  32. /// DMA interrupt type.
  33. /// </summary>
  34. enum LaunchDmaInterruptType
  35. {
  36. None = 0,
  37. Blocking = 1,
  38. NonBlocking = 2,
  39. }
  40. /// <summary>
  41. /// DMA destination memory layout.
  42. /// </summary>
  43. enum LaunchDmaMemoryLayout
  44. {
  45. Blocklinear = 0,
  46. Pitch = 1,
  47. }
  48. /// <summary>
  49. /// DMA type.
  50. /// </summary>
  51. enum LaunchDmaType
  52. {
  53. Virtual = 0,
  54. Physical = 1,
  55. }
  56. /// <summary>
  57. /// DMA semaphore reduction operation.
  58. /// </summary>
  59. enum LaunchDmaSemaphoreReduction
  60. {
  61. Imin = 0,
  62. Imax = 1,
  63. Ixor = 2,
  64. Iand = 3,
  65. Ior = 4,
  66. Iadd = 5,
  67. Inc = 6,
  68. Dec = 7,
  69. Fadd = 10,
  70. }
  71. /// <summary>
  72. /// DMA semaphore reduction signedness.
  73. /// </summary>
  74. enum LaunchDmaSemaphoreReductionSign
  75. {
  76. Signed = 0,
  77. Unsigned = 1,
  78. }
  79. /// <summary>
  80. /// DMA L2 cache bypass.
  81. /// </summary>
  82. enum LaunchDmaBypassL2
  83. {
  84. UsePteSetting = 0,
  85. ForceVolatile = 1,
  86. }
  87. /// <summary>
  88. /// DMA component remapping source component.
  89. /// </summary>
  90. enum SetRemapComponentsDst
  91. {
  92. SrcX = 0,
  93. SrcY = 1,
  94. SrcZ = 2,
  95. SrcW = 3,
  96. ConstA = 4,
  97. ConstB = 5,
  98. NoWrite = 6,
  99. }
  100. /// <summary>
  101. /// DMA component remapping component size.
  102. /// </summary>
  103. enum SetRemapComponentsComponentSize
  104. {
  105. One = 0,
  106. Two = 1,
  107. Three = 2,
  108. Four = 3,
  109. }
  110. /// <summary>
  111. /// DMA component remapping number of components.
  112. /// </summary>
  113. enum SetRemapComponentsNumComponents
  114. {
  115. One = 0,
  116. Two = 1,
  117. Three = 2,
  118. Four = 3,
  119. }
  120. /// <summary>
  121. /// Width in GOBs of the destination texture.
  122. /// </summary>
  123. enum SetBlockSizeWidth
  124. {
  125. QuarterGob = 14,
  126. OneGob = 0,
  127. }
  128. /// <summary>
  129. /// Height in GOBs of the destination texture.
  130. /// </summary>
  131. enum SetBlockSizeHeight
  132. {
  133. OneGob = 0,
  134. TwoGobs = 1,
  135. FourGobs = 2,
  136. EightGobs = 3,
  137. SixteenGobs = 4,
  138. ThirtytwoGobs = 5,
  139. }
  140. /// <summary>
  141. /// Depth in GOBs of the destination texture.
  142. /// </summary>
  143. enum SetBlockSizeDepth
  144. {
  145. OneGob = 0,
  146. TwoGobs = 1,
  147. FourGobs = 2,
  148. EightGobs = 3,
  149. SixteenGobs = 4,
  150. ThirtytwoGobs = 5,
  151. }
  152. /// <summary>
  153. /// Height of a single GOB in lines.
  154. /// </summary>
  155. enum SetBlockSizeGobHeight
  156. {
  157. GobHeightTesla4 = 0,
  158. GobHeightFermi8 = 1,
  159. }
  160. /// <summary>
  161. /// DMA copy class state.
  162. /// </summary>
  163. unsafe struct DmaClassState
  164. {
  165. #pragma warning disable CS0649
  166. public fixed uint Reserved00[64];
  167. public uint Nop;
  168. public fixed uint Reserved104[15];
  169. public uint PmTrigger;
  170. public fixed uint Reserved144[63];
  171. public uint SetSemaphoreA;
  172. public int SetSemaphoreAUpper => (int)((SetSemaphoreA >> 0) & 0xFF);
  173. public uint SetSemaphoreB;
  174. public uint SetSemaphorePayload;
  175. public fixed uint Reserved24C[2];
  176. public uint SetRenderEnableA;
  177. public int SetRenderEnableAUpper => (int)((SetRenderEnableA >> 0) & 0xFF);
  178. public uint SetRenderEnableB;
  179. public uint SetRenderEnableC;
  180. public int SetRenderEnableCMode => (int)((SetRenderEnableC >> 0) & 0x7);
  181. public uint SetSrcPhysMode;
  182. public SetPhysModeTarget SetSrcPhysModeTarget => (SetPhysModeTarget)((SetSrcPhysMode >> 0) & 0x3);
  183. public uint SetDstPhysMode;
  184. public SetPhysModeTarget SetDstPhysModeTarget => (SetPhysModeTarget)((SetDstPhysMode >> 0) & 0x3);
  185. public fixed uint Reserved268[38];
  186. public uint LaunchDma;
  187. public LaunchDmaDataTransferType LaunchDmaDataTransferType => (LaunchDmaDataTransferType)((LaunchDma >> 0) & 0x3);
  188. public bool LaunchDmaFlushEnable => (LaunchDma & 0x4) != 0;
  189. public LaunchDmaSemaphoreType LaunchDmaSemaphoreType => (LaunchDmaSemaphoreType)((LaunchDma >> 3) & 0x3);
  190. public LaunchDmaInterruptType LaunchDmaInterruptType => (LaunchDmaInterruptType)((LaunchDma >> 5) & 0x3);
  191. public LaunchDmaMemoryLayout LaunchDmaSrcMemoryLayout => (LaunchDmaMemoryLayout)((LaunchDma >> 7) & 0x1);
  192. public LaunchDmaMemoryLayout LaunchDmaDstMemoryLayout => (LaunchDmaMemoryLayout)((LaunchDma >> 8) & 0x1);
  193. public bool LaunchDmaMultiLineEnable => (LaunchDma & 0x200) != 0;
  194. public bool LaunchDmaRemapEnable => (LaunchDma & 0x400) != 0;
  195. public bool LaunchDmaForceRmwdisable => (LaunchDma & 0x800) != 0;
  196. public LaunchDmaType LaunchDmaSrcType => (LaunchDmaType)((LaunchDma >> 12) & 0x1);
  197. public LaunchDmaType LaunchDmaDstType => (LaunchDmaType)((LaunchDma >> 13) & 0x1);
  198. public LaunchDmaSemaphoreReduction LaunchDmaSemaphoreReduction => (LaunchDmaSemaphoreReduction)((LaunchDma >> 14) & 0xF);
  199. public LaunchDmaSemaphoreReductionSign LaunchDmaSemaphoreReductionSign => (LaunchDmaSemaphoreReductionSign)((LaunchDma >> 18) & 0x1);
  200. public bool LaunchDmaSemaphoreReductionEnable => (LaunchDma & 0x80000) != 0;
  201. public LaunchDmaBypassL2 LaunchDmaBypassL2 => (LaunchDmaBypassL2)((LaunchDma >> 20) & 0x1);
  202. public fixed uint Reserved304[63];
  203. public uint OffsetInUpper;
  204. public int OffsetInUpperUpper => (int)((OffsetInUpper >> 0) & 0xFF);
  205. public uint OffsetInLower;
  206. public uint OffsetOutUpper;
  207. public int OffsetOutUpperUpper => (int)((OffsetOutUpper >> 0) & 0xFF);
  208. public uint OffsetOutLower;
  209. public uint PitchIn;
  210. public uint PitchOut;
  211. public uint LineLengthIn;
  212. public uint LineCount;
  213. public fixed uint Reserved420[184];
  214. public uint SetRemapConstA;
  215. public uint SetRemapConstB;
  216. public uint SetRemapComponents;
  217. public SetRemapComponentsDst SetRemapComponentsDstX => (SetRemapComponentsDst)((SetRemapComponents >> 0) & 0x7);
  218. public SetRemapComponentsDst SetRemapComponentsDstY => (SetRemapComponentsDst)((SetRemapComponents >> 4) & 0x7);
  219. public SetRemapComponentsDst SetRemapComponentsDstZ => (SetRemapComponentsDst)((SetRemapComponents >> 8) & 0x7);
  220. public SetRemapComponentsDst SetRemapComponentsDstW => (SetRemapComponentsDst)((SetRemapComponents >> 12) & 0x7);
  221. public SetRemapComponentsComponentSize SetRemapComponentsComponentSize => (SetRemapComponentsComponentSize)((SetRemapComponents >> 16) & 0x3);
  222. public SetRemapComponentsNumComponents SetRemapComponentsNumSrcComponents => (SetRemapComponentsNumComponents)((SetRemapComponents >> 20) & 0x3);
  223. public SetRemapComponentsNumComponents SetRemapComponentsNumDstComponents => (SetRemapComponentsNumComponents)((SetRemapComponents >> 24) & 0x3);
  224. public uint SetDstBlockSize;
  225. public SetBlockSizeWidth SetDstBlockSizeWidth => (SetBlockSizeWidth)((SetDstBlockSize >> 0) & 0xF);
  226. public SetBlockSizeHeight SetDstBlockSizeHeight => (SetBlockSizeHeight)((SetDstBlockSize >> 4) & 0xF);
  227. public SetBlockSizeDepth SetDstBlockSizeDepth => (SetBlockSizeDepth)((SetDstBlockSize >> 8) & 0xF);
  228. public SetBlockSizeGobHeight SetDstBlockSizeGobHeight => (SetBlockSizeGobHeight)((SetDstBlockSize >> 12) & 0xF);
  229. public uint SetDstWidth;
  230. public uint SetDstHeight;
  231. public uint SetDstDepth;
  232. public uint SetDstLayer;
  233. public uint SetDstOrigin;
  234. public int SetDstOriginX => (int)((SetDstOrigin >> 0) & 0xFFFF);
  235. public int SetDstOriginY => (int)((SetDstOrigin >> 16) & 0xFFFF);
  236. public uint Reserved724;
  237. public uint SetSrcBlockSize;
  238. public SetBlockSizeWidth SetSrcBlockSizeWidth => (SetBlockSizeWidth)((SetSrcBlockSize >> 0) & 0xF);
  239. public SetBlockSizeHeight SetSrcBlockSizeHeight => (SetBlockSizeHeight)((SetSrcBlockSize >> 4) & 0xF);
  240. public SetBlockSizeDepth SetSrcBlockSizeDepth => (SetBlockSizeDepth)((SetSrcBlockSize >> 8) & 0xF);
  241. public SetBlockSizeGobHeight SetSrcBlockSizeGobHeight => (SetBlockSizeGobHeight)((SetSrcBlockSize >> 12) & 0xF);
  242. public uint SetSrcWidth;
  243. public uint SetSrcHeight;
  244. public uint SetSrcDepth;
  245. public uint SetSrcLayer;
  246. public uint SetSrcOrigin;
  247. public int SetSrcOriginX => (int)((SetSrcOrigin >> 0) & 0xFFFF);
  248. public int SetSrcOriginY => (int)((SetSrcOrigin >> 16) & 0xFFFF);
  249. public fixed uint Reserved740[629];
  250. public uint PmTriggerEnd;
  251. public fixed uint Reserved1118[2490];
  252. #pragma warning restore CS0649
  253. }
  254. }