ThreedClassState.cs 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861
  1. using Ryujinx.Common.Memory;
  2. using Ryujinx.Graphics.GAL;
  3. using Ryujinx.Graphics.Gpu.Engine.InlineToMemory;
  4. using Ryujinx.Graphics.Gpu.Engine.Types;
  5. using Ryujinx.Graphics.Gpu.Image;
  6. using System;
  7. namespace Ryujinx.Graphics.Gpu.Engine.Threed
  8. {
  9. /// <summary>
  10. /// Shader stage name.
  11. /// </summary>
  12. enum ShaderType
  13. {
  14. Vertex,
  15. TessellationControl,
  16. TessellationEvaluation,
  17. Geometry,
  18. Fragment
  19. }
  20. /// <summary>
  21. /// Transform feedback buffer state.
  22. /// </summary>
  23. struct TfBufferState
  24. {
  25. #pragma warning disable CS0649
  26. public Boolean32 Enable;
  27. public GpuVa Address;
  28. public int Size;
  29. public int Offset;
  30. public uint Padding0;
  31. public uint Padding1;
  32. public uint Padding2;
  33. #pragma warning restore CS0649
  34. }
  35. /// <summary>
  36. /// Transform feedback state.
  37. /// </summary>
  38. struct TfState
  39. {
  40. #pragma warning disable CS0649
  41. public int BufferIndex;
  42. public int VaryingsCount;
  43. public int Stride;
  44. public uint Padding;
  45. #pragma warning restore CS0649
  46. }
  47. /// <summary>
  48. /// Render target color buffer state.
  49. /// </summary>
  50. struct RtColorState
  51. {
  52. #pragma warning disable CS0649
  53. public GpuVa Address;
  54. public int WidthOrStride;
  55. public int Height;
  56. public ColorFormat Format;
  57. public MemoryLayout MemoryLayout;
  58. public int Depth;
  59. public int LayerSize;
  60. public int BaseLayer;
  61. public int Unknown0x24;
  62. public int Padding0;
  63. public int Padding1;
  64. public int Padding2;
  65. public int Padding3;
  66. public int Padding4;
  67. public int Padding5;
  68. #pragma warning restore CS0649
  69. }
  70. /// <summary>
  71. /// Viewport transform parameters, for viewport transformation.
  72. /// </summary>
  73. struct ViewportTransform
  74. {
  75. #pragma warning disable CS0649
  76. public float ScaleX;
  77. public float ScaleY;
  78. public float ScaleZ;
  79. public float TranslateX;
  80. public float TranslateY;
  81. public float TranslateZ;
  82. public uint Swizzle;
  83. public uint SubpixelPrecisionBias;
  84. #pragma warning restore CS0649
  85. /// <summary>
  86. /// Unpacks viewport swizzle of the position X component.
  87. /// </summary>
  88. /// <returns>Swizzle enum value</returns>
  89. public ViewportSwizzle UnpackSwizzleX()
  90. {
  91. return (ViewportSwizzle)(Swizzle & 7);
  92. }
  93. /// <summary>
  94. /// Unpacks viewport swizzle of the position Y component.
  95. /// </summary>
  96. /// <returns>Swizzle enum value</returns>
  97. public ViewportSwizzle UnpackSwizzleY()
  98. {
  99. return (ViewportSwizzle)((Swizzle >> 4) & 7);
  100. }
  101. /// <summary>
  102. /// Unpacks viewport swizzle of the position Z component.
  103. /// </summary>
  104. /// <returns>Swizzle enum value</returns>
  105. public ViewportSwizzle UnpackSwizzleZ()
  106. {
  107. return (ViewportSwizzle)((Swizzle >> 8) & 7);
  108. }
  109. /// <summary>
  110. /// Unpacks viewport swizzle of the position W component.
  111. /// </summary>
  112. /// <returns>Swizzle enum value</returns>
  113. public ViewportSwizzle UnpackSwizzleW()
  114. {
  115. return (ViewportSwizzle)((Swizzle >> 12) & 7);
  116. }
  117. }
  118. /// <summary>
  119. /// Viewport extents for viewport clipping, also includes depth range.
  120. /// </summary>
  121. struct ViewportExtents
  122. {
  123. #pragma warning disable CS0649
  124. public ushort X;
  125. public ushort Width;
  126. public ushort Y;
  127. public ushort Height;
  128. public float DepthNear;
  129. public float DepthFar;
  130. #pragma warning restore CS0649
  131. }
  132. /// <summary>
  133. /// Draw state for non-indexed draws.
  134. /// </summary>
  135. struct VertexBufferDrawState
  136. {
  137. #pragma warning disable CS0649
  138. public int First;
  139. public int Count;
  140. #pragma warning restore CS0649
  141. }
  142. /// <summary>
  143. /// Color buffer clear color.
  144. /// </summary>
  145. struct ClearColors
  146. {
  147. #pragma warning disable CS0649
  148. public float Red;
  149. public float Green;
  150. public float Blue;
  151. public float Alpha;
  152. #pragma warning restore CS0649
  153. }
  154. /// <summary>
  155. /// Depth bias (also called polygon offset) parameters.
  156. /// </summary>
  157. struct DepthBiasState
  158. {
  159. #pragma warning disable CS0649
  160. public Boolean32 PointEnable;
  161. public Boolean32 LineEnable;
  162. public Boolean32 FillEnable;
  163. #pragma warning restore CS0649
  164. }
  165. /// <summary>
  166. /// Scissor state.
  167. /// </summary>
  168. struct ScissorState
  169. {
  170. #pragma warning disable CS0649
  171. public Boolean32 Enable;
  172. public ushort X1;
  173. public ushort X2;
  174. public ushort Y1;
  175. public ushort Y2;
  176. public uint Padding;
  177. #pragma warning restore CS0649
  178. }
  179. /// <summary>
  180. /// Stencil test masks for back tests.
  181. /// </summary>
  182. struct StencilBackMasks
  183. {
  184. #pragma warning disable CS0649
  185. public int FuncRef;
  186. public int Mask;
  187. public int FuncMask;
  188. #pragma warning restore CS0649
  189. }
  190. /// <summary>
  191. /// Render target depth-stencil buffer state.
  192. /// </summary>
  193. struct RtDepthStencilState
  194. {
  195. #pragma warning disable CS0649
  196. public GpuVa Address;
  197. public ZetaFormat Format;
  198. public MemoryLayout MemoryLayout;
  199. public int LayerSize;
  200. #pragma warning restore CS0649
  201. }
  202. /// <summary>
  203. /// Screen scissor state.
  204. /// </summary>
  205. struct ScreenScissorState
  206. {
  207. #pragma warning disable CS0649
  208. public ushort X;
  209. public ushort Width;
  210. public ushort Y;
  211. public ushort Height;
  212. #pragma warning restore CS0649
  213. }
  214. /// <summary>
  215. /// Vertex buffer attribute state.
  216. /// </summary>
  217. struct VertexAttribState
  218. {
  219. #pragma warning disable CS0649
  220. public uint Attribute;
  221. #pragma warning restore CS0649
  222. /// <summary>
  223. /// Unpacks the index of the vertex buffer this attribute belongs to.
  224. /// </summary>
  225. /// <returns>Vertex buffer index</returns>
  226. public int UnpackBufferIndex()
  227. {
  228. return (int)(Attribute & 0x1f);
  229. }
  230. /// <summary>
  231. /// Unpacks the attribute constant flag.
  232. /// </summary>
  233. /// <returns>True if the attribute is constant, false otherwise</returns>
  234. public bool UnpackIsConstant()
  235. {
  236. return (Attribute & 0x40) != 0;
  237. }
  238. /// <summary>
  239. /// Unpacks the offset, in bytes, of the attribute on the vertex buffer.
  240. /// </summary>
  241. /// <returns>Attribute offset in bytes</returns>
  242. public int UnpackOffset()
  243. {
  244. return (int)((Attribute >> 7) & 0x3fff);
  245. }
  246. /// <summary>
  247. /// Unpacks the Maxwell attribute format integer.
  248. /// </summary>
  249. /// <returns>Attribute format integer</returns>
  250. public uint UnpackFormat()
  251. {
  252. return Attribute & 0x3fe00000;
  253. }
  254. }
  255. /// <summary>
  256. /// Render target draw buffers control.
  257. /// </summary>
  258. struct RtControl
  259. {
  260. #pragma warning disable CS0649
  261. public uint Packed;
  262. #pragma warning restore CS0649
  263. /// <summary>
  264. /// Unpacks the number of active draw buffers.
  265. /// </summary>
  266. /// <returns>Number of active draw buffers</returns>
  267. public int UnpackCount()
  268. {
  269. return (int)(Packed & 0xf);
  270. }
  271. /// <summary>
  272. /// Unpacks the color attachment index for a given draw buffer.
  273. /// </summary>
  274. /// <param name="index">Index of the draw buffer</param>
  275. /// <returns>Attachment index</returns>
  276. public int UnpackPermutationIndex(int index)
  277. {
  278. return (int)((Packed >> (4 + index * 3)) & 7);
  279. }
  280. }
  281. /// <summary>
  282. /// 3D, 2D or 1D texture size.
  283. /// </summary>
  284. struct Size3D
  285. {
  286. #pragma warning disable CS0649
  287. public int Width;
  288. public int Height;
  289. public int Depth;
  290. #pragma warning restore CS0649
  291. }
  292. /// <summary>
  293. /// Stencil front test state and masks.
  294. /// </summary>
  295. struct StencilTestState
  296. {
  297. #pragma warning disable CS0649
  298. public Boolean32 Enable;
  299. public StencilOp FrontSFail;
  300. public StencilOp FrontDpFail;
  301. public StencilOp FrontDpPass;
  302. public CompareOp FrontFunc;
  303. public int FrontFuncRef;
  304. public int FrontFuncMask;
  305. public int FrontMask;
  306. #pragma warning restore CS0649
  307. }
  308. /// <summary>
  309. /// Screen Y control register.
  310. /// </summary>
  311. [Flags]
  312. enum YControl
  313. {
  314. NegateY = 1 << 0,
  315. TriangleRastFlip = 1 << 4
  316. }
  317. /// <summary>
  318. /// Condition for conditional rendering.
  319. /// </summary>
  320. enum Condition
  321. {
  322. Never,
  323. Always,
  324. ResultNonZero,
  325. Equal,
  326. NotEqual
  327. }
  328. /// <summary>
  329. /// Texture or sampler pool state.
  330. /// </summary>
  331. struct PoolState
  332. {
  333. #pragma warning disable CS0649
  334. public GpuVa Address;
  335. public int MaximumId;
  336. #pragma warning restore CS0649
  337. }
  338. /// <summary>
  339. /// Stencil back test state.
  340. /// </summary>
  341. struct StencilBackTestState
  342. {
  343. #pragma warning disable CS0649
  344. public Boolean32 TwoSided;
  345. public StencilOp BackSFail;
  346. public StencilOp BackDpFail;
  347. public StencilOp BackDpPass;
  348. public CompareOp BackFunc;
  349. #pragma warning restore CS0649
  350. }
  351. /// <summary>
  352. /// Primitive restart state.
  353. /// </summary>
  354. struct PrimitiveRestartState
  355. {
  356. #pragma warning disable CS0649
  357. public Boolean32 Enable;
  358. public int Index;
  359. #pragma warning restore CS0649
  360. }
  361. /// <summary>
  362. /// GPU index buffer state.
  363. /// This is used on indexed draws.
  364. /// </summary>
  365. struct IndexBufferState
  366. {
  367. #pragma warning disable CS0649
  368. public GpuVa Address;
  369. public GpuVa EndAddress;
  370. public IndexType Type;
  371. public int First;
  372. #pragma warning restore CS0649
  373. }
  374. /// <summary>
  375. /// Face culling and orientation parameters.
  376. /// </summary>
  377. struct FaceState
  378. {
  379. #pragma warning disable CS0649
  380. public Boolean32 CullEnable;
  381. public FrontFace FrontFace;
  382. public Face CullFace;
  383. #pragma warning restore CS0649
  384. }
  385. /// <summary>
  386. /// View volume clip control.
  387. /// </summary>
  388. [Flags]
  389. enum ViewVolumeClipControl
  390. {
  391. ForceDepthRangeZeroToOne = 1 << 0,
  392. DepthClampDisabled = 1 << 11
  393. }
  394. /// <summary>
  395. /// Logical operation state.
  396. /// </summary>
  397. struct LogicalOpState
  398. {
  399. #pragma warning disable CS0649
  400. public Boolean32 Enable;
  401. public LogicalOp LogicalOp;
  402. #pragma warning restore CS0649
  403. }
  404. /// <summary>
  405. /// Render target color buffer mask.
  406. /// This defines which color channels are written to the color buffer.
  407. /// </summary>
  408. struct RtColorMask
  409. {
  410. #pragma warning disable CS0649
  411. public uint Packed;
  412. #pragma warning restore CS0649
  413. /// <summary>
  414. /// Unpacks red channel enable.
  415. /// </summary>
  416. /// <returns>True to write the new red channel color, false to keep the old value</returns>
  417. public bool UnpackRed()
  418. {
  419. return (Packed & 0x1) != 0;
  420. }
  421. /// <summary>
  422. /// Unpacks green channel enable.
  423. /// </summary>
  424. /// <returns>True to write the new green channel color, false to keep the old value</returns>
  425. public bool UnpackGreen()
  426. {
  427. return (Packed & 0x10) != 0;
  428. }
  429. /// <summary>
  430. /// Unpacks blue channel enable.
  431. /// </summary>
  432. /// <returns>True to write the new blue channel color, false to keep the old value</returns>
  433. public bool UnpackBlue()
  434. {
  435. return (Packed & 0x100) != 0;
  436. }
  437. /// <summary>
  438. /// Unpacks alpha channel enable.
  439. /// </summary>
  440. /// <returns>True to write the new alpha channel color, false to keep the old value</returns>
  441. public bool UnpackAlpha()
  442. {
  443. return (Packed & 0x1000) != 0;
  444. }
  445. }
  446. /// <summary>
  447. /// Vertex buffer state.
  448. /// </summary>
  449. struct VertexBufferState
  450. {
  451. #pragma warning disable CS0649
  452. public uint Control;
  453. public GpuVa Address;
  454. public int Divisor;
  455. #pragma warning restore CS0649
  456. /// <summary>
  457. /// Vertex buffer stride, defined as the number of bytes occupied by each vertex in memory.
  458. /// </summary>
  459. /// <returns>Vertex buffer stride</returns>
  460. public int UnpackStride()
  461. {
  462. return (int)(Control & 0xfff);
  463. }
  464. /// <summary>
  465. /// Vertex buffer enable.
  466. /// </summary>
  467. /// <returns>True if the vertex buffer is enabled, false otherwise</returns>
  468. public bool UnpackEnable()
  469. {
  470. return (Control & (1 << 12)) != 0;
  471. }
  472. }
  473. /// <summary>
  474. /// Color buffer blending parameters, shared by all color buffers.
  475. /// </summary>
  476. struct BlendStateCommon
  477. {
  478. #pragma warning disable CS0649
  479. public Boolean32 SeparateAlpha;
  480. public BlendOp ColorOp;
  481. public BlendFactor ColorSrcFactor;
  482. public BlendFactor ColorDstFactor;
  483. public BlendOp AlphaOp;
  484. public BlendFactor AlphaSrcFactor;
  485. public uint Unknown0x1354;
  486. public BlendFactor AlphaDstFactor;
  487. #pragma warning restore CS0649
  488. }
  489. /// <summary>
  490. /// Color buffer blending parameters.
  491. /// </summary>
  492. struct BlendState
  493. {
  494. #pragma warning disable CS0649
  495. public Boolean32 SeparateAlpha;
  496. public BlendOp ColorOp;
  497. public BlendFactor ColorSrcFactor;
  498. public BlendFactor ColorDstFactor;
  499. public BlendOp AlphaOp;
  500. public BlendFactor AlphaSrcFactor;
  501. public BlendFactor AlphaDstFactor;
  502. public uint Padding;
  503. #pragma warning restore CS0649
  504. }
  505. /// <summary>
  506. /// Graphics shader stage state.
  507. /// </summary>
  508. struct ShaderState
  509. {
  510. #pragma warning disable CS0649
  511. public uint Control;
  512. public uint Offset;
  513. public uint Unknown0x8;
  514. public int MaxRegisters;
  515. public ShaderType Type;
  516. public uint Unknown0x14;
  517. public uint Unknown0x18;
  518. public uint Unknown0x1c;
  519. public uint Unknown0x20;
  520. public uint Unknown0x24;
  521. public uint Unknown0x28;
  522. public uint Unknown0x2c;
  523. public uint Unknown0x30;
  524. public uint Unknown0x34;
  525. public uint Unknown0x38;
  526. public uint Unknown0x3c;
  527. #pragma warning restore CS0649
  528. /// <summary>
  529. /// Unpacks shader enable information.
  530. /// Must be ignored for vertex shaders, those are always enabled.
  531. /// </summary>
  532. /// <returns>True if the stage is enabled, false otherwise</returns>
  533. public bool UnpackEnable()
  534. {
  535. return (Control & 1) != 0;
  536. }
  537. }
  538. /// <summary>
  539. /// Uniform buffer state for the uniform buffer currently being modified.
  540. /// </summary>
  541. struct UniformBufferState
  542. {
  543. #pragma warning disable CS0649
  544. public int Size;
  545. public GpuVa Address;
  546. public int Offset;
  547. #pragma warning restore CS0649
  548. }
  549. unsafe struct ThreedClassState : IShadowState
  550. {
  551. #pragma warning disable CS0649
  552. public uint SetObject;
  553. public int SetObjectClassId => (int)((SetObject >> 0) & 0xFFFF);
  554. public int SetObjectEngineId => (int)((SetObject >> 16) & 0x1F);
  555. public fixed uint Reserved04[63];
  556. public uint NoOperation;
  557. public uint SetNotifyA;
  558. public int SetNotifyAAddressUpper => (int)((SetNotifyA >> 0) & 0xFF);
  559. public uint SetNotifyB;
  560. public uint Notify;
  561. public NotifyType NotifyType => (NotifyType)(Notify);
  562. public uint WaitForIdle;
  563. public uint LoadMmeInstructionRamPointer;
  564. public uint LoadMmeInstructionRam;
  565. public uint LoadMmeStartAddressRamPointer;
  566. public uint LoadMmeStartAddressRam;
  567. public uint SetMmeShadowRamControl;
  568. public SetMmeShadowRamControlMode SetMmeShadowRamControlMode => (SetMmeShadowRamControlMode)((SetMmeShadowRamControl >> 0) & 0x3);
  569. public fixed uint Reserved128[2];
  570. public uint SetGlobalRenderEnableA;
  571. public int SetGlobalRenderEnableAOffsetUpper => (int)((SetGlobalRenderEnableA >> 0) & 0xFF);
  572. public uint SetGlobalRenderEnableB;
  573. public uint SetGlobalRenderEnableC;
  574. public int SetGlobalRenderEnableCMode => (int)((SetGlobalRenderEnableC >> 0) & 0x7);
  575. public uint SendGoIdle;
  576. public uint PmTrigger;
  577. public uint PmTriggerWfi;
  578. public fixed uint Reserved148[2];
  579. public uint SetInstrumentationMethodHeader;
  580. public uint SetInstrumentationMethodData;
  581. public fixed uint Reserved158[10];
  582. public uint LineLengthIn;
  583. public uint LineCount;
  584. public uint OffsetOutUpper;
  585. public int OffsetOutUpperValue => (int)((OffsetOutUpper >> 0) & 0xFF);
  586. public uint OffsetOut;
  587. public uint PitchOut;
  588. public uint SetDstBlockSize;
  589. public SetDstBlockSizeWidth SetDstBlockSizeWidth => (SetDstBlockSizeWidth)((SetDstBlockSize >> 0) & 0xF);
  590. public SetDstBlockSizeHeight SetDstBlockSizeHeight => (SetDstBlockSizeHeight)((SetDstBlockSize >> 4) & 0xF);
  591. public SetDstBlockSizeDepth SetDstBlockSizeDepth => (SetDstBlockSizeDepth)((SetDstBlockSize >> 8) & 0xF);
  592. public uint SetDstWidth;
  593. public uint SetDstHeight;
  594. public uint SetDstDepth;
  595. public uint SetDstLayer;
  596. public uint SetDstOriginBytesX;
  597. public int SetDstOriginBytesXV => (int)((SetDstOriginBytesX >> 0) & 0xFFFFF);
  598. public uint SetDstOriginSamplesY;
  599. public int SetDstOriginSamplesYV => (int)((SetDstOriginSamplesY >> 0) & 0xFFFF);
  600. public uint LaunchDma;
  601. public LaunchDmaDstMemoryLayout LaunchDmaDstMemoryLayout => (LaunchDmaDstMemoryLayout)((LaunchDma >> 0) & 0x1);
  602. public LaunchDmaCompletionType LaunchDmaCompletionType => (LaunchDmaCompletionType)((LaunchDma >> 4) & 0x3);
  603. public LaunchDmaInterruptType LaunchDmaInterruptType => (LaunchDmaInterruptType)((LaunchDma >> 8) & 0x3);
  604. public LaunchDmaSemaphoreStructSize LaunchDmaSemaphoreStructSize => (LaunchDmaSemaphoreStructSize)((LaunchDma >> 12) & 0x1);
  605. public bool LaunchDmaReductionEnable => (LaunchDma & 0x2) != 0;
  606. public LaunchDmaReductionOp LaunchDmaReductionOp => (LaunchDmaReductionOp)((LaunchDma >> 13) & 0x7);
  607. public LaunchDmaReductionFormat LaunchDmaReductionFormat => (LaunchDmaReductionFormat)((LaunchDma >> 2) & 0x3);
  608. public bool LaunchDmaSysmembarDisable => (LaunchDma & 0x40) != 0;
  609. public uint LoadInlineData;
  610. public fixed uint Reserved1B8[22];
  611. public Boolean32 EarlyZForce;
  612. public fixed uint Reserved214[45];
  613. public uint SyncpointAction;
  614. public fixed uint Reserved2CC[44];
  615. public Boolean32 RasterizeEnable;
  616. public Array4<TfBufferState> TfBufferState;
  617. public fixed uint Reserved400[192];
  618. public Array4<TfState> TfState;
  619. public fixed uint Reserved740[1];
  620. public Boolean32 TfEnable;
  621. public fixed uint Reserved748[46];
  622. public Array8<RtColorState> RtColorState;
  623. public Array16<ViewportTransform> ViewportTransform;
  624. public Array16<ViewportExtents> ViewportExtents;
  625. public fixed uint ReservedD00[29];
  626. public VertexBufferDrawState VertexBufferDrawState;
  627. public uint DepthMode;
  628. public ClearColors ClearColors;
  629. public float ClearDepthValue;
  630. public fixed uint ReservedD94[3];
  631. public uint ClearStencilValue;
  632. public fixed uint ReservedDA4[7];
  633. public DepthBiasState DepthBiasState;
  634. public fixed uint ReservedDCC[5];
  635. public uint TextureBarrier;
  636. public fixed uint ReservedDE4[7];
  637. public Array16<ScissorState> ScissorState;
  638. public fixed uint ReservedF00[21];
  639. public StencilBackMasks StencilBackMasks;
  640. public fixed uint ReservedF60[5];
  641. public uint InvalidateTextures;
  642. public fixed uint ReservedF78[1];
  643. public uint TextureBarrierTiled;
  644. public fixed uint ReservedF80[4];
  645. public Boolean32 RtColorMaskShared;
  646. public fixed uint ReservedF94[19];
  647. public RtDepthStencilState RtDepthStencilState;
  648. public ScreenScissorState ScreenScissorState;
  649. public fixed uint ReservedFFC[89];
  650. public Array16<VertexAttribState> VertexAttribState;
  651. public fixed uint Reserved11A0[31];
  652. public RtControl RtControl;
  653. public fixed uint Reserved1220[2];
  654. public Size3D RtDepthStencilSize;
  655. public SamplerIndex SamplerIndex;
  656. public fixed uint Reserved1238[37];
  657. public Boolean32 DepthTestEnable;
  658. public fixed uint Reserved12D0[5];
  659. public Boolean32 BlendIndependent;
  660. public Boolean32 DepthWriteEnable;
  661. public Boolean32 AlphaTestEnable;
  662. public fixed uint Reserved12F0[5];
  663. public uint VbElementU8;
  664. public uint Reserved1308;
  665. public CompareOp DepthTestFunc;
  666. public float AlphaTestRef;
  667. public CompareOp AlphaTestFunc;
  668. public uint Reserved1318;
  669. public ColorF BlendConstant;
  670. public fixed uint Reserved132C[4];
  671. public BlendStateCommon BlendStateCommon;
  672. public Boolean32 BlendEnableCommon;
  673. public Array8<Boolean32> BlendEnable;
  674. public StencilTestState StencilTestState;
  675. public fixed uint Reserved13A0[3];
  676. public YControl YControl;
  677. public float LineWidthSmooth;
  678. public float LineWidthAliased;
  679. public fixed uint Reserved13B8[31];
  680. public uint FirstVertex;
  681. public uint FirstInstance;
  682. public fixed uint Reserved143C[53];
  683. public uint ClipDistanceEnable;
  684. public uint Reserved1514;
  685. public float PointSize;
  686. public uint Reserved151C;
  687. public Boolean32 PointSpriteEnable;
  688. public fixed uint Reserved1524[3];
  689. public uint ResetCounter;
  690. public uint Reserved1534;
  691. public Boolean32 RtDepthStencilEnable;
  692. public fixed uint Reserved153C[5];
  693. public GpuVa RenderEnableAddress;
  694. public Condition RenderEnableCondition;
  695. public PoolState SamplerPoolState;
  696. public uint Reserved1568;
  697. public float DepthBiasFactor;
  698. public Boolean32 LineSmoothEnable;
  699. public PoolState TexturePoolState;
  700. public fixed uint Reserved1580[5];
  701. public StencilBackTestState StencilBackTestState;
  702. public fixed uint Reserved15A8[5];
  703. public float DepthBiasUnits;
  704. public fixed uint Reserved15C0[4];
  705. public TextureMsaaMode RtMsaaMode;
  706. public fixed uint Reserved15D4[5];
  707. public uint VbElementU32;
  708. public uint Reserved15EC;
  709. public uint VbElementU16;
  710. public fixed uint Reserved15F4[4];
  711. public uint PointCoordReplace;
  712. public GpuVa ShaderBaseAddress;
  713. public uint Reserved1610;
  714. public uint DrawEnd;
  715. public uint DrawBegin;
  716. public fixed uint Reserved161C[10];
  717. public PrimitiveRestartState PrimitiveRestartState;
  718. public fixed uint Reserved164C[95];
  719. public IndexBufferState IndexBufferState;
  720. public uint IndexBufferCount;
  721. public uint DrawIndexedSmall;
  722. public uint DrawIndexedSmall2;
  723. public uint Reserved17EC;
  724. public uint DrawIndexedSmallIncInstance;
  725. public uint DrawIndexedSmallIncInstance2;
  726. public fixed uint Reserved17F8[33];
  727. public float DepthBiasClamp;
  728. public Array16<Boolean32> VertexBufferInstanced;
  729. public fixed uint Reserved18C0[20];
  730. public Boolean32 VertexProgramPointSize;
  731. public uint Reserved1914;
  732. public FaceState FaceState;
  733. public fixed uint Reserved1924[2];
  734. public uint ViewportTransformEnable;
  735. public fixed uint Reserved1930[3];
  736. public ViewVolumeClipControl ViewVolumeClipControl;
  737. public fixed uint Reserved1940[2];
  738. public Boolean32 PrimitiveTypeOverrideEnable;
  739. public fixed uint Reserved194C[9];
  740. public PrimitiveTypeOverride PrimitiveTypeOverride;
  741. public fixed uint Reserved1974[20];
  742. public LogicalOpState LogicOpState;
  743. public uint Reserved19CC;
  744. public uint Clear;
  745. public fixed uint Reserved19D4[11];
  746. public Array8<RtColorMask> RtColorMask;
  747. public fixed uint Reserved1A20[56];
  748. public GpuVa SemaphoreAddress;
  749. public int SemaphorePayload;
  750. public uint SemaphoreControl;
  751. public fixed uint Reserved1B10[60];
  752. public Array16<VertexBufferState> VertexBufferState;
  753. public fixed uint Reserved1D00[64];
  754. public Array8<BlendState> BlendState;
  755. public Array16<GpuVa> VertexBufferEndAddress;
  756. public fixed uint Reserved1F80[32];
  757. public Array6<ShaderState> ShaderState;
  758. public fixed uint Reserved2180[96];
  759. public uint SetFalcon00;
  760. public uint SetFalcon01;
  761. public uint SetFalcon02;
  762. public uint SetFalcon03;
  763. public uint SetFalcon04;
  764. public uint SetFalcon05;
  765. public uint SetFalcon06;
  766. public uint SetFalcon07;
  767. public uint SetFalcon08;
  768. public uint SetFalcon09;
  769. public uint SetFalcon10;
  770. public uint SetFalcon11;
  771. public uint SetFalcon12;
  772. public uint SetFalcon13;
  773. public uint SetFalcon14;
  774. public uint SetFalcon15;
  775. public uint SetFalcon16;
  776. public uint SetFalcon17;
  777. public uint SetFalcon18;
  778. public uint SetFalcon19;
  779. public uint SetFalcon20;
  780. public uint SetFalcon21;
  781. public uint SetFalcon22;
  782. public uint SetFalcon23;
  783. public uint SetFalcon24;
  784. public uint SetFalcon25;
  785. public uint SetFalcon26;
  786. public uint SetFalcon27;
  787. public uint SetFalcon28;
  788. public uint SetFalcon29;
  789. public uint SetFalcon30;
  790. public uint SetFalcon31;
  791. public UniformBufferState UniformBufferState;
  792. public Array16<uint> UniformBufferUpdateData;
  793. public fixed uint Reserved23D0[16];
  794. public uint UniformBufferBindVertex;
  795. public fixed uint Reserved2414[7];
  796. public uint UniformBufferBindTessControl;
  797. public fixed uint Reserved2434[7];
  798. public uint UniformBufferBindTessEvaluation;
  799. public fixed uint Reserved2454[7];
  800. public uint UniformBufferBindGeometry;
  801. public fixed uint Reserved2474[7];
  802. public uint UniformBufferBindFragment;
  803. public fixed uint Reserved2494[93];
  804. public uint TextureBufferIndex;
  805. public fixed uint Reserved260C[125];
  806. public Array4<Array32<uint>> TfVaryingLocations;
  807. public fixed uint Reserved2A00[640];
  808. public MmeShadowScratch SetMmeShadowScratch;
  809. #pragma warning restore CS0649
  810. }
  811. }