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