Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

5569 lines
272 KiB

  1. /******************************Module*Header*******************************\
  2. *
  3. * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  4. * !! !!
  5. * !! WARNING: NOT DDK SAMPLE CODE !!
  6. * !! !!
  7. * !! This source code is provided for completeness only and should not be !!
  8. * !! used as sample code for display driver development. Only those sources !!
  9. * !! marked as sample code for a given driver component should be used for !!
  10. * !! development purposes. !!
  11. * !! !!
  12. * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  13. *
  14. * Module Name: reg.h
  15. *
  16. * Content:
  17. *
  18. * Copyright (c) 1994-1999 3Dlabs Inc. Ltd. All rights reserved.
  19. * Copyright (c) 1995-2003 Microsoft Corporation. All rights reserved.
  20. \*****************************************************************************/
  21. #ifndef __REG_H
  22. #define __REG_H
  23. #ifndef _REG_H_
  24. #define _REG_H_
  25. typedef signed long signed32;
  26. typedef unsigned long unsigned32;
  27. struct DMATag {
  28. #if BIG_ENDIAN == 1
  29. unsigned32 Mask :16;
  30. unsigned32 Mode :2;
  31. unsigned32 :1;
  32. unsigned32 MajorGroup :9;
  33. unsigned32 Offset :4;
  34. #else
  35. unsigned32 Offset :4;
  36. unsigned32 MajorGroup :9;
  37. unsigned32 :1;
  38. unsigned32 Mode :2;
  39. unsigned32 Mask :16;
  40. #endif
  41. #ifdef __cplusplus
  42. DMATag(void) { }
  43. DMATag(const unsigned32 i) { *((unsigned32 *)this) = i; }
  44. DMATag& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  45. DMATag& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  46. DMATag& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  47. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  48. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xffff<<16|0x3<<14|0x1ff<<4|0xf<<0)); }
  49. #endif /* __cplusplus */
  50. };
  51. struct Render {
  52. #if BIG_ENDIAN == 1
  53. unsigned32 :4;
  54. unsigned32 FBSourceReadEnable :1;
  55. unsigned32 dErr :7;
  56. unsigned32 :1;
  57. unsigned32 SpanOperation :1;
  58. unsigned32 :1;
  59. unsigned32 SubpixelCorrectionEnable :1;
  60. unsigned32 CoverageEnable :1;
  61. unsigned32 FogEnable :1;
  62. unsigned32 TextureEnable :1;
  63. unsigned32 SyncOnHostData :1;
  64. unsigned32 SyncOnBitMask :1;
  65. unsigned32 UsePointTable :1;
  66. unsigned32 AntialiasingQuality :1;
  67. unsigned32 AntialiasEnable :1;
  68. unsigned32 PrimitiveType :2;
  69. unsigned32 :2;
  70. unsigned32 FastFillEnable :1;
  71. unsigned32 ResetLineStipple :1;
  72. unsigned32 LineStippleEnable :1;
  73. unsigned32 AreaStippleEnable :1;
  74. #else
  75. unsigned32 AreaStippleEnable :1;
  76. unsigned32 LineStippleEnable :1;
  77. unsigned32 ResetLineStipple :1;
  78. unsigned32 FastFillEnable :1;
  79. unsigned32 :2;
  80. unsigned32 PrimitiveType :2;
  81. unsigned32 AntialiasEnable :1;
  82. unsigned32 AntialiasingQuality :1;
  83. unsigned32 UsePointTable :1;
  84. unsigned32 SyncOnBitMask :1;
  85. unsigned32 SyncOnHostData :1;
  86. unsigned32 TextureEnable :1;
  87. unsigned32 FogEnable :1;
  88. unsigned32 CoverageEnable :1;
  89. unsigned32 SubpixelCorrectionEnable :1;
  90. unsigned32 :1;
  91. unsigned32 SpanOperation :1;
  92. unsigned32 :1;
  93. unsigned32 dErr :7;
  94. unsigned32 FBSourceReadEnable :1;
  95. unsigned32 :4;
  96. #endif
  97. #ifdef __cplusplus
  98. Render(void) { }
  99. Render(const unsigned32 i) { *((unsigned32 *)this) = i; }
  100. Render& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  101. Render& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  102. Render& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  103. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  104. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<27|0x7f<<20|0x1<<18|0x1<<16|0x1<<15|0x1<<14|0x1<<13|0x1<<12|0x1<<11|0x1<<10|0x1<<9|0x1<<8|0x3<<6|0x1<<3|0x1<<2|0x1<<1|0x1<<0)); }
  105. #endif /* __cplusplus */
  106. };
  107. struct RasterizerMode {
  108. #if BIG_ENDIAN == 1
  109. unsigned32 :4;
  110. unsigned32 UseSuspendReads :1;
  111. unsigned32 D3DRules :1;
  112. unsigned32 MultiRXBlit :1;
  113. unsigned32 OpaqueSpan :1;
  114. unsigned32 WordPacking :1;
  115. unsigned32 StripeHeight :3;
  116. unsigned32 BitMaskRelative :1;
  117. unsigned32 YLimitsEnable :1;
  118. unsigned32 MultiGLINT :1;
  119. unsigned32 HostDataByteSwapMode :2;
  120. unsigned32 BitMaskOffset :5;
  121. unsigned32 BitMaskPacking :1;
  122. unsigned32 BitMaskByteSwapMode :2;
  123. unsigned32 ForceBackgroundColor :1;
  124. unsigned32 BiasCoordinates :2;
  125. unsigned32 FractionAdjust :2;
  126. unsigned32 InvertBitMask :1;
  127. unsigned32 MirrorBitMask :1;
  128. #else
  129. unsigned32 MirrorBitMask :1;
  130. unsigned32 InvertBitMask :1;
  131. unsigned32 FractionAdjust :2;
  132. unsigned32 BiasCoordinates :2;
  133. unsigned32 ForceBackgroundColor :1;
  134. unsigned32 BitMaskByteSwapMode :2;
  135. unsigned32 BitMaskPacking :1;
  136. unsigned32 BitMaskOffset :5;
  137. unsigned32 HostDataByteSwapMode :2;
  138. unsigned32 MultiGLINT :1;
  139. unsigned32 YLimitsEnable :1;
  140. unsigned32 BitMaskRelative :1;
  141. unsigned32 StripeHeight :3;
  142. unsigned32 WordPacking :1;
  143. unsigned32 OpaqueSpan :1;
  144. unsigned32 MultiRXBlit :1;
  145. unsigned32 D3DRules :1;
  146. unsigned32 UseSuspendReads :1;
  147. unsigned32 :4;
  148. #endif
  149. #ifdef __cplusplus
  150. RasterizerMode(void) { }
  151. RasterizerMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  152. RasterizerMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  153. RasterizerMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  154. RasterizerMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  155. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  156. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<27|0x1<<26|0x1<<25|0x1<<24|0x1<<23|0x7<<20|0x1<<19|0x1<<18|0x1<<17|0x3<<15|0x1f<<10|0x1<<9|0x3<<7|0x1<<6|0x3<<4|0x3<<2|0x1<<1|0x1<<0)); }
  157. #endif /* __cplusplus */
  158. };
  159. struct YLimits {
  160. #if BIG_ENDIAN == 1
  161. signed32 MaxY :16;
  162. signed32 MinY :16;
  163. #else
  164. signed32 MinY :16;
  165. signed32 MaxY :16;
  166. #endif
  167. #ifdef __cplusplus
  168. YLimits(void) { }
  169. YLimits(const unsigned32 i) { *((unsigned32 *)this) = i; }
  170. YLimits& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  171. YLimits& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  172. YLimits& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  173. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  174. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xffff<<16|0xffff<<0)); }
  175. #endif /* __cplusplus */
  176. };
  177. struct GlintScanlineOwnership {
  178. #if BIG_ENDIAN == 1
  179. unsigned32 :27;
  180. unsigned32 Scanline :3;
  181. unsigned32 ScanlineInterval :2;
  182. #else
  183. unsigned32 ScanlineInterval :2;
  184. unsigned32 Scanline :3;
  185. unsigned32 :27;
  186. #endif
  187. #ifdef __cplusplus
  188. GlintScanlineOwnership(void) { }
  189. GlintScanlineOwnership(const unsigned32 i) { *((unsigned32 *)this) = i; }
  190. GlintScanlineOwnership& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  191. GlintScanlineOwnership& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  192. GlintScanlineOwnership& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  193. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  194. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x7<<2|0x3<<0)); }
  195. #endif /* __cplusplus */
  196. };
  197. struct ScanlineOwnership {
  198. #if BIG_ENDIAN == 1
  199. unsigned32 :26;
  200. unsigned32 MyId :3;
  201. unsigned32 Mask :3;
  202. #else
  203. unsigned32 Mask :3;
  204. unsigned32 MyId :3;
  205. unsigned32 :26;
  206. #endif
  207. #ifdef __cplusplus
  208. ScanlineOwnership(void) { }
  209. ScanlineOwnership(const unsigned32 i) { *((unsigned32 *)this) = i; }
  210. ScanlineOwnership& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  211. ScanlineOwnership& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  212. ScanlineOwnership& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  213. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  214. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x7<<3|0x7<<0)); }
  215. #endif /* __cplusplus */
  216. };
  217. struct GlintPixelSize {
  218. #if BIG_ENDIAN == 1
  219. unsigned32 :30;
  220. unsigned32 Size :2;
  221. #else
  222. unsigned32 Size :2;
  223. unsigned32 :30;
  224. #endif
  225. #ifdef __cplusplus
  226. GlintPixelSize(void) { }
  227. GlintPixelSize(const unsigned32 i) { *((unsigned32 *)this) = i; }
  228. GlintPixelSize& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  229. GlintPixelSize& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  230. GlintPixelSize& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  231. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  232. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<0)); }
  233. #endif /* __cplusplus */
  234. };
  235. struct PixelSize {
  236. #if BIG_ENDIAN == 1
  237. unsigned32 Setting :1;
  238. unsigned32 :13;
  239. unsigned32 TwoDSetupUnit :2;
  240. unsigned32 FBWriteUnit :2;
  241. unsigned32 LogicalOpsUnit :2;
  242. unsigned32 FBReadUnit :2;
  243. unsigned32 LUTUnit :2;
  244. unsigned32 TextureUnit :2;
  245. unsigned32 ScissorUnit :2;
  246. unsigned32 RasterizerUnit :2;
  247. unsigned32 AllUnits :2;
  248. #else
  249. unsigned32 AllUnits :2;
  250. unsigned32 RasterizerUnit :2;
  251. unsigned32 ScissorUnit :2;
  252. unsigned32 TextureUnit :2;
  253. unsigned32 LUTUnit :2;
  254. unsigned32 FBReadUnit :2;
  255. unsigned32 LogicalOpsUnit :2;
  256. unsigned32 FBWriteUnit :2;
  257. unsigned32 TwoDSetupUnit :2;
  258. unsigned32 :13;
  259. unsigned32 Setting :1;
  260. #endif
  261. #ifdef __cplusplus
  262. PixelSize(void) { }
  263. PixelSize(const unsigned32 i) { *((unsigned32 *)this) = i; }
  264. PixelSize& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  265. PixelSize& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  266. PixelSize& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  267. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  268. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<31|0x3<<16|0x3<<14|0x3<<12|0x3<<10|0x3<<8|0x3<<6|0x3<<4|0x3<<2|0x3<<0)); }
  269. #endif /* __cplusplus */
  270. };
  271. struct StripeOffsetY {
  272. #if BIG_ENDIAN == 1
  273. unsigned32 :16;
  274. unsigned32 Offset :16;
  275. #else
  276. unsigned32 Offset :16;
  277. unsigned32 :16;
  278. #endif
  279. #ifdef __cplusplus
  280. StripeOffsetY(void) { }
  281. StripeOffsetY(const unsigned32 i) { *((unsigned32 *)this) = i; }
  282. StripeOffsetY& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  283. StripeOffsetY& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  284. StripeOffsetY& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  285. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  286. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xffff<<0)); }
  287. #endif /* __cplusplus */
  288. };
  289. struct ReadMonitorMode {
  290. #if BIG_ENDIAN == 1
  291. signed32 StripeOffset :16;
  292. unsigned32 :8;
  293. unsigned32 HashFunction :1;
  294. unsigned32 StripeHeight :3;
  295. unsigned32 StripePitch :3;
  296. unsigned32 Enable :1;
  297. #else
  298. unsigned32 Enable :1;
  299. unsigned32 StripePitch :3;
  300. unsigned32 StripeHeight :3;
  301. unsigned32 HashFunction :1;
  302. unsigned32 :8;
  303. signed32 StripeOffset :16;
  304. #endif
  305. #ifdef __cplusplus
  306. ReadMonitorMode(void) { }
  307. ReadMonitorMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  308. ReadMonitorMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  309. ReadMonitorMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  310. ReadMonitorMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  311. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  312. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xffff<<16|0x1<<7|0x7<<4|0x7<<1|0x1<<0)); }
  313. #endif /* __cplusplus */
  314. };
  315. struct XY {
  316. #if BIG_ENDIAN == 1
  317. signed32 Y :16;
  318. signed32 X :16;
  319. #else
  320. signed32 X :16;
  321. signed32 Y :16;
  322. #endif
  323. #ifdef __cplusplus
  324. XY(void) { }
  325. XY(const unsigned32 i) { *((unsigned32 *)this) = i; }
  326. XY& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  327. XY& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  328. XY& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  329. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  330. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xffff<<16|0xffff<<0)); }
  331. #endif /* __cplusplus */
  332. };
  333. struct UXY {
  334. #if BIG_ENDIAN == 1
  335. unsigned32 Y :16;
  336. unsigned32 X :16;
  337. #else
  338. unsigned32 X :16;
  339. unsigned32 Y :16;
  340. #endif
  341. #ifdef __cplusplus
  342. UXY(void) { }
  343. UXY(const unsigned32 i) { *((unsigned32 *)this) = i; }
  344. UXY& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  345. UXY& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  346. UXY& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  347. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  348. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xffff<<16|0xffff<<0)); }
  349. #endif /* __cplusplus */
  350. };
  351. struct ScissorMode {
  352. #if BIG_ENDIAN == 1
  353. unsigned32 :30;
  354. unsigned32 ScreenScissorEnable :1;
  355. unsigned32 UserScissorEnable :1;
  356. #else
  357. unsigned32 UserScissorEnable :1;
  358. unsigned32 ScreenScissorEnable :1;
  359. unsigned32 :30;
  360. #endif
  361. #ifdef __cplusplus
  362. ScissorMode(void) { }
  363. ScissorMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  364. ScissorMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  365. ScissorMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  366. ScissorMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  367. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  368. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<1|0x1<<0)); }
  369. #endif /* __cplusplus */
  370. };
  371. struct AreaStippleMode {
  372. #if BIG_ENDIAN == 1
  373. unsigned32 :1;
  374. unsigned32 YTableOffset :5;
  375. unsigned32 XTableOffset :5;
  376. unsigned32 OpaqueSpan :1;
  377. unsigned32 MirrorY :1;
  378. unsigned32 MirrorX :1;
  379. unsigned32 InvertStipplePattern :1;
  380. unsigned32 YOffset :5;
  381. unsigned32 XOffset :5;
  382. unsigned32 YAddressSelect :3;
  383. unsigned32 XAddressSelect :3;
  384. unsigned32 Enable :1;
  385. #else
  386. unsigned32 Enable :1;
  387. unsigned32 XAddressSelect :3;
  388. unsigned32 YAddressSelect :3;
  389. unsigned32 XOffset :5;
  390. unsigned32 YOffset :5;
  391. unsigned32 InvertStipplePattern :1;
  392. unsigned32 MirrorX :1;
  393. unsigned32 MirrorY :1;
  394. unsigned32 OpaqueSpan :1;
  395. unsigned32 XTableOffset :5;
  396. unsigned32 YTableOffset :5;
  397. unsigned32 :1;
  398. #endif
  399. #ifdef __cplusplus
  400. AreaStippleMode(void) { }
  401. AreaStippleMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  402. AreaStippleMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  403. AreaStippleMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  404. AreaStippleMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  405. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  406. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1f<<26|0x1f<<21|0x1<<20|0x1<<19|0x1<<18|0x1<<17|0x1f<<12|0x1f<<7|0x7<<4|0x7<<1|0x1<<0)); }
  407. #endif /* __cplusplus */
  408. };
  409. struct LineStippleMode {
  410. #if BIG_ENDIAN == 1
  411. unsigned32 :5;
  412. unsigned32 Mirror :1;
  413. unsigned32 StippleMask :16;
  414. unsigned32 RepeatFactor :9;
  415. unsigned32 StippleEnable :1;
  416. #else
  417. unsigned32 StippleEnable :1;
  418. unsigned32 RepeatFactor :9;
  419. unsigned32 StippleMask :16;
  420. unsigned32 Mirror :1;
  421. unsigned32 :5;
  422. #endif
  423. #ifdef __cplusplus
  424. LineStippleMode(void) { }
  425. LineStippleMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  426. LineStippleMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  427. LineStippleMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  428. LineStippleMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  429. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  430. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<26|0xffff<<10|0x1ff<<1|0x1<<0)); }
  431. #endif /* __cplusplus */
  432. };
  433. struct Line {
  434. #if BIG_ENDIAN == 1
  435. unsigned32 :6;
  436. unsigned32 SegmentRepeatCounter :9;
  437. unsigned32 SegmentBitCounter :4;
  438. unsigned32 LiveRepeatCounter :9;
  439. unsigned32 LiveBitCounter :4;
  440. #else
  441. unsigned32 LiveBitCounter :4;
  442. unsigned32 LiveRepeatCounter :9;
  443. unsigned32 SegmentBitCounter :4;
  444. unsigned32 SegmentRepeatCounter :9;
  445. unsigned32 :6;
  446. #endif
  447. #ifdef __cplusplus
  448. Line(void) { }
  449. Line(const unsigned32 i) { *((unsigned32 *)this) = i; }
  450. Line& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  451. Line& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  452. Line& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  453. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  454. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1ff<<17|0xf<<13|0x1ff<<4|0xf<<0)); }
  455. #endif /* __cplusplus */
  456. };
  457. struct GlintTextureAddressMode {
  458. #if BIG_ENDIAN == 1
  459. unsigned32 :14;
  460. unsigned32 TextureMapType :1;
  461. unsigned32 Height :4;
  462. unsigned32 Width :4;
  463. unsigned32 EnableDY :1;
  464. unsigned32 EnableLOD :1;
  465. unsigned32 InhibitDDAInitialization :1;
  466. unsigned32 Operation :1;
  467. unsigned32 TWrap :2;
  468. unsigned32 SWrap :2;
  469. unsigned32 Enable :1;
  470. #else
  471. unsigned32 Enable :1;
  472. unsigned32 SWrap :2;
  473. unsigned32 TWrap :2;
  474. unsigned32 Operation :1;
  475. unsigned32 InhibitDDAInitialization :1;
  476. unsigned32 EnableLOD :1;
  477. unsigned32 EnableDY :1;
  478. unsigned32 Width :4;
  479. unsigned32 Height :4;
  480. unsigned32 TextureMapType :1;
  481. unsigned32 :14;
  482. #endif
  483. #ifdef __cplusplus
  484. GlintTextureAddressMode(void) { }
  485. GlintTextureAddressMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  486. GlintTextureAddressMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  487. GlintTextureAddressMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  488. GlintTextureAddressMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  489. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  490. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<17|0xf<<13|0xf<<9|0x1<<8|0x1<<7|0x1<<6|0x1<<5|0x3<<3|0x3<<1|0x1<<0)); }
  491. #endif /* __cplusplus */
  492. };
  493. struct PermediaTextureAddressMode {
  494. #if BIG_ENDIAN == 1
  495. unsigned32 :30;
  496. unsigned32 PerspectiveCorrection :1;
  497. unsigned32 Enable :1;
  498. #else
  499. unsigned32 Enable :1;
  500. unsigned32 PerspectiveCorrection :1;
  501. unsigned32 :30;
  502. #endif
  503. #ifdef __cplusplus
  504. PermediaTextureAddressMode(void) { }
  505. PermediaTextureAddressMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  506. PermediaTextureAddressMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  507. PermediaTextureAddressMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  508. PermediaTextureAddressMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  509. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  510. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<1|0x1<<0)); }
  511. #endif /* __cplusplus */
  512. };
  513. struct TextureCoordMode {
  514. #if BIG_ENDIAN == 1
  515. unsigned32 :9;
  516. unsigned32 DuplicateCoord :1;
  517. unsigned32 WrapT1 :2;
  518. unsigned32 WrapS1 :2;
  519. unsigned32 TextureMapType :1;
  520. unsigned32 Height :4;
  521. unsigned32 Width :4;
  522. unsigned32 EnableDY :1;
  523. unsigned32 EnableLOD :1;
  524. unsigned32 InhibitDDAInitialisation :1;
  525. unsigned32 Operation :1;
  526. unsigned32 WrapT :2;
  527. unsigned32 WrapS :2;
  528. unsigned32 Enable :1;
  529. #else
  530. unsigned32 Enable :1;
  531. unsigned32 WrapS :2;
  532. unsigned32 WrapT :2;
  533. unsigned32 Operation :1;
  534. unsigned32 InhibitDDAInitialisation :1;
  535. unsigned32 EnableLOD :1;
  536. unsigned32 EnableDY :1;
  537. unsigned32 Width :4;
  538. unsigned32 Height :4;
  539. unsigned32 TextureMapType :1;
  540. unsigned32 WrapS1 :2;
  541. unsigned32 WrapT1 :2;
  542. unsigned32 DuplicateCoord :1;
  543. unsigned32 :9;
  544. #endif
  545. #ifdef __cplusplus
  546. TextureCoordMode(void) { }
  547. TextureCoordMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  548. TextureCoordMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  549. TextureCoordMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  550. TextureCoordMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  551. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  552. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<22|0x3<<20|0x3<<18|0x1<<17|0xf<<13|0xf<<9|0x1<<8|0x1<<7|0x1<<6|0x1<<5|0x3<<3|0x3<<1|0x1<<0)); }
  553. #endif /* __cplusplus */
  554. };
  555. struct GlintLOD {
  556. #if BIG_ENDIAN == 1
  557. unsigned32 :20;
  558. unsigned32 Integer :4;
  559. unsigned32 Fraction :8;
  560. #else
  561. unsigned32 Fraction :8;
  562. unsigned32 Integer :4;
  563. unsigned32 :20;
  564. #endif
  565. #ifdef __cplusplus
  566. GlintLOD(void) { }
  567. GlintLOD(const unsigned32 i) { *((unsigned32 *)this) = i; }
  568. GlintLOD& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  569. GlintLOD& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  570. GlintLOD& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  571. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  572. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xf<<8|0xff<<0)); }
  573. #endif /* __cplusplus */
  574. };
  575. struct LOD {
  576. #if BIG_ENDIAN == 1
  577. unsigned32 :28;
  578. unsigned32 Value :4;
  579. #else
  580. unsigned32 Value :4;
  581. unsigned32 :28;
  582. #endif
  583. #ifdef __cplusplus
  584. LOD(void) { }
  585. LOD(const unsigned32 i) { *((unsigned32 *)this) = i; }
  586. LOD& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  587. LOD& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  588. LOD& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  589. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  590. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xf<<0)); }
  591. #endif /* __cplusplus */
  592. };
  593. struct LOD1 {
  594. #if BIG_ENDIAN == 1
  595. unsigned32 :20;
  596. unsigned32 LOD :12;
  597. #else
  598. unsigned32 LOD :12;
  599. unsigned32 :20;
  600. #endif
  601. #ifdef __cplusplus
  602. LOD1(void) { }
  603. LOD1(const unsigned32 i) { *((unsigned32 *)this) = i; }
  604. LOD1& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  605. LOD1& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  606. LOD1& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  607. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  608. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xfff<<0)); }
  609. #endif /* __cplusplus */
  610. };
  611. struct TextureLODBias {
  612. #if BIG_ENDIAN == 1
  613. unsigned32 :19;
  614. signed32 Integer :5;
  615. unsigned32 Fraction :8;
  616. #else
  617. unsigned32 Fraction :8;
  618. signed32 Integer :5;
  619. unsigned32 :19;
  620. #endif
  621. #ifdef __cplusplus
  622. TextureLODBias(void) { }
  623. TextureLODBias(const unsigned32 i) { *((unsigned32 *)this) = i; }
  624. TextureLODBias& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  625. TextureLODBias& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  626. TextureLODBias& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  627. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  628. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1f<<8|0xff<<0)); }
  629. #endif /* __cplusplus */
  630. };
  631. struct GlintTextureReadMode {
  632. #if BIG_ENDIAN == 1
  633. unsigned32 :4;
  634. unsigned32 BorderClamp :1;
  635. unsigned32 FBSourceAddr :2;
  636. unsigned32 PrimaryCache :1;
  637. unsigned32 MipMap :1;
  638. unsigned32 TextureMapType :1;
  639. unsigned32 VWrap :2;
  640. unsigned32 UWrap :2;
  641. unsigned32 MinFilter :3;
  642. unsigned32 MagFilter :1;
  643. unsigned32 Patch :1;
  644. unsigned32 Border :1;
  645. unsigned32 Depth :3;
  646. unsigned32 Height :4;
  647. unsigned32 Width :4;
  648. unsigned32 Enable :1;
  649. #else
  650. unsigned32 Enable :1;
  651. unsigned32 Width :4;
  652. unsigned32 Height :4;
  653. unsigned32 Depth :3;
  654. unsigned32 Border :1;
  655. unsigned32 Patch :1;
  656. unsigned32 MagFilter :1;
  657. unsigned32 MinFilter :3;
  658. unsigned32 UWrap :2;
  659. unsigned32 VWrap :2;
  660. unsigned32 TextureMapType :1;
  661. unsigned32 MipMap :1;
  662. unsigned32 PrimaryCache :1;
  663. unsigned32 FBSourceAddr :2;
  664. unsigned32 BorderClamp :1;
  665. unsigned32 :4;
  666. #endif
  667. #ifdef __cplusplus
  668. GlintTextureReadMode(void) { }
  669. GlintTextureReadMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  670. GlintTextureReadMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  671. GlintTextureReadMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  672. GlintTextureReadMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  673. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  674. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<27|0x3<<25|0x1<<24|0x1<<23|0x1<<22|0x3<<20|0x3<<18|0x7<<15|0x1<<14|0x1<<13|0x1<<12|0x7<<9|0xf<<5|0xf<<1|0x1<<0)); }
  675. #endif /* __cplusplus */
  676. };
  677. struct TextureReadMode {
  678. #if BIG_ENDIAN == 1
  679. unsigned32 :1;
  680. unsigned32 OpaqueSpan :1;
  681. unsigned32 Invert :1;
  682. unsigned32 Mirror :1;
  683. unsigned32 ByteSwap :3;
  684. unsigned32 TextureType :2;
  685. unsigned32 Origin :1;
  686. unsigned32 LogicalTexture :1;
  687. unsigned32 MapMaxLevel :4;
  688. unsigned32 MapBaseLevel :4;
  689. unsigned32 CombineCaches :1;
  690. unsigned32 Texture3D :1;
  691. unsigned32 TexelSize :2;
  692. unsigned32 Height :4;
  693. unsigned32 Width :4;
  694. unsigned32 Enable :1;
  695. #else
  696. unsigned32 Enable :1;
  697. unsigned32 Width :4;
  698. unsigned32 Height :4;
  699. unsigned32 TexelSize :2;
  700. unsigned32 Texture3D :1;
  701. unsigned32 CombineCaches :1;
  702. unsigned32 MapBaseLevel :4;
  703. unsigned32 MapMaxLevel :4;
  704. unsigned32 LogicalTexture :1;
  705. unsigned32 Origin :1;
  706. unsigned32 TextureType :2;
  707. unsigned32 ByteSwap :3;
  708. unsigned32 Mirror :1;
  709. unsigned32 Invert :1;
  710. unsigned32 OpaqueSpan :1;
  711. unsigned32 :1;
  712. #endif
  713. #ifdef __cplusplus
  714. TextureReadMode(void) { }
  715. TextureReadMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  716. TextureReadMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  717. TextureReadMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  718. TextureReadMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  719. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  720. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<30|0x1<<29|0x1<<28|0x7<<25|0x3<<23|0x1<<22|0x1<<21|0xf<<17|0xf<<13|0x1<<12|0x1<<11|0x3<<9|0xf<<5|0xf<<1|0x1<<0)); }
  721. #endif /* __cplusplus */
  722. };
  723. struct TextureFormat {
  724. #if BIG_ENDIAN == 1
  725. unsigned32 :12;
  726. unsigned32 OneCompFormat :2;
  727. unsigned32 LUTOffset :8;
  728. unsigned32 ByteSwapBitMask :1;
  729. unsigned32 InvertBitMask :1;
  730. unsigned32 MirrorBitMask :1;
  731. unsigned32 OutputFormat :2;
  732. unsigned32 NumberComps :2;
  733. unsigned32 ColorOrder :1;
  734. unsigned32 Format :1;
  735. unsigned32 Order :1;
  736. #else
  737. unsigned32 Order :1;
  738. unsigned32 Format :1;
  739. unsigned32 ColorOrder :1;
  740. unsigned32 NumberComps :2;
  741. unsigned32 OutputFormat :2;
  742. unsigned32 MirrorBitMask :1;
  743. unsigned32 InvertBitMask :1;
  744. unsigned32 ByteSwapBitMask :1;
  745. unsigned32 LUTOffset :8;
  746. unsigned32 OneCompFormat :2;
  747. unsigned32 :12;
  748. #endif
  749. #ifdef __cplusplus
  750. TextureFormat(void) { }
  751. TextureFormat(const unsigned32 i) { *((unsigned32 *)this) = i; }
  752. TextureFormat& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  753. TextureFormat& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  754. TextureFormat& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  755. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  756. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<18|0xff<<10|0x1<<9|0x1<<8|0x1<<7|0x3<<5|0x3<<3|0x1<<2|0x1<<1|0x1<<0)); }
  757. #endif /* __cplusplus */
  758. };
  759. struct TexelLUTIndex {
  760. #if BIG_ENDIAN == 1
  761. unsigned32 :24;
  762. unsigned32 Index :8;
  763. #else
  764. unsigned32 Index :8;
  765. unsigned32 :24;
  766. #endif
  767. #ifdef __cplusplus
  768. TexelLUTIndex(void) { }
  769. TexelLUTIndex(const unsigned32 i) { *((unsigned32 *)this) = i; }
  770. TexelLUTIndex& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  771. TexelLUTIndex& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  772. TexelLUTIndex& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  773. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  774. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xff<<0)); }
  775. #endif /* __cplusplus */
  776. };
  777. struct LUTIndex {
  778. #if BIG_ENDIAN == 1
  779. unsigned32 :24;
  780. unsigned32 Index :8;
  781. #else
  782. unsigned32 Index :8;
  783. unsigned32 :24;
  784. #endif
  785. #ifdef __cplusplus
  786. LUTIndex(void) { }
  787. LUTIndex(const unsigned32 i) { *((unsigned32 *)this) = i; }
  788. LUTIndex& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  789. LUTIndex& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  790. LUTIndex& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  791. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  792. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xff<<0)); }
  793. #endif /* __cplusplus */
  794. };
  795. struct TexelLUTTransfer {
  796. #if BIG_ENDIAN == 1
  797. unsigned32 :15;
  798. unsigned32 Count :9;
  799. unsigned32 Index :8;
  800. #else
  801. unsigned32 Index :8;
  802. unsigned32 Count :9;
  803. unsigned32 :15;
  804. #endif
  805. #ifdef __cplusplus
  806. TexelLUTTransfer(void) { }
  807. TexelLUTTransfer(const unsigned32 i) { *((unsigned32 *)this) = i; }
  808. TexelLUTTransfer& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  809. TexelLUTTransfer& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  810. TexelLUTTransfer& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  811. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  812. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1ff<<8|0xff<<0)); }
  813. #endif /* __cplusplus */
  814. };
  815. struct LUTTransfer {
  816. #if BIG_ENDIAN == 1
  817. unsigned32 :17;
  818. unsigned32 Count :7;
  819. unsigned32 Index :8;
  820. #else
  821. unsigned32 Index :8;
  822. unsigned32 Count :7;
  823. unsigned32 :17;
  824. #endif
  825. #ifdef __cplusplus
  826. LUTTransfer(void) { }
  827. LUTTransfer(const unsigned32 i) { *((unsigned32 *)this) = i; }
  828. LUTTransfer& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  829. LUTTransfer& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  830. LUTTransfer& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  831. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  832. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x7f<<8|0xff<<0)); }
  833. #endif /* __cplusplus */
  834. };
  835. struct GlintTextureFilterMode {
  836. #if BIG_ENDIAN == 1
  837. unsigned32 :29;
  838. unsigned32 AlphaMapSense :1;
  839. unsigned32 AlphaMapEnable :1;
  840. unsigned32 Enable :1;
  841. #else
  842. unsigned32 Enable :1;
  843. unsigned32 AlphaMapEnable :1;
  844. unsigned32 AlphaMapSense :1;
  845. unsigned32 :29;
  846. #endif
  847. #ifdef __cplusplus
  848. GlintTextureFilterMode(void) { }
  849. GlintTextureFilterMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  850. GlintTextureFilterMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  851. GlintTextureFilterMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  852. GlintTextureFilterMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  853. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  854. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<2|0x1<<1|0x1<<0)); }
  855. #endif /* __cplusplus */
  856. };
  857. struct TextureFilterMode {
  858. #if BIG_ENDIAN == 1
  859. unsigned32 Shift1 :1;
  860. unsigned32 Shift0 :1;
  861. unsigned32 ForceAlphaToOne1 :1;
  862. unsigned32 ForceAlphaToOne0 :1;
  863. unsigned32 MultiTexture :1;
  864. unsigned32 AlphaMapFilterLimit01 :4;
  865. unsigned32 AlphaMapFilterLimit1 :3;
  866. unsigned32 AlphaMapFilterLimit0 :3;
  867. unsigned32 AlphaMapFiltering :1;
  868. unsigned32 AlphaMapSense1 :1;
  869. unsigned32 AlphaMapEnable1 :1;
  870. unsigned32 ColorOrder1 :1;
  871. unsigned32 Format1 :4;
  872. unsigned32 CombineCaches :1;
  873. unsigned32 AlphaMapSense0 :1;
  874. unsigned32 AlphaMapEnable0 :1;
  875. unsigned32 ColorOrder0 :1;
  876. unsigned32 Format0 :4;
  877. unsigned32 Enable :1;
  878. #else
  879. unsigned32 Enable :1;
  880. unsigned32 Format0 :4;
  881. unsigned32 ColorOrder0 :1;
  882. unsigned32 AlphaMapEnable0 :1;
  883. unsigned32 AlphaMapSense0 :1;
  884. unsigned32 CombineCaches :1;
  885. unsigned32 Format1 :4;
  886. unsigned32 ColorOrder1 :1;
  887. unsigned32 AlphaMapEnable1 :1;
  888. unsigned32 AlphaMapSense1 :1;
  889. unsigned32 AlphaMapFiltering :1;
  890. unsigned32 AlphaMapFilterLimit0 :3;
  891. unsigned32 AlphaMapFilterLimit1 :3;
  892. unsigned32 AlphaMapFilterLimit01 :4;
  893. unsigned32 MultiTexture :1;
  894. unsigned32 ForceAlphaToOne0 :1;
  895. unsigned32 ForceAlphaToOne1 :1;
  896. unsigned32 Shift0 :1;
  897. unsigned32 Shift1 :1;
  898. #endif
  899. #ifdef __cplusplus
  900. TextureFilterMode(void) { }
  901. TextureFilterMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  902. TextureFilterMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  903. TextureFilterMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  904. TextureFilterMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  905. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  906. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<31|0x1<<30|0x1<<29|0x1<<28|0x1<<27|0xf<<23|0x7<<20|0x7<<17|0x1<<16|0x1<<15|0x1<<14|0x1<<13|0xf<<9|0x1<<8|0x1<<7|0x1<<6|0x1<<5|0xf<<1|0x1<<0)); }
  907. #endif /* __cplusplus */
  908. };
  909. struct TextureMapFormat {
  910. #if BIG_ENDIAN == 1
  911. unsigned32 :10;
  912. unsigned32 TexelSize :3;
  913. unsigned32 :1;
  914. unsigned32 SubPatchMode :1;
  915. unsigned32 WindowOrigin :1;
  916. unsigned32 :7;
  917. unsigned32 PP2 :3;
  918. unsigned32 PP1 :3;
  919. unsigned32 PP0 :3;
  920. #else
  921. unsigned32 PP0 :3;
  922. unsigned32 PP1 :3;
  923. unsigned32 PP2 :3;
  924. unsigned32 :7;
  925. unsigned32 WindowOrigin :1;
  926. unsigned32 SubPatchMode :1;
  927. unsigned32 :1;
  928. unsigned32 TexelSize :3;
  929. unsigned32 :10;
  930. #endif
  931. #ifdef __cplusplus
  932. TextureMapFormat(void) { }
  933. TextureMapFormat(const unsigned32 i) { *((unsigned32 *)this) = i; }
  934. TextureMapFormat& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  935. TextureMapFormat& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  936. TextureMapFormat& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  937. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  938. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x7<<19|0x1<<17|0x1<<16|0x7<<6|0x7<<3|0x7<<0)); }
  939. #endif /* __cplusplus */
  940. };
  941. struct TextureDataFormat {
  942. #if BIG_ENDIAN == 1
  943. unsigned32 :23;
  944. unsigned32 SpanFormat :1;
  945. unsigned32 AlphaMap :1;
  946. unsigned32 TextureFormatExtension :1;
  947. unsigned32 ColorOrder :1;
  948. unsigned32 NoAlphaBuffer :1;
  949. unsigned32 TextureFormat :4;
  950. #else
  951. unsigned32 TextureFormat :4;
  952. unsigned32 NoAlphaBuffer :1;
  953. unsigned32 ColorOrder :1;
  954. unsigned32 TextureFormatExtension :1;
  955. unsigned32 AlphaMap :1;
  956. unsigned32 SpanFormat :1;
  957. unsigned32 :23;
  958. #endif
  959. #ifdef __cplusplus
  960. TextureDataFormat(void) { }
  961. TextureDataFormat(const unsigned32 i) { *((unsigned32 *)this) = i; }
  962. TextureDataFormat& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  963. TextureDataFormat& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  964. TextureDataFormat& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  965. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  966. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<8|0x1<<7|0x1<<6|0x1<<5|0x1<<4|0xf<<0)); }
  967. #endif /* __cplusplus */
  968. };
  969. struct PermediaTextureReadMode {
  970. #if BIG_ENDIAN == 1
  971. unsigned32 :7;
  972. unsigned32 PackedData :1;
  973. unsigned32 :6;
  974. unsigned32 FilterMode :1;
  975. unsigned32 Height :4;
  976. unsigned32 Width :4;
  977. unsigned32 :4;
  978. unsigned32 TWrap :2;
  979. unsigned32 SWrap :2;
  980. unsigned32 Enable :1;
  981. #else
  982. unsigned32 Enable :1;
  983. unsigned32 SWrap :2;
  984. unsigned32 TWrap :2;
  985. unsigned32 :4;
  986. unsigned32 Width :4;
  987. unsigned32 Height :4;
  988. unsigned32 FilterMode :1;
  989. unsigned32 :6;
  990. unsigned32 PackedData :1;
  991. unsigned32 :7;
  992. #endif
  993. #ifdef __cplusplus
  994. PermediaTextureReadMode(void) { }
  995. PermediaTextureReadMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  996. PermediaTextureReadMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  997. PermediaTextureReadMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  998. PermediaTextureReadMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  999. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1000. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<24|0x1<<17|0xf<<13|0xf<<9|0x3<<3|0x3<<1|0x1<<0)); }
  1001. #endif /* __cplusplus */
  1002. };
  1003. struct TexelLUTMode {
  1004. #if BIG_ENDIAN == 1
  1005. unsigned32 :20;
  1006. unsigned32 PixelsPerEntry :2;
  1007. unsigned32 Offset :8;
  1008. unsigned32 DirectIndex :1;
  1009. unsigned32 Enable :1;
  1010. #else
  1011. unsigned32 Enable :1;
  1012. unsigned32 DirectIndex :1;
  1013. unsigned32 Offset :8;
  1014. unsigned32 PixelsPerEntry :2;
  1015. unsigned32 :20;
  1016. #endif
  1017. #ifdef __cplusplus
  1018. TexelLUTMode(void) { }
  1019. TexelLUTMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1020. TexelLUTMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1021. TexelLUTMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1022. TexelLUTMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1023. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1024. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<10|0xff<<2|0x1<<1|0x1<<0)); }
  1025. #endif /* __cplusplus */
  1026. };
  1027. struct TextureColorMode {
  1028. #if BIG_ENDIAN == 1
  1029. unsigned32 :20;
  1030. unsigned32 ColorLoadMode :2;
  1031. unsigned32 BaseFormat :3;
  1032. unsigned32 KsDDA :1;
  1033. unsigned32 KdDDA :1;
  1034. unsigned32 TextureType :1;
  1035. unsigned32 ApplicationMode :3;
  1036. unsigned32 Enable :1;
  1037. #else
  1038. unsigned32 Enable :1;
  1039. unsigned32 ApplicationMode :3;
  1040. unsigned32 TextureType :1;
  1041. unsigned32 KdDDA :1;
  1042. unsigned32 KsDDA :1;
  1043. unsigned32 BaseFormat :3;
  1044. unsigned32 ColorLoadMode :2;
  1045. unsigned32 :20;
  1046. #endif
  1047. #ifdef __cplusplus
  1048. TextureColorMode(void) { }
  1049. TextureColorMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1050. TextureColorMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1051. TextureColorMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1052. TextureColorMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1053. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1054. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<10|0x7<<7|0x1<<6|0x1<<5|0x1<<4|0x7<<1|0x1<<0)); }
  1055. #endif /* __cplusplus */
  1056. };
  1057. struct TextureApplicationMode {
  1058. #if BIG_ENDIAN == 1
  1059. unsigned32 :8;
  1060. unsigned32 MotionCompEnable :1;
  1061. unsigned32 EnableKs :1;
  1062. unsigned32 EnableKd :1;
  1063. unsigned32 AlphaOperation :3;
  1064. unsigned32 AlphaInvertI :1;
  1065. unsigned32 AlphaI :2;
  1066. unsigned32 AlphaB :2;
  1067. unsigned32 AlphaA :2;
  1068. unsigned32 ColorOperation :3;
  1069. unsigned32 ColorInvertI :1;
  1070. unsigned32 ColorI :2;
  1071. unsigned32 ColorB :2;
  1072. unsigned32 ColorA :2;
  1073. unsigned32 Enable :1;
  1074. #else
  1075. unsigned32 Enable :1;
  1076. unsigned32 ColorA :2;
  1077. unsigned32 ColorB :2;
  1078. unsigned32 ColorI :2;
  1079. unsigned32 ColorInvertI :1;
  1080. unsigned32 ColorOperation :3;
  1081. unsigned32 AlphaA :2;
  1082. unsigned32 AlphaB :2;
  1083. unsigned32 AlphaI :2;
  1084. unsigned32 AlphaInvertI :1;
  1085. unsigned32 AlphaOperation :3;
  1086. unsigned32 EnableKd :1;
  1087. unsigned32 EnableKs :1;
  1088. unsigned32 MotionCompEnable :1;
  1089. unsigned32 :8;
  1090. #endif
  1091. #ifdef __cplusplus
  1092. TextureApplicationMode(void) { }
  1093. TextureApplicationMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1094. TextureApplicationMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1095. TextureApplicationMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1096. TextureApplicationMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1097. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1098. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<23|0x1<<22|0x1<<21|0x7<<18|0x1<<17|0x3<<15|0x3<<13|0x3<<11|0x7<<8|0x1<<7|0x3<<5|0x3<<3|0x3<<1|0x1<<0)); }
  1099. #endif /* __cplusplus */
  1100. };
  1101. struct FogMode {
  1102. #if BIG_ENDIAN == 1
  1103. unsigned32 :22;
  1104. unsigned32 InvertFI :1;
  1105. unsigned32 ZShift :5;
  1106. unsigned32 UseZ :1;
  1107. unsigned32 Table :1;
  1108. unsigned32 ColorMode :1;
  1109. unsigned32 Enable :1;
  1110. #else
  1111. unsigned32 Enable :1;
  1112. unsigned32 ColorMode :1;
  1113. unsigned32 Table :1;
  1114. unsigned32 UseZ :1;
  1115. unsigned32 ZShift :5;
  1116. unsigned32 InvertFI :1;
  1117. unsigned32 :22;
  1118. #endif
  1119. #ifdef __cplusplus
  1120. FogMode(void) { }
  1121. FogMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1122. FogMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1123. FogMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1124. FogMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1125. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1126. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<9|0x1f<<4|0x1<<3|0x1<<2|0x1<<1|0x1<<0)); }
  1127. #endif /* __cplusplus */
  1128. };
  1129. struct ColorDDAMode {
  1130. #if BIG_ENDIAN == 1
  1131. unsigned32 :30;
  1132. unsigned32 Shading :1;
  1133. unsigned32 Enable :1;
  1134. #else
  1135. unsigned32 Enable :1;
  1136. unsigned32 Shading :1;
  1137. unsigned32 :30;
  1138. #endif
  1139. #ifdef __cplusplus
  1140. ColorDDAMode(void) { }
  1141. ColorDDAMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1142. ColorDDAMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1143. ColorDDAMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1144. ColorDDAMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1145. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1146. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<1|0x1<<0)); }
  1147. #endif /* __cplusplus */
  1148. };
  1149. struct Color {
  1150. #if BIG_ENDIAN == 1
  1151. unsigned32 Alpha :8;
  1152. unsigned32 Blue :8;
  1153. unsigned32 Green :8;
  1154. unsigned32 Red :8;
  1155. #else
  1156. unsigned32 Red :8;
  1157. unsigned32 Green :8;
  1158. unsigned32 Blue :8;
  1159. unsigned32 Alpha :8;
  1160. #endif
  1161. #ifdef __cplusplus
  1162. Color(void) { }
  1163. Color(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1164. Color& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1165. Color& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1166. Color& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1167. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1168. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xff<<24|0xff<<16|0xff<<8|0xff<<0)); }
  1169. #endif /* __cplusplus */
  1170. };
  1171. struct AlphaTestMode {
  1172. #if BIG_ENDIAN == 1
  1173. unsigned32 :20;
  1174. unsigned32 Reference :8;
  1175. unsigned32 Compare :3;
  1176. unsigned32 Enable :1;
  1177. #else
  1178. unsigned32 Enable :1;
  1179. unsigned32 Compare :3;
  1180. unsigned32 Reference :8;
  1181. unsigned32 :20;
  1182. #endif
  1183. #ifdef __cplusplus
  1184. AlphaTestMode(void) { }
  1185. AlphaTestMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1186. AlphaTestMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1187. AlphaTestMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1188. AlphaTestMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1189. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1190. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xff<<4|0x7<<1|0x1<<0)); }
  1191. #endif /* __cplusplus */
  1192. };
  1193. struct AntialiasMode {
  1194. #if BIG_ENDIAN == 1
  1195. unsigned32 :29;
  1196. unsigned32 ScaleColor :1;
  1197. unsigned32 ColorMode :1;
  1198. unsigned32 Enable :1;
  1199. #else
  1200. unsigned32 Enable :1;
  1201. unsigned32 ColorMode :1;
  1202. unsigned32 ScaleColor :1;
  1203. unsigned32 :29;
  1204. #endif
  1205. #ifdef __cplusplus
  1206. AntialiasMode(void) { }
  1207. AntialiasMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1208. AntialiasMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1209. AntialiasMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1210. AntialiasMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1211. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1212. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<2|0x1<<1|0x1<<0)); }
  1213. #endif /* __cplusplus */
  1214. };
  1215. struct GlintAlphaBlendMode {
  1216. #if BIG_ENDIAN == 1
  1217. unsigned32 :14;
  1218. unsigned32 AlphaConversion :1;
  1219. unsigned32 ColorConversion :1;
  1220. unsigned32 AlphaDestination :1;
  1221. unsigned32 AlphaType :1;
  1222. unsigned32 ColorOrder :1;
  1223. unsigned32 NoAlphaBuffer :1;
  1224. unsigned32 ColorFormat :4;
  1225. unsigned32 DestinationBlend :3;
  1226. unsigned32 SourceBlend :4;
  1227. unsigned32 Enable :1;
  1228. #else
  1229. unsigned32 Enable :1;
  1230. unsigned32 SourceBlend :4;
  1231. unsigned32 DestinationBlend :3;
  1232. unsigned32 ColorFormat :4;
  1233. unsigned32 NoAlphaBuffer :1;
  1234. unsigned32 ColorOrder :1;
  1235. unsigned32 AlphaType :1;
  1236. unsigned32 AlphaDestination :1;
  1237. unsigned32 ColorConversion :1;
  1238. unsigned32 AlphaConversion :1;
  1239. unsigned32 :14;
  1240. #endif
  1241. #ifdef __cplusplus
  1242. GlintAlphaBlendMode(void) { }
  1243. GlintAlphaBlendMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1244. GlintAlphaBlendMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1245. GlintAlphaBlendMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1246. GlintAlphaBlendMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1247. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1248. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<17|0x1<<16|0x1<<15|0x1<<14|0x1<<13|0x1<<12|0xf<<8|0x7<<5|0xf<<1|0x1<<0)); }
  1249. #endif /* __cplusplus */
  1250. };
  1251. struct PermediaAlphaBlendMode {
  1252. #if BIG_ENDIAN == 1
  1253. unsigned32 :13;
  1254. unsigned32 AlphaConversion :1;
  1255. unsigned32 ColorConversion :1;
  1256. unsigned32 ColorFormatExtension :1;
  1257. unsigned32 :1;
  1258. unsigned32 BlendType :1;
  1259. unsigned32 ColorOrder :1;
  1260. unsigned32 NoAlphaBuffer :1;
  1261. unsigned32 ColorFormat :4;
  1262. unsigned32 Operation :7;
  1263. unsigned32 Enable :1;
  1264. #else
  1265. unsigned32 Enable :1;
  1266. unsigned32 Operation :7;
  1267. unsigned32 ColorFormat :4;
  1268. unsigned32 NoAlphaBuffer :1;
  1269. unsigned32 ColorOrder :1;
  1270. unsigned32 BlendType :1;
  1271. unsigned32 :1;
  1272. unsigned32 ColorFormatExtension :1;
  1273. unsigned32 ColorConversion :1;
  1274. unsigned32 AlphaConversion :1;
  1275. unsigned32 :13;
  1276. #endif
  1277. #ifdef __cplusplus
  1278. PermediaAlphaBlendMode(void) { }
  1279. PermediaAlphaBlendMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1280. PermediaAlphaBlendMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1281. PermediaAlphaBlendMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1282. PermediaAlphaBlendMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1283. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1284. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<18|0x1<<17|0x1<<16|0x1<<14|0x1<<13|0x1<<12|0xf<<8|0x7f<<1|0x1<<0)); }
  1285. #endif /* __cplusplus */
  1286. };
  1287. struct DitherMode {
  1288. #if BIG_ENDIAN == 1
  1289. unsigned32 :15;
  1290. unsigned32 RoundingMode :2;
  1291. unsigned32 AlphaDither :1;
  1292. unsigned32 :3;
  1293. unsigned32 ColorOrder :1;
  1294. unsigned32 Yoffset :2;
  1295. unsigned32 Xoffset :2;
  1296. unsigned32 ColorFormat :4;
  1297. unsigned32 DitherEnable :1;
  1298. unsigned32 Enable :1;
  1299. #else
  1300. unsigned32 Enable :1;
  1301. unsigned32 DitherEnable :1;
  1302. unsigned32 ColorFormat :4;
  1303. unsigned32 Xoffset :2;
  1304. unsigned32 Yoffset :2;
  1305. unsigned32 ColorOrder :1;
  1306. unsigned32 :3;
  1307. unsigned32 AlphaDither :1;
  1308. unsigned32 RoundingMode :2;
  1309. unsigned32 :15;
  1310. #endif
  1311. #ifdef __cplusplus
  1312. DitherMode(void) { }
  1313. DitherMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1314. DitherMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1315. DitherMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1316. DitherMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1317. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1318. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<15|0x1<<14|0x1<<10|0x3<<8|0x3<<6|0xf<<2|0x1<<1|0x1<<0)); }
  1319. #endif /* __cplusplus */
  1320. };
  1321. struct LogicalOpMode {
  1322. #if BIG_ENDIAN == 1
  1323. unsigned32 :19;
  1324. unsigned32 OpaqueSpan :1;
  1325. unsigned32 UseConstantSource :1;
  1326. unsigned32 BackgroundLogicalOp :4;
  1327. unsigned32 BackgroundEnable :1;
  1328. unsigned32 UseConstantFBWriteData :1;
  1329. unsigned32 LogicOp :4;
  1330. unsigned32 Enable :1;
  1331. #else
  1332. unsigned32 Enable :1;
  1333. unsigned32 LogicOp :4;
  1334. unsigned32 UseConstantFBWriteData :1;
  1335. unsigned32 BackgroundEnable :1;
  1336. unsigned32 BackgroundLogicalOp :4;
  1337. unsigned32 UseConstantSource :1;
  1338. unsigned32 OpaqueSpan :1;
  1339. unsigned32 :19;
  1340. #endif
  1341. #ifdef __cplusplus
  1342. LogicalOpMode(void) { }
  1343. LogicalOpMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1344. LogicalOpMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1345. LogicalOpMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1346. LogicalOpMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1347. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1348. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<12|0x1<<11|0xf<<7|0x1<<6|0x1<<5|0xf<<1|0x1<<0)); }
  1349. #endif /* __cplusplus */
  1350. };
  1351. struct RouterMode {
  1352. #if BIG_ENDIAN == 1
  1353. unsigned32 :31;
  1354. unsigned32 Order :1;
  1355. #else
  1356. unsigned32 Order :1;
  1357. unsigned32 :31;
  1358. #endif
  1359. #ifdef __cplusplus
  1360. RouterMode(void) { }
  1361. RouterMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1362. RouterMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1363. RouterMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1364. RouterMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1365. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1366. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<0)); }
  1367. #endif /* __cplusplus */
  1368. };
  1369. struct LBReadMode {
  1370. #if BIG_ENDIAN == 1
  1371. unsigned32 :4;
  1372. unsigned32 PP3 :3;
  1373. unsigned32 PatchCode :3;
  1374. unsigned32 ScanlineInterval :2;
  1375. unsigned32 Patch :1;
  1376. unsigned32 WindowOrigin :1;
  1377. unsigned32 DataType :2;
  1378. unsigned32 :5;
  1379. unsigned32 ReadDestinationEnable :1;
  1380. unsigned32 ReadSourceEnable :1;
  1381. unsigned32 PP2 :3;
  1382. unsigned32 PP1 :3;
  1383. unsigned32 PP0 :3;
  1384. #else
  1385. unsigned32 PP0 :3;
  1386. unsigned32 PP1 :3;
  1387. unsigned32 PP2 :3;
  1388. unsigned32 ReadSourceEnable :1;
  1389. unsigned32 ReadDestinationEnable :1;
  1390. unsigned32 :5;
  1391. unsigned32 DataType :2;
  1392. unsigned32 WindowOrigin :1;
  1393. unsigned32 Patch :1;
  1394. unsigned32 ScanlineInterval :2;
  1395. unsigned32 PatchCode :3;
  1396. unsigned32 PP3 :3;
  1397. unsigned32 :4;
  1398. #endif
  1399. #ifdef __cplusplus
  1400. LBReadMode(void) { }
  1401. LBReadMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1402. LBReadMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1403. LBReadMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1404. LBReadMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1405. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1406. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x7<<25|0x7<<22|0x3<<20|0x1<<19|0x1<<18|0x3<<16|0x1<<10|0x1<<9|0x7<<6|0x7<<3|0x7<<0)); }
  1407. #endif /* __cplusplus */
  1408. };
  1409. struct GlintPermediaLBReadFormat {
  1410. #if BIG_ENDIAN == 1
  1411. unsigned32 :14;
  1412. unsigned32 Compact32 :1;
  1413. unsigned32 GIDPosition :4;
  1414. unsigned32 GIDWidth :1;
  1415. unsigned32 FrameCountPosition :3;
  1416. unsigned32 FrameCountWidth :2;
  1417. unsigned32 StencilPosition :3;
  1418. unsigned32 StencilWidth :2;
  1419. unsigned32 DepthWidth :2;
  1420. #else
  1421. unsigned32 DepthWidth :2;
  1422. unsigned32 StencilWidth :2;
  1423. unsigned32 StencilPosition :3;
  1424. unsigned32 FrameCountWidth :2;
  1425. unsigned32 FrameCountPosition :3;
  1426. unsigned32 GIDWidth :1;
  1427. unsigned32 GIDPosition :4;
  1428. unsigned32 Compact32 :1;
  1429. unsigned32 :14;
  1430. #endif
  1431. #ifdef __cplusplus
  1432. GlintPermediaLBReadFormat(void) { }
  1433. GlintPermediaLBReadFormat(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1434. GlintPermediaLBReadFormat& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1435. GlintPermediaLBReadFormat& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1436. GlintPermediaLBReadFormat& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1437. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1438. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<17|0xf<<13|0x1<<12|0x7<<9|0x3<<7|0x7<<4|0x3<<2|0x3<<0)); }
  1439. #endif /* __cplusplus */
  1440. };
  1441. struct LBReadFormat {
  1442. #if BIG_ENDIAN == 1
  1443. unsigned32 :4;
  1444. unsigned32 GIDPosition :5;
  1445. unsigned32 GIDWidth :3;
  1446. unsigned32 FCPPosition :5;
  1447. unsigned32 FCPWidth :4;
  1448. unsigned32 StencilPosition :5;
  1449. unsigned32 StencilWidth :4;
  1450. unsigned32 DepthWidth :2;
  1451. #else
  1452. unsigned32 DepthWidth :2;
  1453. unsigned32 StencilWidth :4;
  1454. unsigned32 StencilPosition :5;
  1455. unsigned32 FCPWidth :4;
  1456. unsigned32 FCPPosition :5;
  1457. unsigned32 GIDWidth :3;
  1458. unsigned32 GIDPosition :5;
  1459. unsigned32 :4;
  1460. #endif
  1461. #ifdef __cplusplus
  1462. LBReadFormat(void) { }
  1463. LBReadFormat(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1464. LBReadFormat& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1465. LBReadFormat& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1466. LBReadFormat& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1467. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1468. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1f<<23|0x7<<20|0x1f<<15|0xf<<11|0x1f<<6|0xf<<2|0x3<<0)); }
  1469. #endif /* __cplusplus */
  1470. };
  1471. struct LBSourceOffset {
  1472. #if BIG_ENDIAN == 1
  1473. unsigned32 :8;
  1474. unsigned32 Offset :24;
  1475. #else
  1476. unsigned32 Offset :24;
  1477. unsigned32 :8;
  1478. #endif
  1479. #ifdef __cplusplus
  1480. LBSourceOffset(void) { }
  1481. LBSourceOffset(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1482. LBSourceOffset& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1483. LBSourceOffset& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1484. LBSourceOffset& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1485. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1486. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xffffff<<0)); }
  1487. #endif /* __cplusplus */
  1488. };
  1489. struct LBWindowBase {
  1490. #if BIG_ENDIAN == 1
  1491. unsigned32 :8;
  1492. unsigned32 Base :24;
  1493. #else
  1494. unsigned32 Base :24;
  1495. unsigned32 :8;
  1496. #endif
  1497. #ifdef __cplusplus
  1498. LBWindowBase(void) { }
  1499. LBWindowBase(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1500. LBWindowBase& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1501. LBWindowBase& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1502. LBWindowBase& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1503. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1504. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xffffff<<0)); }
  1505. #endif /* __cplusplus */
  1506. };
  1507. struct P2MXLBWriteMode {
  1508. #if BIG_ENDIAN == 1
  1509. unsigned32 :29;
  1510. unsigned32 UpLoadData :2;
  1511. unsigned32 WriteEnable :1;
  1512. #else
  1513. unsigned32 WriteEnable :1;
  1514. unsigned32 UpLoadData :2;
  1515. unsigned32 :29;
  1516. #endif
  1517. #ifdef __cplusplus
  1518. P2MXLBWriteMode(void) { }
  1519. P2MXLBWriteMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1520. P2MXLBWriteMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1521. P2MXLBWriteMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1522. P2MXLBWriteMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1523. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1524. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<1|0x1<<0)); }
  1525. #endif /* __cplusplus */
  1526. };
  1527. struct LBWriteMode {
  1528. #if BIG_ENDIAN == 1
  1529. unsigned32 Operation :3;
  1530. unsigned32 ByteEnables :5;
  1531. unsigned32 Width :12;
  1532. unsigned32 Packed16 :1;
  1533. unsigned32 Origin :1;
  1534. unsigned32 Layout :1;
  1535. unsigned32 StripeHeight :3;
  1536. unsigned32 StripePitch :3;
  1537. unsigned32 :2;
  1538. unsigned32 WriteEnable :1;
  1539. #else
  1540. unsigned32 WriteEnable :1;
  1541. unsigned32 :2;
  1542. unsigned32 StripePitch :3;
  1543. unsigned32 StripeHeight :3;
  1544. unsigned32 Layout :1;
  1545. unsigned32 Origin :1;
  1546. unsigned32 Packed16 :1;
  1547. unsigned32 Width :12;
  1548. unsigned32 ByteEnables :5;
  1549. unsigned32 Operation :3;
  1550. #endif
  1551. #ifdef __cplusplus
  1552. LBWriteMode(void) { }
  1553. LBWriteMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1554. LBWriteMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1555. LBWriteMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1556. LBWriteMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1557. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1558. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x7<<29|0x1f<<24|0xfff<<12|0x1<<11|0x1<<10|0x1<<9|0x7<<6|0x7<<3|0x1<<0)); }
  1559. #endif /* __cplusplus */
  1560. };
  1561. struct LBWriteFormat {
  1562. #if BIG_ENDIAN == 1
  1563. unsigned32 :4;
  1564. unsigned32 GIDPosition :5;
  1565. unsigned32 GIDWidth :3;
  1566. unsigned32 FCPPosition :5;
  1567. unsigned32 FCPWidth :4;
  1568. unsigned32 StencilPosition :5;
  1569. unsigned32 StencilWidth :4;
  1570. unsigned32 DepthWidth :2;
  1571. #else
  1572. unsigned32 DepthWidth :2;
  1573. unsigned32 StencilWidth :4;
  1574. unsigned32 StencilPosition :5;
  1575. unsigned32 FCPWidth :4;
  1576. unsigned32 FCPPosition :5;
  1577. unsigned32 GIDWidth :3;
  1578. unsigned32 GIDPosition :5;
  1579. unsigned32 :4;
  1580. #endif
  1581. #ifdef __cplusplus
  1582. LBWriteFormat(void) { }
  1583. LBWriteFormat(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1584. LBWriteFormat& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1585. LBWriteFormat& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1586. LBWriteFormat& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1587. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1588. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1f<<23|0x7<<20|0x1f<<15|0xf<<11|0x1f<<6|0xf<<2|0x3<<0)); }
  1589. #endif /* __cplusplus */
  1590. };
  1591. struct HostInState2 {
  1592. #if BIG_ENDIAN == 1
  1593. unsigned32 :27;
  1594. unsigned32 TagCount :5;
  1595. #else
  1596. unsigned32 TagCount :5;
  1597. unsigned32 :27;
  1598. #endif
  1599. #ifdef __cplusplus
  1600. HostInState2(void) { }
  1601. HostInState2(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1602. HostInState2& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1603. HostInState2& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1604. HostInState2& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1605. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1606. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1f<<0)); }
  1607. #endif /* __cplusplus */
  1608. };
  1609. struct VertexRename {
  1610. #if BIG_ENDIAN == 1
  1611. unsigned32 :29;
  1612. unsigned32 Rename :3;
  1613. #else
  1614. unsigned32 Rename :3;
  1615. unsigned32 :29;
  1616. #endif
  1617. #ifdef __cplusplus
  1618. VertexRename(void) { }
  1619. VertexRename(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1620. VertexRename& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1621. VertexRename& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1622. VertexRename& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1623. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1624. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x7<<0)); }
  1625. #endif /* __cplusplus */
  1626. };
  1627. struct Window {
  1628. #if BIG_ENDIAN == 1
  1629. unsigned32 :12;
  1630. unsigned32 OverrideWriteFiltering :1;
  1631. unsigned32 DepthFCP :1;
  1632. unsigned32 StencilFCP :1;
  1633. unsigned32 FrameCount :8;
  1634. unsigned32 GID :4;
  1635. unsigned32 LBUpdateSource :1;
  1636. unsigned32 ForceLBUpdate :1;
  1637. unsigned32 CompareMode :2;
  1638. unsigned32 Enable :1;
  1639. #else
  1640. unsigned32 Enable :1;
  1641. unsigned32 CompareMode :2;
  1642. unsigned32 ForceLBUpdate :1;
  1643. unsigned32 LBUpdateSource :1;
  1644. unsigned32 GID :4;
  1645. unsigned32 FrameCount :8;
  1646. unsigned32 StencilFCP :1;
  1647. unsigned32 DepthFCP :1;
  1648. unsigned32 OverrideWriteFiltering :1;
  1649. unsigned32 :12;
  1650. #endif
  1651. #ifdef __cplusplus
  1652. Window(void) { }
  1653. Window(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1654. Window& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1655. Window& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1656. Window& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1657. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1658. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<19|0x1<<18|0x1<<17|0xff<<9|0xf<<5|0x1<<4|0x1<<3|0x3<<1|0x1<<0)); }
  1659. #endif /* __cplusplus */
  1660. };
  1661. struct StencilMode {
  1662. #if BIG_ENDIAN == 1
  1663. unsigned32 :13;
  1664. unsigned32 StencilWidth :4;
  1665. unsigned32 StencilSource :2;
  1666. unsigned32 CompareFunction :3;
  1667. unsigned32 SFail :3;
  1668. unsigned32 DPFail :3;
  1669. unsigned32 DPPass :3;
  1670. unsigned32 Enable :1;
  1671. #else
  1672. unsigned32 Enable :1;
  1673. unsigned32 DPPass :3;
  1674. unsigned32 DPFail :3;
  1675. unsigned32 SFail :3;
  1676. unsigned32 CompareFunction :3;
  1677. unsigned32 StencilSource :2;
  1678. unsigned32 StencilWidth :4;
  1679. unsigned32 :13;
  1680. #endif
  1681. #ifdef __cplusplus
  1682. StencilMode(void) { }
  1683. StencilMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1684. StencilMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1685. StencilMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1686. StencilMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1687. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1688. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xf<<15|0x3<<13|0x7<<10|0x7<<7|0x7<<4|0x7<<1|0x1<<0)); }
  1689. #endif /* __cplusplus */
  1690. };
  1691. struct StencilData {
  1692. #if BIG_ENDIAN == 1
  1693. unsigned32 FCStencil :8;
  1694. unsigned32 StencilWriteMask :8;
  1695. unsigned32 CompareMask :8;
  1696. unsigned32 ReferenceValue :8;
  1697. #else
  1698. unsigned32 ReferenceValue :8;
  1699. unsigned32 CompareMask :8;
  1700. unsigned32 StencilWriteMask :8;
  1701. unsigned32 FCStencil :8;
  1702. #endif
  1703. #ifdef __cplusplus
  1704. StencilData(void) { }
  1705. StencilData(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1706. StencilData& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1707. StencilData& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1708. StencilData& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1709. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1710. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xff<<24|0xff<<16|0xff<<8|0xff<<0)); }
  1711. #endif /* __cplusplus */
  1712. };
  1713. struct Stencil {
  1714. #if BIG_ENDIAN == 1
  1715. unsigned32 :24;
  1716. unsigned32 StencilValue :8;
  1717. #else
  1718. unsigned32 StencilValue :8;
  1719. unsigned32 :24;
  1720. #endif
  1721. #ifdef __cplusplus
  1722. Stencil(void) { }
  1723. Stencil(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1724. Stencil& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1725. Stencil& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1726. Stencil& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1727. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1728. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xff<<0)); }
  1729. #endif /* __cplusplus */
  1730. };
  1731. struct DepthMode {
  1732. #if BIG_ENDIAN == 1
  1733. unsigned32 :17;
  1734. unsigned32 ExponentWidth :2;
  1735. unsigned32 ExponentScale :2;
  1736. unsigned32 NonLinearZ :1;
  1737. unsigned32 Normalise :1;
  1738. unsigned32 Width :2;
  1739. unsigned32 CompareMode :3;
  1740. unsigned32 NewDepthSource :2;
  1741. unsigned32 WriteMask :1;
  1742. unsigned32 Enable :1;
  1743. #else
  1744. unsigned32 Enable :1;
  1745. unsigned32 WriteMask :1;
  1746. unsigned32 NewDepthSource :2;
  1747. unsigned32 CompareMode :3;
  1748. unsigned32 Width :2;
  1749. unsigned32 Normalise :1;
  1750. unsigned32 NonLinearZ :1;
  1751. unsigned32 ExponentScale :2;
  1752. unsigned32 ExponentWidth :2;
  1753. unsigned32 :17;
  1754. #endif
  1755. #ifdef __cplusplus
  1756. DepthMode(void) { }
  1757. DepthMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1758. DepthMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1759. DepthMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1760. DepthMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1761. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1762. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<13|0x3<<11|0x1<<10|0x1<<9|0x3<<7|0x7<<4|0x3<<2|0x1<<1|0x1<<0)); }
  1763. #endif /* __cplusplus */
  1764. };
  1765. struct GlintFBReadMode {
  1766. #if BIG_ENDIAN == 1
  1767. unsigned32 :2;
  1768. unsigned32 SourceAddressFunction :2;
  1769. unsigned32 PP3 :3;
  1770. unsigned32 ScanlineInterval :2;
  1771. unsigned32 :6;
  1772. unsigned32 WindowOrigin :1;
  1773. unsigned32 DataType :1;
  1774. unsigned32 :4;
  1775. unsigned32 ReadDestinationEnable :1;
  1776. unsigned32 ReadSourceEnable :1;
  1777. unsigned32 PP2 :3;
  1778. unsigned32 PP1 :3;
  1779. unsigned32 PP0 :3;
  1780. #else
  1781. unsigned32 PP0 :3;
  1782. unsigned32 PP1 :3;
  1783. unsigned32 PP2 :3;
  1784. unsigned32 ReadSourceEnable :1;
  1785. unsigned32 ReadDestinationEnable :1;
  1786. unsigned32 :4;
  1787. unsigned32 DataType :1;
  1788. unsigned32 WindowOrigin :1;
  1789. unsigned32 :6;
  1790. unsigned32 ScanlineInterval :2;
  1791. unsigned32 PP3 :3;
  1792. unsigned32 SourceAddressFunction :2;
  1793. unsigned32 :2;
  1794. #endif
  1795. #ifdef __cplusplus
  1796. GlintFBReadMode(void) { }
  1797. GlintFBReadMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1798. GlintFBReadMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1799. GlintFBReadMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1800. GlintFBReadMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1801. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1802. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<28|0x7<<25|0x3<<23|0x1<<16|0x1<<15|0x1<<10|0x1<<9|0x7<<6|0x7<<3|0x7<<0)); }
  1803. #endif /* __cplusplus */
  1804. };
  1805. struct PermediaFBReadMode {
  1806. #if BIG_ENDIAN == 1
  1807. unsigned32 :5;
  1808. unsigned32 PatchMode :2;
  1809. unsigned32 :2;
  1810. unsigned32 RelativeOffset :3;
  1811. unsigned32 PackedData :1;
  1812. unsigned32 PatchEnable :1;
  1813. unsigned32 :1;
  1814. unsigned32 WindowOrigin :1;
  1815. unsigned32 DataType :1;
  1816. unsigned32 :4;
  1817. unsigned32 ReadDestinationEnable :1;
  1818. unsigned32 ReadSourceEnable :1;
  1819. unsigned32 PP2 :3;
  1820. unsigned32 PP1 :3;
  1821. unsigned32 PP0 :3;
  1822. #else
  1823. unsigned32 PP0 :3;
  1824. unsigned32 PP1 :3;
  1825. unsigned32 PP2 :3;
  1826. unsigned32 ReadSourceEnable :1;
  1827. unsigned32 ReadDestinationEnable :1;
  1828. unsigned32 :4;
  1829. unsigned32 DataType :1;
  1830. unsigned32 WindowOrigin :1;
  1831. unsigned32 :1;
  1832. unsigned32 PatchEnable :1;
  1833. unsigned32 PackedData :1;
  1834. unsigned32 RelativeOffset :3;
  1835. unsigned32 :2;
  1836. unsigned32 PatchMode :2;
  1837. unsigned32 :5;
  1838. #endif
  1839. #ifdef __cplusplus
  1840. PermediaFBReadMode(void) { }
  1841. PermediaFBReadMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1842. PermediaFBReadMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1843. PermediaFBReadMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1844. PermediaFBReadMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1845. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1846. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<25|0x7<<20|0x1<<19|0x1<<18|0x1<<16|0x1<<15|0x1<<10|0x1<<9|0x7<<6|0x7<<3|0x7<<0)); }
  1847. #endif /* __cplusplus */
  1848. };
  1849. struct FBSourceOffset {
  1850. #if BIG_ENDIAN == 1
  1851. unsigned32 :8;
  1852. unsigned32 Offset :24;
  1853. #else
  1854. unsigned32 Offset :24;
  1855. unsigned32 :8;
  1856. #endif
  1857. #ifdef __cplusplus
  1858. FBSourceOffset(void) { }
  1859. FBSourceOffset(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1860. FBSourceOffset& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1861. FBSourceOffset& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1862. FBSourceOffset& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1863. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1864. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xffffff<<0)); }
  1865. #endif /* __cplusplus */
  1866. };
  1867. struct FBPixelOffset {
  1868. #if BIG_ENDIAN == 1
  1869. unsigned32 :8;
  1870. unsigned32 Offset :24;
  1871. #else
  1872. unsigned32 Offset :24;
  1873. unsigned32 :8;
  1874. #endif
  1875. #ifdef __cplusplus
  1876. FBPixelOffset(void) { }
  1877. FBPixelOffset(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1878. FBPixelOffset& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1879. FBPixelOffset& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1880. FBPixelOffset& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1881. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1882. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xffffff<<0)); }
  1883. #endif /* __cplusplus */
  1884. };
  1885. struct FBWindowBase {
  1886. #if BIG_ENDIAN == 1
  1887. unsigned32 :8;
  1888. unsigned32 Address :24;
  1889. #else
  1890. unsigned32 Address :24;
  1891. unsigned32 :8;
  1892. #endif
  1893. #ifdef __cplusplus
  1894. FBWindowBase(void) { }
  1895. FBWindowBase(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1896. FBWindowBase& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1897. FBWindowBase& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1898. FBWindowBase& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1899. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1900. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xffffff<<0)); }
  1901. #endif /* __cplusplus */
  1902. };
  1903. struct FBWriteMode {
  1904. #if BIG_ENDIAN == 1
  1905. unsigned32 :4;
  1906. unsigned32 Origin3 :1;
  1907. unsigned32 Origin2 :1;
  1908. unsigned32 Origin1 :1;
  1909. unsigned32 Origin0 :1;
  1910. unsigned32 Layout3 :2;
  1911. unsigned32 Layout2 :2;
  1912. unsigned32 Layout1 :2;
  1913. unsigned32 Layout0 :2;
  1914. unsigned32 Enable3 :1;
  1915. unsigned32 Enable2 :1;
  1916. unsigned32 Enable1 :1;
  1917. unsigned32 Enable0 :1;
  1918. unsigned32 StripeHeight :3;
  1919. unsigned32 StripePitch :3;
  1920. unsigned32 OpaqueSpan :1;
  1921. unsigned32 Replicate :1;
  1922. unsigned32 UpLoadData :1;
  1923. unsigned32 :2;
  1924. unsigned32 WriteEnable :1;
  1925. #else
  1926. unsigned32 WriteEnable :1;
  1927. unsigned32 :2;
  1928. unsigned32 UpLoadData :1;
  1929. unsigned32 Replicate :1;
  1930. unsigned32 OpaqueSpan :1;
  1931. unsigned32 StripePitch :3;
  1932. unsigned32 StripeHeight :3;
  1933. unsigned32 Enable0 :1;
  1934. unsigned32 Enable1 :1;
  1935. unsigned32 Enable2 :1;
  1936. unsigned32 Enable3 :1;
  1937. unsigned32 Layout0 :2;
  1938. unsigned32 Layout1 :2;
  1939. unsigned32 Layout2 :2;
  1940. unsigned32 Layout3 :2;
  1941. unsigned32 Origin0 :1;
  1942. unsigned32 Origin1 :1;
  1943. unsigned32 Origin2 :1;
  1944. unsigned32 Origin3 :1;
  1945. unsigned32 :4;
  1946. #endif
  1947. #ifdef __cplusplus
  1948. FBWriteMode(void) { }
  1949. FBWriteMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1950. FBWriteMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1951. FBWriteMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1952. FBWriteMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1953. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1954. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<27|0x1<<26|0x1<<25|0x1<<24|0x3<<22|0x3<<20|0x3<<18|0x3<<16|0x1<<15|0x1<<14|0x1<<13|0x1<<12|0x7<<9|0x7<<6|0x1<<5|0x1<<4|0x1<<3|0x1<<0)); }
  1955. #endif /* __cplusplus */
  1956. };
  1957. struct FBReadPixel {
  1958. #if BIG_ENDIAN == 1
  1959. unsigned32 :29;
  1960. unsigned32 PixelSize :3;
  1961. #else
  1962. unsigned32 PixelSize :3;
  1963. unsigned32 :29;
  1964. #endif
  1965. #ifdef __cplusplus
  1966. FBReadPixel(void) { }
  1967. FBReadPixel(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1968. FBReadPixel& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1969. FBReadPixel& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1970. FBReadPixel& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1971. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1972. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x7<<0)); }
  1973. #endif /* __cplusplus */
  1974. };
  1975. struct PatternRAMMode {
  1976. #if BIG_ENDIAN == 1
  1977. unsigned32 :18;
  1978. unsigned32 XMask :5;
  1979. unsigned32 YShift :3;
  1980. unsigned32 YMask :5;
  1981. unsigned32 Enable :1;
  1982. #else
  1983. unsigned32 Enable :1;
  1984. unsigned32 YMask :5;
  1985. unsigned32 YShift :3;
  1986. unsigned32 XMask :5;
  1987. unsigned32 :18;
  1988. #endif
  1989. #ifdef __cplusplus
  1990. PatternRAMMode(void) { }
  1991. PatternRAMMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  1992. PatternRAMMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  1993. PatternRAMMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  1994. PatternRAMMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  1995. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  1996. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1f<<9|0x7<<6|0x1f<<1|0x1<<0)); }
  1997. #endif /* __cplusplus */
  1998. };
  1999. struct FilterMode {
  2000. #if BIG_ENDIAN == 1
  2001. unsigned32 :10;
  2002. unsigned32 ExternalDMAController :1;
  2003. unsigned32 RunLengthEncodeData :1;
  2004. unsigned32 Context :2;
  2005. unsigned32 ByteSwap :2;
  2006. unsigned32 Remainder :2;
  2007. unsigned32 Statistics :2;
  2008. unsigned32 Sync :2;
  2009. unsigned32 FBColor :2;
  2010. unsigned32 Stencil :2;
  2011. unsigned32 LBDepth :2;
  2012. unsigned32 Passive :2;
  2013. unsigned32 Active :2;
  2014. #else
  2015. unsigned32 Active :2;
  2016. unsigned32 Passive :2;
  2017. unsigned32 LBDepth :2;
  2018. unsigned32 Stencil :2;
  2019. unsigned32 FBColor :2;
  2020. unsigned32 Sync :2;
  2021. unsigned32 Statistics :2;
  2022. unsigned32 Remainder :2;
  2023. unsigned32 ByteSwap :2;
  2024. unsigned32 Context :2;
  2025. unsigned32 RunLengthEncodeData :1;
  2026. unsigned32 ExternalDMAController :1;
  2027. unsigned32 :10;
  2028. #endif
  2029. #ifdef __cplusplus
  2030. FilterMode(void) { }
  2031. FilterMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2032. FilterMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2033. FilterMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2034. FilterMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2035. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2036. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<21|0x1<<20|0x3<<18|0x3<<16|0x3<<14|0x3<<12|0x3<<10|0x3<<8|0x3<<6|0x3<<4|0x3<<2|0x3<<0)); }
  2037. #endif /* __cplusplus */
  2038. };
  2039. struct StatisticMode {
  2040. #if BIG_ENDIAN == 1
  2041. unsigned32 :26;
  2042. unsigned32 Spans :1;
  2043. unsigned32 CompareFunction :1;
  2044. unsigned32 PassiveSteps :1;
  2045. unsigned32 ActiveSteps :1;
  2046. unsigned32 StatsType :1;
  2047. unsigned32 Enable :1;
  2048. #else
  2049. unsigned32 Enable :1;
  2050. unsigned32 StatsType :1;
  2051. unsigned32 ActiveSteps :1;
  2052. unsigned32 PassiveSteps :1;
  2053. unsigned32 CompareFunction :1;
  2054. unsigned32 Spans :1;
  2055. unsigned32 :26;
  2056. #endif
  2057. #ifdef __cplusplus
  2058. StatisticMode(void) { }
  2059. StatisticMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2060. StatisticMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2061. StatisticMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2062. StatisticMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2063. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2064. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<5|0x1<<4|0x1<<3|0x1<<2|0x1<<1|0x1<<0)); }
  2065. #endif /* __cplusplus */
  2066. };
  2067. struct PickResult {
  2068. #if BIG_ENDIAN == 1
  2069. unsigned32 :31;
  2070. unsigned32 Result :1;
  2071. #else
  2072. unsigned32 Result :1;
  2073. unsigned32 :31;
  2074. #endif
  2075. #ifdef __cplusplus
  2076. PickResult(void) { }
  2077. PickResult(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2078. PickResult& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2079. PickResult& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2080. PickResult& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2081. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2082. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<0)); }
  2083. #endif /* __cplusplus */
  2084. };
  2085. struct ContextMask {
  2086. #if BIG_ENDIAN == 1
  2087. unsigned32 :12;
  2088. unsigned32 MatrixStack :1;
  2089. unsigned32 PipeControl :1;
  2090. unsigned32 MultiTexture :1;
  2091. unsigned32 TextureManagementState :1;
  2092. unsigned32 LUT :1;
  2093. unsigned32 FogTable :1;
  2094. unsigned32 Ownership :1;
  2095. unsigned32 DDA :1;
  2096. unsigned32 RasterizerState :1;
  2097. unsigned32 Select :1;
  2098. unsigned32 DMA :1;
  2099. unsigned32 TwoD :1;
  2100. unsigned32 CurrentState :1;
  2101. unsigned32 RasterPos :1;
  2102. unsigned32 Lights8_15 :1;
  2103. unsigned32 Lights0_7 :1;
  2104. unsigned32 Material :1;
  2105. unsigned32 Matrices :1;
  2106. unsigned32 Geometry :1;
  2107. unsigned32 GeneralControl :1;
  2108. #else
  2109. unsigned32 GeneralControl :1;
  2110. unsigned32 Geometry :1;
  2111. unsigned32 Matrices :1;
  2112. unsigned32 Material :1;
  2113. unsigned32 Lights0_7 :1;
  2114. unsigned32 Lights8_15 :1;
  2115. unsigned32 RasterPos :1;
  2116. unsigned32 CurrentState :1;
  2117. unsigned32 TwoD :1;
  2118. unsigned32 DMA :1;
  2119. unsigned32 Select :1;
  2120. unsigned32 RasterizerState :1;
  2121. unsigned32 DDA :1;
  2122. unsigned32 Ownership :1;
  2123. unsigned32 FogTable :1;
  2124. unsigned32 LUT :1;
  2125. unsigned32 TextureManagementState :1;
  2126. unsigned32 MultiTexture :1;
  2127. unsigned32 PipeControl :1;
  2128. unsigned32 MatrixStack :1;
  2129. unsigned32 :12;
  2130. #endif
  2131. #ifdef __cplusplus
  2132. ContextMask(void) { }
  2133. ContextMask(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2134. ContextMask& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2135. ContextMask& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2136. ContextMask& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2137. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2138. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<19|0x1<<18|0x1<<17|0x1<<16|0x1<<15|0x1<<14|0x1<<13|0x1<<12|0x1<<11|0x1<<10|0x1<<9|0x1<<8|0x1<<7|0x1<<6|0x1<<5|0x1<<4|0x1<<3|0x1<<2|0x1<<1|0x1<<0)); }
  2139. #endif /* __cplusplus */
  2140. };
  2141. struct YUVMode {
  2142. #if BIG_ENDIAN == 1
  2143. unsigned32 :26;
  2144. unsigned32 TexelDisableUpdate :1;
  2145. unsigned32 RejectTexel :1;
  2146. unsigned32 TestData :1;
  2147. unsigned32 TestMode :2;
  2148. unsigned32 Enable :1;
  2149. #else
  2150. unsigned32 Enable :1;
  2151. unsigned32 TestMode :2;
  2152. unsigned32 TestData :1;
  2153. unsigned32 RejectTexel :1;
  2154. unsigned32 TexelDisableUpdate :1;
  2155. unsigned32 :26;
  2156. #endif
  2157. #ifdef __cplusplus
  2158. YUVMode(void) { }
  2159. YUVMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2160. YUVMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2161. YUVMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2162. YUVMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2163. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2164. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<5|0x1<<4|0x1<<3|0x3<<1|0x1<<0)); }
  2165. #endif /* __cplusplus */
  2166. };
  2167. struct GlintChromaTestMode {
  2168. #if BIG_ENDIAN == 1
  2169. unsigned32 :28;
  2170. unsigned32 Sense :1;
  2171. unsigned32 Source :2;
  2172. unsigned32 Enable :1;
  2173. #else
  2174. unsigned32 Enable :1;
  2175. unsigned32 Source :2;
  2176. unsigned32 Sense :1;
  2177. unsigned32 :28;
  2178. #endif
  2179. #ifdef __cplusplus
  2180. GlintChromaTestMode(void) { }
  2181. GlintChromaTestMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2182. GlintChromaTestMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2183. GlintChromaTestMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2184. GlintChromaTestMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2185. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2186. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<3|0x3<<1|0x1<<0)); }
  2187. #endif /* __cplusplus */
  2188. };
  2189. struct ChromaTestMode {
  2190. #if BIG_ENDIAN == 1
  2191. unsigned32 :25;
  2192. unsigned32 FailAction :2;
  2193. unsigned32 PassAction :2;
  2194. unsigned32 Source :2;
  2195. unsigned32 Enable :1;
  2196. #else
  2197. unsigned32 Enable :1;
  2198. unsigned32 Source :2;
  2199. unsigned32 PassAction :2;
  2200. unsigned32 FailAction :2;
  2201. unsigned32 :25;
  2202. #endif
  2203. #ifdef __cplusplus
  2204. ChromaTestMode(void) { }
  2205. ChromaTestMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2206. ChromaTestMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2207. ChromaTestMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2208. ChromaTestMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2209. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2210. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<5|0x3<<3|0x3<<1|0x1<<0)); }
  2211. #endif /* __cplusplus */
  2212. };
  2213. struct SelectRecord {
  2214. #if BIG_ENDIAN == 1
  2215. unsigned32 StackOverflow :1;
  2216. unsigned32 StackUnderflow :1;
  2217. unsigned32 InvalidOperation :1;
  2218. unsigned32 :22;
  2219. unsigned32 Count :7;
  2220. #else
  2221. unsigned32 Count :7;
  2222. unsigned32 :22;
  2223. unsigned32 InvalidOperation :1;
  2224. unsigned32 StackUnderflow :1;
  2225. unsigned32 StackOverflow :1;
  2226. #endif
  2227. #ifdef __cplusplus
  2228. SelectRecord(void) { }
  2229. SelectRecord(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2230. SelectRecord& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2231. SelectRecord& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2232. SelectRecord& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2233. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2234. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<31|0x1<<30|0x1<<29|0x7f<<0)); }
  2235. #endif /* __cplusplus */
  2236. };
  2237. struct GMDeltaMode {
  2238. #if BIG_ENDIAN == 1
  2239. unsigned32 :6;
  2240. unsigned32 EpilogueCount :2;
  2241. unsigned32 EpilogueEnable :1;
  2242. unsigned32 FlatShadingMethod :1;
  2243. unsigned32 ColorSpecular :1;
  2244. unsigned32 ColorDiffuse :1;
  2245. unsigned32 BiasCoordinates :1;
  2246. unsigned32 :3;
  2247. unsigned32 TextureParameterMode :2;
  2248. unsigned32 ClampEnable :1;
  2249. unsigned32 NoDraw :1;
  2250. unsigned32 DiamondExit :1;
  2251. unsigned32 SubPixelCorrectionEnable :1;
  2252. unsigned32 DiffuseTextureEnable :1;
  2253. unsigned32 SpecularTextureEnable :1;
  2254. unsigned32 DepthEnable :1;
  2255. unsigned32 SmoothShadingEnable :1;
  2256. unsigned32 TextureEnable :1;
  2257. unsigned32 FogEnable :1;
  2258. unsigned32 DepthFormat :2;
  2259. unsigned32 TargetChip :2;
  2260. #else
  2261. unsigned32 TargetChip :2;
  2262. unsigned32 DepthFormat :2;
  2263. unsigned32 FogEnable :1;
  2264. unsigned32 TextureEnable :1;
  2265. unsigned32 SmoothShadingEnable :1;
  2266. unsigned32 DepthEnable :1;
  2267. unsigned32 SpecularTextureEnable :1;
  2268. unsigned32 DiffuseTextureEnable :1;
  2269. unsigned32 SubPixelCorrectionEnable :1;
  2270. unsigned32 DiamondExit :1;
  2271. unsigned32 NoDraw :1;
  2272. unsigned32 ClampEnable :1;
  2273. unsigned32 TextureParameterMode :2;
  2274. unsigned32 :3;
  2275. unsigned32 BiasCoordinates :1;
  2276. unsigned32 ColorDiffuse :1;
  2277. unsigned32 ColorSpecular :1;
  2278. unsigned32 FlatShadingMethod :1;
  2279. unsigned32 EpilogueEnable :1;
  2280. unsigned32 EpilogueCount :2;
  2281. unsigned32 :6;
  2282. #endif
  2283. #ifdef __cplusplus
  2284. GMDeltaMode(void) { }
  2285. GMDeltaMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2286. GMDeltaMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2287. GMDeltaMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2288. GMDeltaMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2289. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2290. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<24|0x1<<23|0x1<<22|0x1<<21|0x1<<20|0x1<<19|0x3<<14|0x1<<13|0x1<<12|0x1<<11|0x1<<10|0x1<<9|0x1<<8|0x1<<7|0x1<<6|0x1<<5|0x1<<4|0x3<<2|0x3<<0)); }
  2291. #endif /* __cplusplus */
  2292. };
  2293. struct RXDeltaMode {
  2294. #if BIG_ENDIAN == 1
  2295. unsigned32 :5;
  2296. unsigned32 TextureEnable1 :1;
  2297. unsigned32 :5;
  2298. unsigned32 Texture3DEnable :1;
  2299. unsigned32 BiasCoordinates :1;
  2300. unsigned32 ColorOrder :1;
  2301. unsigned32 BackfaceCull :1;
  2302. unsigned32 FillDirection :1;
  2303. unsigned32 TextureParameterMode :2;
  2304. unsigned32 ClampEnable :1;
  2305. unsigned32 NoDraw :1;
  2306. unsigned32 DiamondExit :1;
  2307. unsigned32 SubPixelCorrectionEnable :1;
  2308. unsigned32 DiffuseTextureEnable :1;
  2309. unsigned32 SpecularTextureEnable :1;
  2310. unsigned32 DepthEnable :1;
  2311. unsigned32 SmoothShadingEnable :1;
  2312. unsigned32 TextureEnable :1;
  2313. unsigned32 FogEnable :1;
  2314. unsigned32 DepthFormat :2;
  2315. unsigned32 :2;
  2316. #else
  2317. unsigned32 :2;
  2318. unsigned32 DepthFormat :2;
  2319. unsigned32 FogEnable :1;
  2320. unsigned32 TextureEnable :1;
  2321. unsigned32 SmoothShadingEnable :1;
  2322. unsigned32 DepthEnable :1;
  2323. unsigned32 SpecularTextureEnable :1;
  2324. unsigned32 DiffuseTextureEnable :1;
  2325. unsigned32 SubPixelCorrectionEnable :1;
  2326. unsigned32 DiamondExit :1;
  2327. unsigned32 NoDraw :1;
  2328. unsigned32 ClampEnable :1;
  2329. unsigned32 TextureParameterMode :2;
  2330. unsigned32 FillDirection :1;
  2331. unsigned32 BackfaceCull :1;
  2332. unsigned32 ColorOrder :1;
  2333. unsigned32 BiasCoordinates :1;
  2334. unsigned32 Texture3DEnable :1;
  2335. unsigned32 :5;
  2336. unsigned32 TextureEnable1 :1;
  2337. unsigned32 :5;
  2338. #endif
  2339. #ifdef __cplusplus
  2340. RXDeltaMode(void) { }
  2341. RXDeltaMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2342. RXDeltaMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2343. RXDeltaMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2344. RXDeltaMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2345. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2346. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<26|0x1<<20|0x1<<19|0x1<<18|0x1<<17|0x1<<16|0x3<<14|0x1<<13|0x1<<12|0x1<<11|0x1<<10|0x1<<9|0x1<<8|0x1<<7|0x1<<6|0x1<<5|0x1<<4|0x3<<2)); }
  2347. #endif /* __cplusplus */
  2348. };
  2349. struct P3DeltaMode {
  2350. #if BIG_ENDIAN == 1
  2351. unsigned32 :2;
  2352. unsigned32 Texture3DEnable :1;
  2353. unsigned32 :1;
  2354. unsigned32 :1;
  2355. unsigned32 TextureEnable1 :1;
  2356. unsigned32 :6;
  2357. unsigned32 BiasCoordinates :1;
  2358. unsigned32 ColorOrder :1;
  2359. unsigned32 BackfaceCull :1;
  2360. unsigned32 FillDirection :1;
  2361. unsigned32 TextureParameterMode :2;
  2362. unsigned32 ClampEnable :1;
  2363. unsigned32 NoDraw :1;
  2364. unsigned32 DiamondExit :1;
  2365. unsigned32 SubPixelCorrectionEnable :1;
  2366. unsigned32 DiffuseTextureEnable :1;
  2367. unsigned32 SpecularTextureEnable :1;
  2368. unsigned32 DepthEnable :1;
  2369. unsigned32 SmoothShadingEnable :1;
  2370. unsigned32 TextureEnable :1;
  2371. unsigned32 FogEnable :1;
  2372. unsigned32 DepthFormat :2;
  2373. unsigned32 TargetChip :2;
  2374. #else
  2375. unsigned32 TargetChip :2;
  2376. unsigned32 DepthFormat :2;
  2377. unsigned32 FogEnable :1;
  2378. unsigned32 TextureEnable :1;
  2379. unsigned32 SmoothShadingEnable :1;
  2380. unsigned32 DepthEnable :1;
  2381. unsigned32 SpecularTextureEnable :1;
  2382. unsigned32 DiffuseTextureEnable :1;
  2383. unsigned32 SubPixelCorrectionEnable :1;
  2384. unsigned32 DiamondExit :1;
  2385. unsigned32 NoDraw :1;
  2386. unsigned32 ClampEnable :1;
  2387. unsigned32 TextureParameterMode :2;
  2388. unsigned32 FillDirection :1;
  2389. unsigned32 BackfaceCull :1;
  2390. unsigned32 ColorOrder :1;
  2391. unsigned32 BiasCoordinates :1;
  2392. unsigned32 :6;
  2393. unsigned32 TextureEnable1 :1;
  2394. unsigned32 :1;
  2395. unsigned32 :1;
  2396. unsigned32 Texture3DEnable :1;
  2397. unsigned32 :2;
  2398. #endif
  2399. #ifdef __cplusplus
  2400. P3DeltaMode(void) { }
  2401. P3DeltaMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2402. P3DeltaMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2403. P3DeltaMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2404. P3DeltaMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2405. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2406. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<29|0x1<<26|0x1<<19|0x1<<18|0x1<<17|0x1<<16|0x3<<14|0x1<<13|0x1<<12|0x1<<11|0x1<<10|0x1<<9|0x1<<8|0x1<<7|0x1<<6|0x1<<5|0x1<<4|0x3<<2|0x3<<0)); }
  2407. #endif /* __cplusplus */
  2408. };
  2409. struct DeltaDraw {
  2410. #if BIG_ENDIAN == 1
  2411. unsigned32 :14;
  2412. unsigned32 RejectNegativeFace :1;
  2413. unsigned32 SubPixelCorrectionEnable :1;
  2414. unsigned32 :1;
  2415. unsigned32 FogEnable :1;
  2416. unsigned32 TextureEnable :1;
  2417. unsigned32 :3;
  2418. unsigned32 AntialiasingQuality :1;
  2419. unsigned32 AntialiasEnable :1;
  2420. unsigned32 :8;
  2421. #else
  2422. unsigned32 :8;
  2423. unsigned32 AntialiasEnable :1;
  2424. unsigned32 AntialiasingQuality :1;
  2425. unsigned32 :3;
  2426. unsigned32 TextureEnable :1;
  2427. unsigned32 FogEnable :1;
  2428. unsigned32 :1;
  2429. unsigned32 SubPixelCorrectionEnable :1;
  2430. unsigned32 RejectNegativeFace :1;
  2431. unsigned32 :14;
  2432. #endif
  2433. #ifdef __cplusplus
  2434. DeltaDraw(void) { }
  2435. DeltaDraw(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2436. DeltaDraw& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2437. DeltaDraw& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2438. DeltaDraw& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2439. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2440. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<17|0x1<<16|0x1<<14|0x1<<13|0x1<<9|0x1<<8)); }
  2441. #endif /* __cplusplus */
  2442. };
  2443. struct DeltaControl {
  2444. #if BIG_ENDIAN == 1
  2445. unsigned32 :17;
  2446. unsigned32 ShareColor :1;
  2447. unsigned32 ShareT :1;
  2448. unsigned32 ShareS :1;
  2449. unsigned32 Line2D :1;
  2450. unsigned32 ShareQ :1;
  2451. unsigned32 :3;
  2452. unsigned32 UseProvokingVertex :1;
  2453. unsigned32 :1;
  2454. unsigned32 ForceQ :1;
  2455. unsigned32 DrawLineEndPoint :1;
  2456. unsigned32 FullScreenAA :1;
  2457. unsigned32 :2;
  2458. #else
  2459. unsigned32 :2;
  2460. unsigned32 FullScreenAA :1;
  2461. unsigned32 DrawLineEndPoint :1;
  2462. unsigned32 ForceQ :1;
  2463. unsigned32 :1;
  2464. unsigned32 UseProvokingVertex :1;
  2465. unsigned32 :3;
  2466. unsigned32 ShareQ :1;
  2467. unsigned32 Line2D :1;
  2468. unsigned32 ShareS :1;
  2469. unsigned32 ShareT :1;
  2470. unsigned32 ShareColor :1;
  2471. unsigned32 :17;
  2472. #endif
  2473. #ifdef __cplusplus
  2474. DeltaControl(void) { }
  2475. DeltaControl(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2476. DeltaControl& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2477. DeltaControl& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2478. DeltaControl& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2479. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2480. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<14|0x1<<13|0x1<<12|0x1<<11|0x1<<10|0x1<<6|0x1<<4|0x1<<3|0x1<<2)); }
  2481. #endif /* __cplusplus */
  2482. };
  2483. struct DeltaProvokingVertexMask {
  2484. #if BIG_ENDIAN == 1
  2485. unsigned32 :20;
  2486. unsigned32 KdB :1;
  2487. unsigned32 KdG :1;
  2488. unsigned32 KdR :1;
  2489. unsigned32 :1;
  2490. unsigned32 KsB :1;
  2491. unsigned32 KsG :1;
  2492. unsigned32 KsR :1;
  2493. unsigned32 :1;
  2494. unsigned32 A :1;
  2495. unsigned32 B :1;
  2496. unsigned32 G :1;
  2497. unsigned32 R :1;
  2498. #else
  2499. unsigned32 R :1;
  2500. unsigned32 G :1;
  2501. unsigned32 B :1;
  2502. unsigned32 A :1;
  2503. unsigned32 :1;
  2504. unsigned32 KsR :1;
  2505. unsigned32 KsG :1;
  2506. unsigned32 KsB :1;
  2507. unsigned32 :1;
  2508. unsigned32 KdR :1;
  2509. unsigned32 KdG :1;
  2510. unsigned32 KdB :1;
  2511. unsigned32 :20;
  2512. #endif
  2513. #ifdef __cplusplus
  2514. DeltaProvokingVertexMask(void) { }
  2515. DeltaProvokingVertexMask(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2516. DeltaProvokingVertexMask& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2517. DeltaProvokingVertexMask& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2518. DeltaProvokingVertexMask& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2519. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2520. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<11|0x1<<10|0x1<<9|0x1<<7|0x1<<6|0x1<<5|0x1<<3|0x1<<2|0x1<<1|0x1<<0)); }
  2521. #endif /* __cplusplus */
  2522. };
  2523. struct ProvokingVertex {
  2524. #if BIG_ENDIAN == 1
  2525. unsigned32 :30;
  2526. unsigned32 Vertex :2;
  2527. #else
  2528. unsigned32 Vertex :2;
  2529. unsigned32 :30;
  2530. #endif
  2531. #ifdef __cplusplus
  2532. ProvokingVertex(void) { }
  2533. ProvokingVertex(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2534. ProvokingVertex& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2535. ProvokingVertex& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2536. ProvokingVertex& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2537. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2538. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<0)); }
  2539. #endif /* __cplusplus */
  2540. };
  2541. struct EpilogTag {
  2542. #if BIG_ENDIAN == 1
  2543. unsigned32 :21;
  2544. unsigned32 Tag :11;
  2545. #else
  2546. unsigned32 Tag :11;
  2547. unsigned32 :21;
  2548. #endif
  2549. #ifdef __cplusplus
  2550. EpilogTag(void) { }
  2551. EpilogTag(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2552. EpilogTag& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2553. EpilogTag& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2554. EpilogTag& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2555. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2556. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x7ff<<0)); }
  2557. #endif /* __cplusplus */
  2558. };
  2559. struct PointMode {
  2560. #if BIG_ENDIAN == 1
  2561. unsigned32 :30;
  2562. unsigned32 AntialiasQuality :1;
  2563. unsigned32 AntialiasEnable :1;
  2564. #else
  2565. unsigned32 AntialiasEnable :1;
  2566. unsigned32 AntialiasQuality :1;
  2567. unsigned32 :30;
  2568. #endif
  2569. #ifdef __cplusplus
  2570. PointMode(void) { }
  2571. PointMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2572. PointMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2573. PointMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2574. PointMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2575. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2576. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<1|0x1<<0)); }
  2577. #endif /* __cplusplus */
  2578. };
  2579. struct PointSize {
  2580. #if BIG_ENDIAN == 1
  2581. unsigned32 :24;
  2582. unsigned32 Size :8;
  2583. #else
  2584. unsigned32 Size :8;
  2585. unsigned32 :24;
  2586. #endif
  2587. #ifdef __cplusplus
  2588. PointSize(void) { }
  2589. PointSize(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2590. PointSize& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2591. PointSize& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2592. PointSize& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2593. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2594. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xff<<0)); }
  2595. #endif /* __cplusplus */
  2596. };
  2597. struct LineMode {
  2598. #if BIG_ENDIAN == 1
  2599. unsigned32 :3;
  2600. unsigned32 AntialiasQuality :1;
  2601. unsigned32 AntialiasEnable :1;
  2602. unsigned32 Mirror :1;
  2603. unsigned32 StippleMask :16;
  2604. unsigned32 RepeatFactor :9;
  2605. unsigned32 StippleEnable :1;
  2606. #else
  2607. unsigned32 StippleEnable :1;
  2608. unsigned32 RepeatFactor :9;
  2609. unsigned32 StippleMask :16;
  2610. unsigned32 Mirror :1;
  2611. unsigned32 AntialiasEnable :1;
  2612. unsigned32 AntialiasQuality :1;
  2613. unsigned32 :3;
  2614. #endif
  2615. #ifdef __cplusplus
  2616. LineMode(void) { }
  2617. LineMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2618. LineMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2619. LineMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2620. LineMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2621. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2622. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<28|0x1<<27|0x1<<26|0xffff<<10|0x1ff<<1|0x1<<0)); }
  2623. #endif /* __cplusplus */
  2624. };
  2625. struct LineWidth {
  2626. #if BIG_ENDIAN == 1
  2627. unsigned32 :24;
  2628. unsigned32 Width :8;
  2629. #else
  2630. unsigned32 Width :8;
  2631. unsigned32 :24;
  2632. #endif
  2633. #ifdef __cplusplus
  2634. LineWidth(void) { }
  2635. LineWidth(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2636. LineWidth& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2637. LineWidth& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2638. LineWidth& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2639. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2640. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xff<<0)); }
  2641. #endif /* __cplusplus */
  2642. };
  2643. struct LineWidthOffset {
  2644. #if BIG_ENDIAN == 1
  2645. unsigned32 :24;
  2646. unsigned32 Offset :8;
  2647. #else
  2648. unsigned32 Offset :8;
  2649. unsigned32 :24;
  2650. #endif
  2651. #ifdef __cplusplus
  2652. LineWidthOffset(void) { }
  2653. LineWidthOffset(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2654. LineWidthOffset& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2655. LineWidthOffset& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2656. LineWidthOffset& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2657. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2658. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xff<<0)); }
  2659. #endif /* __cplusplus */
  2660. };
  2661. struct AALineWidth {
  2662. #if BIG_ENDIAN == 1
  2663. unsigned32 Width :32;
  2664. #else
  2665. unsigned32 Width :32;
  2666. #endif
  2667. #ifdef __cplusplus
  2668. AALineWidth(void) { }
  2669. AALineWidth(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2670. AALineWidth& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2671. AALineWidth& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2672. AALineWidth& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2673. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2674. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xffffffff<<0)); }
  2675. #endif /* __cplusplus */
  2676. };
  2677. struct TriangleMode {
  2678. #if BIG_ENDIAN == 1
  2679. unsigned32 :29;
  2680. unsigned32 UseTrianglePacketInterface :1;
  2681. unsigned32 AntialiasQuality :1;
  2682. unsigned32 AntialiasEnable :1;
  2683. #else
  2684. unsigned32 AntialiasEnable :1;
  2685. unsigned32 AntialiasQuality :1;
  2686. unsigned32 UseTrianglePacketInterface :1;
  2687. unsigned32 :29;
  2688. #endif
  2689. #ifdef __cplusplus
  2690. TriangleMode(void) { }
  2691. TriangleMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2692. TriangleMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2693. TriangleMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2694. TriangleMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2695. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2696. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<2|0x1<<1|0x1<<0)); }
  2697. #endif /* __cplusplus */
  2698. };
  2699. struct Rectangle2DMode {
  2700. #if BIG_ENDIAN == 1
  2701. unsigned32 VerticalDirection :1;
  2702. unsigned32 HorizontalDirection :1;
  2703. unsigned32 SpanOperation :1;
  2704. unsigned32 FogEnable :1;
  2705. unsigned32 TextureEnable :1;
  2706. unsigned32 SyncOnHostData :1;
  2707. unsigned32 SyncOnBitmask :1;
  2708. unsigned32 AreaStippleEnable :1;
  2709. unsigned32 Height :12;
  2710. unsigned32 Width :12;
  2711. #else
  2712. unsigned32 Width :12;
  2713. unsigned32 Height :12;
  2714. unsigned32 AreaStippleEnable :1;
  2715. unsigned32 SyncOnBitmask :1;
  2716. unsigned32 SyncOnHostData :1;
  2717. unsigned32 TextureEnable :1;
  2718. unsigned32 FogEnable :1;
  2719. unsigned32 SpanOperation :1;
  2720. unsigned32 HorizontalDirection :1;
  2721. unsigned32 VerticalDirection :1;
  2722. #endif
  2723. #ifdef __cplusplus
  2724. Rectangle2DMode(void) { }
  2725. Rectangle2DMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2726. Rectangle2DMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2727. Rectangle2DMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2728. Rectangle2DMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2729. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2730. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<31|0x1<<30|0x1<<29|0x1<<28|0x1<<27|0x1<<26|0x1<<25|0x1<<24|0xfff<<12|0xfff<<0)); }
  2731. #endif /* __cplusplus */
  2732. };
  2733. struct Rectangle2DControl {
  2734. #if BIG_ENDIAN == 1
  2735. unsigned32 :31;
  2736. unsigned32 WindowClipping :1;
  2737. #else
  2738. unsigned32 WindowClipping :1;
  2739. unsigned32 :31;
  2740. #endif
  2741. #ifdef __cplusplus
  2742. Rectangle2DControl(void) { }
  2743. Rectangle2DControl(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2744. Rectangle2DControl& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2745. Rectangle2DControl& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2746. Rectangle2DControl& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2747. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2748. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<0)); }
  2749. #endif /* __cplusplus */
  2750. };
  2751. struct VertexMachineMode {
  2752. #if BIG_ENDIAN == 1
  2753. unsigned32 :29;
  2754. unsigned32 D3DProvokingVertex :1;
  2755. unsigned32 ObjectIDPerPrimitive :1;
  2756. unsigned32 ObjectTagEnable :1;
  2757. #else
  2758. unsigned32 ObjectTagEnable :1;
  2759. unsigned32 ObjectIDPerPrimitive :1;
  2760. unsigned32 D3DProvokingVertex :1;
  2761. unsigned32 :29;
  2762. #endif
  2763. #ifdef __cplusplus
  2764. VertexMachineMode(void) { }
  2765. VertexMachineMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2766. VertexMachineMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2767. VertexMachineMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2768. VertexMachineMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2769. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2770. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<2|0x1<<1|0x1<<0)); }
  2771. #endif /* __cplusplus */
  2772. };
  2773. struct TransformMode {
  2774. #if BIG_ENDIAN == 1
  2775. unsigned32 :14;
  2776. unsigned32 BlendVertex :1;
  2777. unsigned32 TexGenQ :1;
  2778. unsigned32 TexGenR :1;
  2779. unsigned32 TexGenT :1;
  2780. unsigned32 TexGenS :1;
  2781. unsigned32 TexGenModeQ :2;
  2782. unsigned32 TexGenModeR :2;
  2783. unsigned32 TexGenModeT :2;
  2784. unsigned32 TexGenModeS :2;
  2785. unsigned32 TransformTexture :1;
  2786. unsigned32 TransformFaceNormal :1;
  2787. unsigned32 TransformNormal :1;
  2788. unsigned32 UseModelViewProjectionMatrix :1;
  2789. unsigned32 UseModelViewMatrix :1;
  2790. #else
  2791. unsigned32 UseModelViewMatrix :1;
  2792. unsigned32 UseModelViewProjectionMatrix :1;
  2793. unsigned32 TransformNormal :1;
  2794. unsigned32 TransformFaceNormal :1;
  2795. unsigned32 TransformTexture :1;
  2796. unsigned32 TexGenModeS :2;
  2797. unsigned32 TexGenModeT :2;
  2798. unsigned32 TexGenModeR :2;
  2799. unsigned32 TexGenModeQ :2;
  2800. unsigned32 TexGenS :1;
  2801. unsigned32 TexGenT :1;
  2802. unsigned32 TexGenR :1;
  2803. unsigned32 TexGenQ :1;
  2804. unsigned32 BlendVertex :1;
  2805. unsigned32 :14;
  2806. #endif
  2807. #ifdef __cplusplus
  2808. TransformMode(void) { }
  2809. TransformMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2810. TransformMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2811. TransformMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2812. TransformMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2813. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2814. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<17|0x1<<16|0x1<<15|0x1<<14|0x1<<13|0x3<<11|0x3<<9|0x3<<7|0x3<<5|0x1<<4|0x1<<3|0x1<<2|0x1<<1|0x1<<0)); }
  2815. #endif /* __cplusplus */
  2816. };
  2817. struct GeometryMode {
  2818. #if BIG_ENDIAN == 1
  2819. unsigned32 InvertFaceNormalCullDirection :1;
  2820. unsigned32 PolygonOffsetFill :1;
  2821. unsigned32 PolygonOffsetLine :1;
  2822. unsigned32 PolygonOffsetPoint :1;
  2823. unsigned32 UserClipMask :6;
  2824. unsigned32 FlatShading :1;
  2825. unsigned32 AutoGenerateFaceNormal :1;
  2826. unsigned32 CullUsingFaceNormal :1;
  2827. unsigned32 FeedbackType :3;
  2828. unsigned32 RenderMode :2;
  2829. unsigned32 ClipSmallTriangles :1;
  2830. unsigned32 ClipShortLines :1;
  2831. unsigned32 PolygonCullFace :2;
  2832. unsigned32 PolygonCull :1;
  2833. unsigned32 FrontFaceDirection :1;
  2834. unsigned32 BackPolyMode :2;
  2835. unsigned32 FrontPolyMode :2;
  2836. unsigned32 FogFunction :2;
  2837. unsigned32 FogEnable :1;
  2838. unsigned32 TextureEnable :1;
  2839. #else
  2840. unsigned32 TextureEnable :1;
  2841. unsigned32 FogEnable :1;
  2842. unsigned32 FogFunction :2;
  2843. unsigned32 FrontPolyMode :2;
  2844. unsigned32 BackPolyMode :2;
  2845. unsigned32 FrontFaceDirection :1;
  2846. unsigned32 PolygonCull :1;
  2847. unsigned32 PolygonCullFace :2;
  2848. unsigned32 ClipShortLines :1;
  2849. unsigned32 ClipSmallTriangles :1;
  2850. unsigned32 RenderMode :2;
  2851. unsigned32 FeedbackType :3;
  2852. unsigned32 CullUsingFaceNormal :1;
  2853. unsigned32 AutoGenerateFaceNormal :1;
  2854. unsigned32 FlatShading :1;
  2855. unsigned32 UserClipMask :6;
  2856. unsigned32 PolygonOffsetPoint :1;
  2857. unsigned32 PolygonOffsetLine :1;
  2858. unsigned32 PolygonOffsetFill :1;
  2859. unsigned32 InvertFaceNormalCullDirection :1;
  2860. #endif
  2861. #ifdef __cplusplus
  2862. GeometryMode(void) { }
  2863. GeometryMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2864. GeometryMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2865. GeometryMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2866. GeometryMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2867. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2868. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<31|0x1<<30|0x1<<29|0x1<<28|0x3f<<22|0x1<<21|0x1<<20|0x1<<19|0x7<<16|0x3<<14|0x1<<13|0x1<<12|0x3<<10|0x1<<9|0x1<<8|0x3<<6|0x3<<4|0x3<<2|0x1<<1|0x1<<0)); }
  2869. #endif /* __cplusplus */
  2870. };
  2871. struct Gamma3GeometryMode {
  2872. #if BIG_ENDIAN == 1
  2873. unsigned32 InvertFaceNormalCullDirection :1;
  2874. unsigned32 PolygonOffsetFill :1;
  2875. unsigned32 PolygonOffsetLine :1;
  2876. unsigned32 PolygonOffsetPoint :1;
  2877. unsigned32 UserClipMask :6;
  2878. unsigned32 FlatShading :1;
  2879. unsigned32 DisableFustumCulling :1;
  2880. unsigned32 CullUsingFaceNormal :1;
  2881. unsigned32 FeedbackType :3;
  2882. unsigned32 RenderMode :2;
  2883. unsigned32 ClipSmallTriangles :1;
  2884. unsigned32 ClipShortLines :1;
  2885. unsigned32 PolygonCullFace :2;
  2886. unsigned32 PolygonCull :1;
  2887. unsigned32 FrontFaceDirection :1;
  2888. unsigned32 BackPolyMode :2;
  2889. unsigned32 FrontPolyMode :2;
  2890. unsigned32 OrthographicProjection :1;
  2891. unsigned32 UserInvW :1;
  2892. unsigned32 :1;
  2893. unsigned32 SendInvW :1;
  2894. #else
  2895. unsigned32 SendInvW :1;
  2896. unsigned32 :1;
  2897. unsigned32 UserInvW :1;
  2898. unsigned32 OrthographicProjection :1;
  2899. unsigned32 FrontPolyMode :2;
  2900. unsigned32 BackPolyMode :2;
  2901. unsigned32 FrontFaceDirection :1;
  2902. unsigned32 PolygonCull :1;
  2903. unsigned32 PolygonCullFace :2;
  2904. unsigned32 ClipShortLines :1;
  2905. unsigned32 ClipSmallTriangles :1;
  2906. unsigned32 RenderMode :2;
  2907. unsigned32 FeedbackType :3;
  2908. unsigned32 CullUsingFaceNormal :1;
  2909. unsigned32 DisableFustumCulling :1;
  2910. unsigned32 FlatShading :1;
  2911. unsigned32 UserClipMask :6;
  2912. unsigned32 PolygonOffsetPoint :1;
  2913. unsigned32 PolygonOffsetLine :1;
  2914. unsigned32 PolygonOffsetFill :1;
  2915. unsigned32 InvertFaceNormalCullDirection :1;
  2916. #endif
  2917. #ifdef __cplusplus
  2918. Gamma3GeometryMode(void) { }
  2919. Gamma3GeometryMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2920. Gamma3GeometryMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2921. Gamma3GeometryMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2922. Gamma3GeometryMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2923. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2924. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<31|0x1<<30|0x1<<29|0x1<<28|0x3f<<22|0x1<<21|0x1<<20|0x1<<19|0x7<<16|0x3<<14|0x1<<13|0x1<<12|0x3<<10|0x1<<9|0x1<<8|0x3<<6|0x3<<4|0x1<<3|0x1<<2|0x1<<0)); }
  2925. #endif /* __cplusplus */
  2926. };
  2927. struct NormaliseMode {
  2928. #if BIG_ENDIAN == 1
  2929. unsigned32 :25;
  2930. unsigned32 BlendNormal :1;
  2931. unsigned32 NormaliseSpotDirection :1;
  2932. unsigned32 NormaliseLightPosition :1;
  2933. unsigned32 AntialiasLine :1;
  2934. unsigned32 InvertAutoFaceNormal :1;
  2935. unsigned32 FaceNormalEnable :1;
  2936. unsigned32 NormalEnable :1;
  2937. #else
  2938. unsigned32 NormalEnable :1;
  2939. unsigned32 FaceNormalEnable :1;
  2940. unsigned32 InvertAutoFaceNormal :1;
  2941. unsigned32 AntialiasLine :1;
  2942. unsigned32 NormaliseLightPosition :1;
  2943. unsigned32 NormaliseSpotDirection :1;
  2944. unsigned32 BlendNormal :1;
  2945. unsigned32 :25;
  2946. #endif
  2947. #ifdef __cplusplus
  2948. NormaliseMode(void) { }
  2949. NormaliseMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2950. NormaliseMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2951. NormaliseMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2952. NormaliseMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2953. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2954. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<6|0x1<<5|0x1<<4|0x1<<3|0x1<<2|0x1<<1|0x1<<0)); }
  2955. #endif /* __cplusplus */
  2956. };
  2957. struct LightingMode {
  2958. #if BIG_ENDIAN == 1
  2959. unsigned32 :14;
  2960. unsigned32 D3DEyeDirection :1;
  2961. unsigned32 UseFaceNormal :1;
  2962. unsigned32 SpecularLightingEnable :1;
  2963. unsigned32 NumberLights :9;
  2964. unsigned32 AttenuationTest :1;
  2965. unsigned32 FlipNormal :1;
  2966. unsigned32 LocalViewer :1;
  2967. unsigned32 TwoSidedLighting :2;
  2968. unsigned32 Enable :1;
  2969. #else
  2970. unsigned32 Enable :1;
  2971. unsigned32 TwoSidedLighting :2;
  2972. unsigned32 LocalViewer :1;
  2973. unsigned32 FlipNormal :1;
  2974. unsigned32 AttenuationTest :1;
  2975. unsigned32 NumberLights :9;
  2976. unsigned32 SpecularLightingEnable :1;
  2977. unsigned32 UseFaceNormal :1;
  2978. unsigned32 D3DEyeDirection :1;
  2979. unsigned32 :14;
  2980. #endif
  2981. #ifdef __cplusplus
  2982. LightingMode(void) { }
  2983. LightingMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  2984. LightingMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  2985. LightingMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  2986. LightingMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  2987. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  2988. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<17|0x1<<16|0x1<<15|0x1ff<<6|0x1<<5|0x1<<4|0x1<<3|0x3<<1|0x1<<0)); }
  2989. #endif /* __cplusplus */
  2990. };
  2991. struct ColorMaterialMode {
  2992. #if BIG_ENDIAN == 1
  2993. unsigned32 :6;
  2994. unsigned32 BackAlphaSource :2;
  2995. unsigned32 BackSpecularSource :2;
  2996. unsigned32 BackDiffuseSource :2;
  2997. unsigned32 BackAmbientSource :2;
  2998. unsigned32 BackEmissiveSource :2;
  2999. unsigned32 FrontAlphaSource :2;
  3000. unsigned32 FrontSpecularSource :2;
  3001. unsigned32 FrontDiffuseSource :2;
  3002. unsigned32 FrontAmbientSource :2;
  3003. unsigned32 FrontEmissiveSource :2;
  3004. unsigned32 Parameter :3;
  3005. unsigned32 Face :2;
  3006. unsigned32 ColorMaterialEnable :1;
  3007. #else
  3008. unsigned32 ColorMaterialEnable :1;
  3009. unsigned32 Face :2;
  3010. unsigned32 Parameter :3;
  3011. unsigned32 FrontEmissiveSource :2;
  3012. unsigned32 FrontAmbientSource :2;
  3013. unsigned32 FrontDiffuseSource :2;
  3014. unsigned32 FrontSpecularSource :2;
  3015. unsigned32 FrontAlphaSource :2;
  3016. unsigned32 BackEmissiveSource :2;
  3017. unsigned32 BackAmbientSource :2;
  3018. unsigned32 BackDiffuseSource :2;
  3019. unsigned32 BackSpecularSource :2;
  3020. unsigned32 BackAlphaSource :2;
  3021. unsigned32 :6;
  3022. #endif
  3023. #ifdef __cplusplus
  3024. ColorMaterialMode(void) { }
  3025. ColorMaterialMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3026. ColorMaterialMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3027. ColorMaterialMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3028. ColorMaterialMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3029. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3030. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<24|0x3<<22|0x3<<20|0x3<<18|0x3<<16|0x3<<14|0x3<<12|0x3<<10|0x3<<8|0x3<<6|0x7<<3|0x3<<1|0x1<<0)); }
  3031. #endif /* __cplusplus */
  3032. };
  3033. struct MaterialMode {
  3034. #if BIG_ENDIAN == 1
  3035. unsigned32 :9;
  3036. unsigned32 ColorDisable :1;
  3037. unsigned32 AlphaSource :2;
  3038. unsigned32 SpecularTextureSource :2;
  3039. unsigned32 DiffuseTextureSource :2;
  3040. unsigned32 ColorSource2Bit :2;
  3041. unsigned32 SendColorC :1;
  3042. unsigned32 SendColorB :1;
  3043. unsigned32 SendColorA :1;
  3044. unsigned32 SendNormal :1;
  3045. unsigned32 SpecularColor :1;
  3046. unsigned32 TwoSidedLighting :2;
  3047. unsigned32 ColorSource :1;
  3048. unsigned32 PremultiplyAlpha :1;
  3049. unsigned32 MonochromeSpecularTexture :1;
  3050. unsigned32 MonochromeDiffuseTexture :1;
  3051. unsigned32 SpecularTextureEnable :1;
  3052. unsigned32 DiffuseTextureEnable :1;
  3053. unsigned32 Enable :1;
  3054. #else
  3055. unsigned32 Enable :1;
  3056. unsigned32 DiffuseTextureEnable :1;
  3057. unsigned32 SpecularTextureEnable :1;
  3058. unsigned32 MonochromeDiffuseTexture :1;
  3059. unsigned32 MonochromeSpecularTexture :1;
  3060. unsigned32 PremultiplyAlpha :1;
  3061. unsigned32 ColorSource :1;
  3062. unsigned32 TwoSidedLighting :2;
  3063. unsigned32 SpecularColor :1;
  3064. unsigned32 SendNormal :1;
  3065. unsigned32 SendColorA :1;
  3066. unsigned32 SendColorB :1;
  3067. unsigned32 SendColorC :1;
  3068. unsigned32 ColorSource2Bit :2;
  3069. unsigned32 DiffuseTextureSource :2;
  3070. unsigned32 SpecularTextureSource :2;
  3071. unsigned32 AlphaSource :2;
  3072. unsigned32 ColorDisable :1;
  3073. unsigned32 :9;
  3074. #endif
  3075. #ifdef __cplusplus
  3076. MaterialMode(void) { }
  3077. MaterialMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3078. MaterialMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3079. MaterialMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3080. MaterialMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3081. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3082. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<22|0x3<<20|0x3<<18|0x3<<16|0x3<<14|0x1<<13|0x1<<12|0x1<<11|0x1<<10|0x1<<9|0x3<<7|0x1<<6|0x1<<5|0x1<<4|0x1<<3|0x1<<2|0x1<<1|0x1<<0)); }
  3083. #endif /* __cplusplus */
  3084. };
  3085. struct FogVertexMode {
  3086. #if BIG_ENDIAN == 1
  3087. unsigned32 :26;
  3088. unsigned32 Source :2;
  3089. unsigned32 Function :2;
  3090. unsigned32 :1;
  3091. unsigned32 Enable :1;
  3092. #else
  3093. unsigned32 Enable :1;
  3094. unsigned32 :1;
  3095. unsigned32 Function :2;
  3096. unsigned32 Source :2;
  3097. unsigned32 :26;
  3098. #endif
  3099. #ifdef __cplusplus
  3100. FogVertexMode(void) { }
  3101. FogVertexMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3102. FogVertexMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3103. FogVertexMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3104. FogVertexMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3105. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3106. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<4|0x3<<2|0x1<<0)); }
  3107. #endif /* __cplusplus */
  3108. };
  3109. struct TextureMode {
  3110. #if BIG_ENDIAN == 1
  3111. unsigned32 :3;
  3112. unsigned32 UserInvW :1;
  3113. unsigned32 R4D3DWrappingT :1;
  3114. unsigned32 R4D3DWrappingS :1;
  3115. unsigned32 R4Operation :2;
  3116. unsigned32 FeedbackEnable :1;
  3117. unsigned32 WhichMatrix :3;
  3118. unsigned32 WhichTexGen :3;
  3119. unsigned32 WhichCurrentTextureCoord :3;
  3120. unsigned32 TexGenQ :1;
  3121. unsigned32 TexGenR :1;
  3122. unsigned32 TexGenT :1;
  3123. unsigned32 TexGenS :1;
  3124. unsigned32 TexGenModeQ :2;
  3125. unsigned32 TexGenModeR :2;
  3126. unsigned32 TexGenModeT :2;
  3127. unsigned32 TexGenModeS :2;
  3128. unsigned32 TransformEnable :1;
  3129. unsigned32 Enable :1;
  3130. #else
  3131. unsigned32 Enable :1;
  3132. unsigned32 TransformEnable :1;
  3133. unsigned32 TexGenModeS :2;
  3134. unsigned32 TexGenModeT :2;
  3135. unsigned32 TexGenModeR :2;
  3136. unsigned32 TexGenModeQ :2;
  3137. unsigned32 TexGenS :1;
  3138. unsigned32 TexGenT :1;
  3139. unsigned32 TexGenR :1;
  3140. unsigned32 TexGenQ :1;
  3141. unsigned32 WhichCurrentTextureCoord :3;
  3142. unsigned32 WhichTexGen :3;
  3143. unsigned32 WhichMatrix :3;
  3144. unsigned32 FeedbackEnable :1;
  3145. unsigned32 R4Operation :2;
  3146. unsigned32 R4D3DWrappingS :1;
  3147. unsigned32 R4D3DWrappingT :1;
  3148. unsigned32 UserInvW :1;
  3149. unsigned32 :3;
  3150. #endif
  3151. #ifdef __cplusplus
  3152. TextureMode(void) { }
  3153. TextureMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3154. TextureMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3155. TextureMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3156. TextureMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3157. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3158. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<28|0x1<<27|0x1<<26|0x3<<24|0x1<<23|0x7<<20|0x7<<17|0x7<<14|0x1<<13|0x1<<12|0x1<<11|0x1<<10|0x3<<8|0x3<<6|0x3<<4|0x3<<2|0x1<<1|0x1<<0)); }
  3159. #endif /* __cplusplus */
  3160. };
  3161. struct StripeFilterMode {
  3162. #if BIG_ENDIAN == 1
  3163. unsigned32 :13;
  3164. unsigned32 NumberRasterisers :2;
  3165. unsigned32 StripeHeight :3;
  3166. unsigned32 BiasCoordinates :1;
  3167. unsigned32 RejectZeroHeightTriangles :1;
  3168. unsigned32 AATriangleQuality :1;
  3169. unsigned32 AATriangleEnable :1;
  3170. unsigned32 FilterAATriangles :1;
  3171. unsigned32 FilterTriangles :1;
  3172. unsigned32 AALineQuality :1;
  3173. unsigned32 AALineEnable :1;
  3174. unsigned32 FilterAALines :1;
  3175. unsigned32 FilterLines :1;
  3176. unsigned32 AAPointQuality :1;
  3177. unsigned32 AAPointEnable :1;
  3178. unsigned32 FilterAAPoints :1;
  3179. unsigned32 FilterPoints :1;
  3180. #else
  3181. unsigned32 FilterPoints :1;
  3182. unsigned32 FilterAAPoints :1;
  3183. unsigned32 AAPointEnable :1;
  3184. unsigned32 AAPointQuality :1;
  3185. unsigned32 FilterLines :1;
  3186. unsigned32 FilterAALines :1;
  3187. unsigned32 AALineEnable :1;
  3188. unsigned32 AALineQuality :1;
  3189. unsigned32 FilterTriangles :1;
  3190. unsigned32 FilterAATriangles :1;
  3191. unsigned32 AATriangleEnable :1;
  3192. unsigned32 AATriangleQuality :1;
  3193. unsigned32 RejectZeroHeightTriangles :1;
  3194. unsigned32 BiasCoordinates :1;
  3195. unsigned32 StripeHeight :3;
  3196. unsigned32 NumberRasterisers :2;
  3197. unsigned32 :13;
  3198. #endif
  3199. #ifdef __cplusplus
  3200. StripeFilterMode(void) { }
  3201. StripeFilterMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3202. StripeFilterMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3203. StripeFilterMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3204. StripeFilterMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3205. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3206. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<17|0x7<<14|0x1<<13|0x1<<12|0x1<<11|0x1<<10|0x1<<9|0x1<<8|0x1<<7|0x1<<6|0x1<<5|0x1<<4|0x1<<3|0x1<<2|0x1<<1|0x1<<0)); }
  3207. #endif /* __cplusplus */
  3208. };
  3209. struct MatrixMode {
  3210. #if BIG_ENDIAN == 1
  3211. unsigned32 :23;
  3212. unsigned32 BoundingVolumeTestEnable :1;
  3213. unsigned32 ColorOrder :1;
  3214. unsigned32 BoundingBoxTestEnable :1;
  3215. unsigned32 TransformSpotLightDirection :1;
  3216. unsigned32 TransformLightPosition :1;
  3217. unsigned32 TransformUserClip :1;
  3218. unsigned32 CalculateModelViewProjMatrix :1;
  3219. unsigned32 CalculateModelViewMatrix :1;
  3220. unsigned32 SeparateModelViewMatrices :1;
  3221. #else
  3222. unsigned32 SeparateModelViewMatrices :1;
  3223. unsigned32 CalculateModelViewMatrix :1;
  3224. unsigned32 CalculateModelViewProjMatrix :1;
  3225. unsigned32 TransformUserClip :1;
  3226. unsigned32 TransformLightPosition :1;
  3227. unsigned32 TransformSpotLightDirection :1;
  3228. unsigned32 BoundingBoxTestEnable :1;
  3229. unsigned32 ColorOrder :1;
  3230. unsigned32 BoundingVolumeTestEnable :1;
  3231. unsigned32 :23;
  3232. #endif
  3233. #ifdef __cplusplus
  3234. MatrixMode(void) { }
  3235. MatrixMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3236. MatrixMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3237. MatrixMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3238. MatrixMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3239. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3240. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<8|0x1<<7|0x1<<6|0x1<<5|0x1<<4|0x1<<3|0x1<<2|0x1<<1|0x1<<0)); }
  3241. #endif /* __cplusplus */
  3242. };
  3243. struct RenderMode {
  3244. #if BIG_ENDIAN == 1
  3245. unsigned32 Type :4;
  3246. unsigned32 FBSourceReadEnable :1;
  3247. unsigned32 :7;
  3248. unsigned32 FrontFacing :1;
  3249. unsigned32 SpanOperation :1;
  3250. unsigned32 RejectNegativeFace :1;
  3251. unsigned32 SubpixelCorrectionEnable :1;
  3252. unsigned32 CoverageEnable :1;
  3253. unsigned32 FogEnable :1;
  3254. unsigned32 TextureEnable :1;
  3255. unsigned32 SyncOnHostData :1;
  3256. unsigned32 SyncOnBitMask :1;
  3257. unsigned32 UsePointTable :1;
  3258. unsigned32 AntialiasingQuality :1;
  3259. unsigned32 AntialiasEnable :1;
  3260. unsigned32 PrimitiveType :2;
  3261. unsigned32 :2;
  3262. unsigned32 FastFillEnable :1;
  3263. unsigned32 ResetLineStipple :1;
  3264. unsigned32 LineStippleEnable :1;
  3265. unsigned32 AreaStippleEnable :1;
  3266. #else
  3267. unsigned32 AreaStippleEnable :1;
  3268. unsigned32 LineStippleEnable :1;
  3269. unsigned32 ResetLineStipple :1;
  3270. unsigned32 FastFillEnable :1;
  3271. unsigned32 :2;
  3272. unsigned32 PrimitiveType :2;
  3273. unsigned32 AntialiasEnable :1;
  3274. unsigned32 AntialiasingQuality :1;
  3275. unsigned32 UsePointTable :1;
  3276. unsigned32 SyncOnBitMask :1;
  3277. unsigned32 SyncOnHostData :1;
  3278. unsigned32 TextureEnable :1;
  3279. unsigned32 FogEnable :1;
  3280. unsigned32 CoverageEnable :1;
  3281. unsigned32 SubpixelCorrectionEnable :1;
  3282. unsigned32 RejectNegativeFace :1;
  3283. unsigned32 SpanOperation :1;
  3284. unsigned32 FrontFacing :1;
  3285. unsigned32 :7;
  3286. unsigned32 FBSourceReadEnable :1;
  3287. unsigned32 Type :4;
  3288. #endif
  3289. #ifdef __cplusplus
  3290. RenderMode(void) { }
  3291. RenderMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3292. RenderMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3293. RenderMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3294. RenderMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3295. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3296. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xf<<28|0x1<<27|0x1<<19|0x1<<18|0x1<<17|0x1<<16|0x1<<15|0x1<<14|0x1<<13|0x1<<12|0x1<<11|0x1<<10|0x1<<9|0x1<<8|0x3<<6|0x1<<3|0x1<<2|0x1<<1|0x1<<0)); }
  3297. #endif /* __cplusplus */
  3298. };
  3299. struct EdgeFlag {
  3300. #if BIG_ENDIAN == 1
  3301. unsigned32 :31;
  3302. unsigned32 Flag :1;
  3303. #else
  3304. unsigned32 Flag :1;
  3305. unsigned32 :31;
  3306. #endif
  3307. #ifdef __cplusplus
  3308. EdgeFlag(void) { }
  3309. EdgeFlag(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3310. EdgeFlag& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3311. EdgeFlag& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3312. EdgeFlag& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3313. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3314. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<0)); }
  3315. #endif /* __cplusplus */
  3316. };
  3317. struct TransformCurrent {
  3318. #if BIG_ENDIAN == 1
  3319. unsigned32 :28;
  3320. unsigned32 Color :1;
  3321. unsigned32 Texture :1;
  3322. unsigned32 FaceNormal :1;
  3323. unsigned32 Normal :1;
  3324. #else
  3325. unsigned32 Normal :1;
  3326. unsigned32 FaceNormal :1;
  3327. unsigned32 Texture :1;
  3328. unsigned32 Color :1;
  3329. unsigned32 :28;
  3330. #endif
  3331. #ifdef __cplusplus
  3332. TransformCurrent(void) { }
  3333. TransformCurrent(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3334. TransformCurrent& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3335. TransformCurrent& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3336. TransformCurrent& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3337. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3338. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<3|0x1<<2|0x1<<1|0x1<<0)); }
  3339. #endif /* __cplusplus */
  3340. };
  3341. struct PushName {
  3342. #if BIG_ENDIAN == 1
  3343. unsigned32 StackOverflow :1;
  3344. unsigned32 StackUnderflow :1;
  3345. unsigned32 InvalidOperation :1;
  3346. unsigned32 :22;
  3347. unsigned32 Count :7;
  3348. #else
  3349. unsigned32 Count :7;
  3350. unsigned32 :22;
  3351. unsigned32 InvalidOperation :1;
  3352. unsigned32 StackUnderflow :1;
  3353. unsigned32 StackOverflow :1;
  3354. #endif
  3355. #ifdef __cplusplus
  3356. PushName(void) { }
  3357. PushName(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3358. PushName& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3359. PushName& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3360. PushName& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3361. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3362. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<31|0x1<<30|0x1<<29|0x7f<<0)); }
  3363. #endif /* __cplusplus */
  3364. };
  3365. struct PopName {
  3366. #if BIG_ENDIAN == 1
  3367. unsigned32 StackOverflow :1;
  3368. unsigned32 StackUnderflow :1;
  3369. unsigned32 InvalidOperation :1;
  3370. unsigned32 :22;
  3371. unsigned32 Count :7;
  3372. #else
  3373. unsigned32 Count :7;
  3374. unsigned32 :22;
  3375. unsigned32 InvalidOperation :1;
  3376. unsigned32 StackUnderflow :1;
  3377. unsigned32 StackOverflow :1;
  3378. #endif
  3379. #ifdef __cplusplus
  3380. PopName(void) { }
  3381. PopName(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3382. PopName& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3383. PopName& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3384. PopName& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3385. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3386. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<31|0x1<<30|0x1<<29|0x7f<<0)); }
  3387. #endif /* __cplusplus */
  3388. };
  3389. struct LoadName {
  3390. #if BIG_ENDIAN == 1
  3391. unsigned32 StackOverflow :1;
  3392. unsigned32 StackUnderflow :1;
  3393. unsigned32 InvalidOperation :1;
  3394. unsigned32 :22;
  3395. unsigned32 Count :7;
  3396. #else
  3397. unsigned32 Count :7;
  3398. unsigned32 :22;
  3399. unsigned32 InvalidOperation :1;
  3400. unsigned32 StackUnderflow :1;
  3401. unsigned32 StackOverflow :1;
  3402. #endif
  3403. #ifdef __cplusplus
  3404. LoadName(void) { }
  3405. LoadName(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3406. LoadName& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3407. LoadName& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3408. LoadName& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3409. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3410. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<31|0x1<<30|0x1<<29|0x7f<<0)); }
  3411. #endif /* __cplusplus */
  3412. };
  3413. struct GeomPoint {
  3414. #if BIG_ENDIAN == 1
  3415. unsigned32 :23;
  3416. unsigned32 EdgeA :1;
  3417. unsigned32 :6;
  3418. unsigned32 A :2;
  3419. #else
  3420. unsigned32 A :2;
  3421. unsigned32 :6;
  3422. unsigned32 EdgeA :1;
  3423. unsigned32 :23;
  3424. #endif
  3425. #ifdef __cplusplus
  3426. GeomPoint(void) { }
  3427. GeomPoint(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3428. GeomPoint& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3429. GeomPoint& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3430. GeomPoint& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3431. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3432. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<8|0x3<<0)); }
  3433. #endif /* __cplusplus */
  3434. };
  3435. struct GeomLine {
  3436. #if BIG_ENDIAN == 1
  3437. unsigned32 :20;
  3438. unsigned32 ResetLineStipple :1;
  3439. unsigned32 :1;
  3440. unsigned32 EdgeB :1;
  3441. unsigned32 EdgeA :1;
  3442. unsigned32 ProvokingVertex :2;
  3443. unsigned32 :2;
  3444. unsigned32 B :2;
  3445. unsigned32 A :2;
  3446. #else
  3447. unsigned32 A :2;
  3448. unsigned32 B :2;
  3449. unsigned32 :2;
  3450. unsigned32 ProvokingVertex :2;
  3451. unsigned32 EdgeA :1;
  3452. unsigned32 EdgeB :1;
  3453. unsigned32 :1;
  3454. unsigned32 ResetLineStipple :1;
  3455. unsigned32 :20;
  3456. #endif
  3457. #ifdef __cplusplus
  3458. GeomLine(void) { }
  3459. GeomLine(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3460. GeomLine& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3461. GeomLine& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3462. GeomLine& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3463. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3464. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<11|0x1<<9|0x1<<8|0x3<<6|0x3<<2|0x3<<0)); }
  3465. #endif /* __cplusplus */
  3466. };
  3467. struct GeomTriangle {
  3468. #if BIG_ENDIAN == 1
  3469. unsigned32 :14;
  3470. unsigned32 FrontFacing :1;
  3471. unsigned32 SubstituteEdgeC :1;
  3472. unsigned32 SubstituteEdgeB :1;
  3473. unsigned32 SubstituteEdgeA :1;
  3474. unsigned32 Last :1;
  3475. unsigned32 :1;
  3476. unsigned32 ResetLineStipple :1;
  3477. unsigned32 EdgeC :1;
  3478. unsigned32 EdgeB :1;
  3479. unsigned32 EdgeA :1;
  3480. unsigned32 ProvokingVertex :2;
  3481. unsigned32 C :2;
  3482. unsigned32 B :2;
  3483. unsigned32 A :2;
  3484. #else
  3485. unsigned32 A :2;
  3486. unsigned32 B :2;
  3487. unsigned32 C :2;
  3488. unsigned32 ProvokingVertex :2;
  3489. unsigned32 EdgeA :1;
  3490. unsigned32 EdgeB :1;
  3491. unsigned32 EdgeC :1;
  3492. unsigned32 ResetLineStipple :1;
  3493. unsigned32 :1;
  3494. unsigned32 Last :1;
  3495. unsigned32 SubstituteEdgeA :1;
  3496. unsigned32 SubstituteEdgeB :1;
  3497. unsigned32 SubstituteEdgeC :1;
  3498. unsigned32 FrontFacing :1;
  3499. unsigned32 :14;
  3500. #endif
  3501. #ifdef __cplusplus
  3502. GeomTriangle(void) { }
  3503. GeomTriangle(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3504. GeomTriangle& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3505. GeomTriangle& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3506. GeomTriangle& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3507. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3508. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<17|0x1<<16|0x1<<15|0x1<<14|0x1<<13|0x1<<11|0x1<<10|0x1<<9|0x1<<8|0x3<<6|0x3<<4|0x3<<2|0x3<<0)); }
  3509. #endif /* __cplusplus */
  3510. };
  3511. struct GeomRectangle {
  3512. #if BIG_ENDIAN == 1
  3513. unsigned32 :28;
  3514. unsigned32 SelectEnable :1;
  3515. unsigned32 OffsetEnable :1;
  3516. unsigned32 Type :2;
  3517. #else
  3518. unsigned32 Type :2;
  3519. unsigned32 OffsetEnable :1;
  3520. unsigned32 SelectEnable :1;
  3521. unsigned32 :28;
  3522. #endif
  3523. #ifdef __cplusplus
  3524. GeomRectangle(void) { }
  3525. GeomRectangle(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3526. GeomRectangle& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3527. GeomRectangle& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3528. GeomRectangle& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3529. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3530. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<3|0x1<<2|0x3<<0)); }
  3531. #endif /* __cplusplus */
  3532. };
  3533. struct ClippedColor {
  3534. #if BIG_ENDIAN == 1
  3535. unsigned32 :20;
  3536. unsigned32 UseProvokingVertex :1;
  3537. unsigned32 Destination :2;
  3538. unsigned32 C :2;
  3539. unsigned32 B :2;
  3540. unsigned32 A :2;
  3541. unsigned32 ProvokingVertex :2;
  3542. unsigned32 FrontFacing :1;
  3543. #else
  3544. unsigned32 FrontFacing :1;
  3545. unsigned32 ProvokingVertex :2;
  3546. unsigned32 A :2;
  3547. unsigned32 B :2;
  3548. unsigned32 C :2;
  3549. unsigned32 Destination :2;
  3550. unsigned32 UseProvokingVertex :1;
  3551. unsigned32 :20;
  3552. #endif
  3553. #ifdef __cplusplus
  3554. ClippedColor(void) { }
  3555. ClippedColor(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3556. ClippedColor& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3557. ClippedColor& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3558. ClippedColor& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3559. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3560. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<11|0x3<<9|0x3<<7|0x3<<5|0x3<<3|0x3<<1|0x1<<0)); }
  3561. #endif /* __cplusplus */
  3562. };
  3563. struct RenderPrim {
  3564. #if BIG_ENDIAN == 1
  3565. unsigned32 :21;
  3566. unsigned32 UseProvokingVertex :1;
  3567. unsigned32 FrontFacing :1;
  3568. unsigned32 ResetLineStipple :1;
  3569. unsigned32 ProvokingVertex :2;
  3570. unsigned32 C :2;
  3571. unsigned32 B :2;
  3572. unsigned32 A :2;
  3573. #else
  3574. unsigned32 A :2;
  3575. unsigned32 B :2;
  3576. unsigned32 C :2;
  3577. unsigned32 ProvokingVertex :2;
  3578. unsigned32 ResetLineStipple :1;
  3579. unsigned32 FrontFacing :1;
  3580. unsigned32 UseProvokingVertex :1;
  3581. unsigned32 :21;
  3582. #endif
  3583. #ifdef __cplusplus
  3584. RenderPrim(void) { }
  3585. RenderPrim(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3586. RenderPrim& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3587. RenderPrim& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3588. RenderPrim& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3589. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3590. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<10|0x1<<9|0x1<<8|0x3<<6|0x3<<4|0x3<<2|0x3<<0)); }
  3591. #endif /* __cplusplus */
  3592. };
  3593. struct PackedNormal {
  3594. #if BIG_ENDIAN == 1
  3595. unsigned32 Code :2;
  3596. unsigned32 Z :10;
  3597. unsigned32 Y :10;
  3598. unsigned32 X :10;
  3599. #else
  3600. unsigned32 X :10;
  3601. unsigned32 Y :10;
  3602. unsigned32 Z :10;
  3603. unsigned32 Code :2;
  3604. #endif
  3605. #ifdef __cplusplus
  3606. PackedNormal(void) { }
  3607. PackedNormal(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3608. PackedNormal& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3609. PackedNormal& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3610. PackedNormal& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3611. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3612. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<30|0x3ff<<20|0x3ff<<10|0x3ff<<0)); }
  3613. #endif /* __cplusplus */
  3614. };
  3615. struct LightMode {
  3616. #if BIG_ENDIAN == 1
  3617. unsigned32 :28;
  3618. unsigned32 LocalLight :1;
  3619. unsigned32 Attenuation :1;
  3620. unsigned32 Spotlight :1;
  3621. unsigned32 LightOn :1;
  3622. #else
  3623. unsigned32 LightOn :1;
  3624. unsigned32 Spotlight :1;
  3625. unsigned32 Attenuation :1;
  3626. unsigned32 LocalLight :1;
  3627. unsigned32 :28;
  3628. #endif
  3629. #ifdef __cplusplus
  3630. LightMode(void) { }
  3631. LightMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3632. LightMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3633. LightMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3634. LightMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3635. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3636. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<3|0x1<<2|0x1<<1|0x1<<0)); }
  3637. #endif /* __cplusplus */
  3638. };
  3639. struct DMAAddr {
  3640. #if BIG_ENDIAN == 1
  3641. unsigned32 Address :30;
  3642. unsigned32 :2;
  3643. #else
  3644. unsigned32 :2;
  3645. unsigned32 Address :30;
  3646. #endif
  3647. #ifdef __cplusplus
  3648. DMAAddr(void) { }
  3649. DMAAddr(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3650. DMAAddr& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3651. DMAAddr& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3652. DMAAddr& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3653. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3654. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3fffffff<<2)); }
  3655. #endif /* __cplusplus */
  3656. };
  3657. struct CommandInterrupt {
  3658. #if BIG_ENDIAN == 1
  3659. unsigned32 :31;
  3660. unsigned32 OutputDMA :1;
  3661. #else
  3662. unsigned32 OutputDMA :1;
  3663. unsigned32 :31;
  3664. #endif
  3665. #ifdef __cplusplus
  3666. CommandInterrupt(void) { }
  3667. CommandInterrupt(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3668. CommandInterrupt& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3669. CommandInterrupt& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3670. CommandInterrupt& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3671. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3672. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<0)); }
  3673. #endif /* __cplusplus */
  3674. };
  3675. struct DMARectangleRead {
  3676. #if BIG_ENDIAN == 1
  3677. unsigned32 Alignment :2;
  3678. unsigned32 :1;
  3679. unsigned32 ByteSwap :2;
  3680. unsigned32 PackOut :1;
  3681. unsigned32 PixelSize :2;
  3682. unsigned32 Height :12;
  3683. unsigned32 Width :12;
  3684. #else
  3685. unsigned32 Width :12;
  3686. unsigned32 Height :12;
  3687. unsigned32 PixelSize :2;
  3688. unsigned32 PackOut :1;
  3689. unsigned32 ByteSwap :2;
  3690. unsigned32 :1;
  3691. unsigned32 Alignment :2;
  3692. #endif
  3693. #ifdef __cplusplus
  3694. DMARectangleRead(void) { }
  3695. DMARectangleRead(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3696. DMARectangleRead& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3697. DMARectangleRead& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3698. DMARectangleRead& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3699. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3700. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<30|0x3<<27|0x1<<26|0x3<<24|0xfff<<12|0xfff<<0)); }
  3701. #endif /* __cplusplus */
  3702. };
  3703. struct DMARectangleReadLinePitch {
  3704. #if BIG_ENDIAN == 1
  3705. unsigned32 LinePitch :32;
  3706. #else
  3707. unsigned32 LinePitch :32;
  3708. #endif
  3709. #ifdef __cplusplus
  3710. DMARectangleReadLinePitch(void) { }
  3711. DMARectangleReadLinePitch(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3712. DMARectangleReadLinePitch& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3713. DMARectangleReadLinePitch& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3714. DMARectangleReadLinePitch& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3715. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3716. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xffffffff<<0)); }
  3717. #endif /* __cplusplus */
  3718. };
  3719. struct DMARectangleReadTarget {
  3720. #if BIG_ENDIAN == 1
  3721. unsigned32 :21;
  3722. unsigned32 Tag :11;
  3723. #else
  3724. unsigned32 Tag :11;
  3725. unsigned32 :21;
  3726. #endif
  3727. #ifdef __cplusplus
  3728. DMARectangleReadTarget(void) { }
  3729. DMARectangleReadTarget(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3730. DMARectangleReadTarget& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3731. DMARectangleReadTarget& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3732. DMARectangleReadTarget& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3733. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3734. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x7ff<<0)); }
  3735. #endif /* __cplusplus */
  3736. };
  3737. struct DMARectangleWrite {
  3738. #if BIG_ENDIAN == 1
  3739. unsigned32 Alignment :2;
  3740. unsigned32 :1;
  3741. unsigned32 ByteSwap :2;
  3742. unsigned32 PackOut :1;
  3743. unsigned32 PixelSize :2;
  3744. unsigned32 Height :12;
  3745. unsigned32 Width :12;
  3746. #else
  3747. unsigned32 Width :12;
  3748. unsigned32 Height :12;
  3749. unsigned32 PixelSize :2;
  3750. unsigned32 PackOut :1;
  3751. unsigned32 ByteSwap :2;
  3752. unsigned32 :1;
  3753. unsigned32 Alignment :2;
  3754. #endif
  3755. #ifdef __cplusplus
  3756. DMARectangleWrite(void) { }
  3757. DMARectangleWrite(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3758. DMARectangleWrite& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3759. DMARectangleWrite& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3760. DMARectangleWrite& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3761. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3762. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<30|0x3<<27|0x1<<26|0x3<<24|0xfff<<12|0xfff<<0)); }
  3763. #endif /* __cplusplus */
  3764. };
  3765. struct DMARectangleWriteLinePitch {
  3766. #if BIG_ENDIAN == 1
  3767. unsigned32 LinePitch :32;
  3768. #else
  3769. unsigned32 LinePitch :32;
  3770. #endif
  3771. #ifdef __cplusplus
  3772. DMARectangleWriteLinePitch(void) { }
  3773. DMARectangleWriteLinePitch(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3774. DMARectangleWriteLinePitch& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3775. DMARectangleWriteLinePitch& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3776. DMARectangleWriteLinePitch& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3777. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3778. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xffffffff<<0)); }
  3779. #endif /* __cplusplus */
  3780. };
  3781. struct DMAOutputAddress {
  3782. #if BIG_ENDIAN == 1
  3783. unsigned32 Address :30;
  3784. unsigned32 :2;
  3785. #else
  3786. unsigned32 :2;
  3787. unsigned32 Address :30;
  3788. #endif
  3789. #ifdef __cplusplus
  3790. DMAOutputAddress(void) { }
  3791. DMAOutputAddress(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3792. DMAOutputAddress& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3793. DMAOutputAddress& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3794. DMAOutputAddress& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3795. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3796. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3fffffff<<2)); }
  3797. #endif /* __cplusplus */
  3798. };
  3799. struct VertexArray {
  3800. #if BIG_ENDIAN == 1
  3801. unsigned32 :18;
  3802. unsigned32 OpenGLProvokingVertex :1;
  3803. unsigned32 D3DTriangleEdgeFlags :1;
  3804. unsigned32 InlineFaceNormalData :1;
  3805. unsigned32 InlineVertexData :1;
  3806. unsigned32 InlineIndices :1;
  3807. unsigned32 FaceNormalPresent :1;
  3808. unsigned32 EdgeFlagPresent :1;
  3809. unsigned32 TextureFormat :2;
  3810. unsigned32 ColorFormat :2;
  3811. unsigned32 NormalPresent :1;
  3812. unsigned32 CoordinateFormat :2;
  3813. #else
  3814. unsigned32 CoordinateFormat :2;
  3815. unsigned32 NormalPresent :1;
  3816. unsigned32 ColorFormat :2;
  3817. unsigned32 TextureFormat :2;
  3818. unsigned32 EdgeFlagPresent :1;
  3819. unsigned32 FaceNormalPresent :1;
  3820. unsigned32 InlineIndices :1;
  3821. unsigned32 InlineVertexData :1;
  3822. unsigned32 InlineFaceNormalData :1;
  3823. unsigned32 D3DTriangleEdgeFlags :1;
  3824. unsigned32 OpenGLProvokingVertex :1;
  3825. unsigned32 :18;
  3826. #endif
  3827. #ifdef __cplusplus
  3828. VertexArray(void) { }
  3829. VertexArray(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3830. VertexArray& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3831. VertexArray& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3832. VertexArray& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3833. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3834. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<13|0x1<<12|0x1<<11|0x1<<10|0x1<<9|0x1<<8|0x1<<7|0x3<<5|0x3<<3|0x1<<2|0x3<<0)); }
  3835. #endif /* __cplusplus */
  3836. };
  3837. struct FBDestReadBufferWidth {
  3838. #if BIG_ENDIAN == 1
  3839. unsigned32 :20;
  3840. unsigned32 Width :12;
  3841. #else
  3842. unsigned32 Width :12;
  3843. unsigned32 :20;
  3844. #endif
  3845. #ifdef __cplusplus
  3846. FBDestReadBufferWidth(void) { }
  3847. FBDestReadBufferWidth(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3848. FBDestReadBufferWidth& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3849. FBDestReadBufferWidth& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3850. FBDestReadBufferWidth& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3851. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3852. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xfff<<0)); }
  3853. #endif /* __cplusplus */
  3854. };
  3855. struct FBDestReadMode {
  3856. #if BIG_ENDIAN == 1
  3857. unsigned32 :4;
  3858. unsigned32 AlphaFiltering :1;
  3859. unsigned32 UseReadEnables :1;
  3860. unsigned32 PCIMappingEnable :1;
  3861. unsigned32 Blocking :1;
  3862. unsigned32 Origin3 :1;
  3863. unsigned32 Origin2 :1;
  3864. unsigned32 Origin1 :1;
  3865. unsigned32 Origin0 :1;
  3866. unsigned32 Layout3 :2;
  3867. unsigned32 Layout2 :2;
  3868. unsigned32 Layout1 :2;
  3869. unsigned32 Layout0 :2;
  3870. unsigned32 Enable3 :1;
  3871. unsigned32 Enable2 :1;
  3872. unsigned32 Enable1 :1;
  3873. unsigned32 Enable0 :1;
  3874. unsigned32 StripeHeight :3;
  3875. unsigned32 StripePitch :3;
  3876. unsigned32 PrefetchEnable :1;
  3877. unsigned32 ReadEnable :1;
  3878. #else
  3879. unsigned32 ReadEnable :1;
  3880. unsigned32 PrefetchEnable :1;
  3881. unsigned32 StripePitch :3;
  3882. unsigned32 StripeHeight :3;
  3883. unsigned32 Enable0 :1;
  3884. unsigned32 Enable1 :1;
  3885. unsigned32 Enable2 :1;
  3886. unsigned32 Enable3 :1;
  3887. unsigned32 Layout0 :2;
  3888. unsigned32 Layout1 :2;
  3889. unsigned32 Layout2 :2;
  3890. unsigned32 Layout3 :2;
  3891. unsigned32 Origin0 :1;
  3892. unsigned32 Origin1 :1;
  3893. unsigned32 Origin2 :1;
  3894. unsigned32 Origin3 :1;
  3895. unsigned32 Blocking :1;
  3896. unsigned32 PCIMappingEnable :1;
  3897. unsigned32 UseReadEnables :1;
  3898. unsigned32 AlphaFiltering :1;
  3899. unsigned32 :4;
  3900. #endif
  3901. #ifdef __cplusplus
  3902. FBDestReadMode(void) { }
  3903. FBDestReadMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3904. FBDestReadMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3905. FBDestReadMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3906. FBDestReadMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3907. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3908. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<27|0x1<<26|0x1<<25|0x1<<24|0x1<<23|0x1<<22|0x1<<21|0x1<<20|0x3<<18|0x3<<16|0x3<<14|0x3<<12|0x1<<11|0x1<<10|0x1<<9|0x1<<8|0x7<<5|0x7<<2|0x1<<1|0x1<<0)); }
  3909. #endif /* __cplusplus */
  3910. };
  3911. struct FBDestReadEnables {
  3912. #if BIG_ENDIAN == 1
  3913. unsigned32 ReferenceAlpha :8;
  3914. unsigned32 :8;
  3915. unsigned32 R7 :1;
  3916. unsigned32 R6 :1;
  3917. unsigned32 R5 :1;
  3918. unsigned32 R4 :1;
  3919. unsigned32 R3 :1;
  3920. unsigned32 R2 :1;
  3921. unsigned32 R1 :1;
  3922. unsigned32 R0 :1;
  3923. unsigned32 E7 :1;
  3924. unsigned32 E6 :1;
  3925. unsigned32 E5 :1;
  3926. unsigned32 E4 :1;
  3927. unsigned32 E3 :1;
  3928. unsigned32 E2 :1;
  3929. unsigned32 E1 :1;
  3930. unsigned32 E0 :1;
  3931. #else
  3932. unsigned32 E0 :1;
  3933. unsigned32 E1 :1;
  3934. unsigned32 E2 :1;
  3935. unsigned32 E3 :1;
  3936. unsigned32 E4 :1;
  3937. unsigned32 E5 :1;
  3938. unsigned32 E6 :1;
  3939. unsigned32 E7 :1;
  3940. unsigned32 R0 :1;
  3941. unsigned32 R1 :1;
  3942. unsigned32 R2 :1;
  3943. unsigned32 R3 :1;
  3944. unsigned32 R4 :1;
  3945. unsigned32 R5 :1;
  3946. unsigned32 R6 :1;
  3947. unsigned32 R7 :1;
  3948. unsigned32 :8;
  3949. unsigned32 ReferenceAlpha :8;
  3950. #endif
  3951. #ifdef __cplusplus
  3952. FBDestReadEnables(void) { }
  3953. FBDestReadEnables(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3954. FBDestReadEnables& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3955. FBDestReadEnables& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  3956. FBDestReadEnables& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  3957. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  3958. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xff<<24|0x1<<15|0x1<<14|0x1<<13|0x1<<12|0x1<<11|0x1<<10|0x1<<9|0x1<<8|0x1<<7|0x1<<6|0x1<<5|0x1<<4|0x1<<3|0x1<<2|0x1<<1|0x1<<0)); }
  3959. #endif /* __cplusplus */
  3960. };
  3961. struct FBSourceReadMode {
  3962. #if BIG_ENDIAN == 1
  3963. unsigned32 :7;
  3964. unsigned32 ExternalSourceData :1;
  3965. unsigned32 WrapY :4;
  3966. unsigned32 WrapX :4;
  3967. unsigned32 WrapYEnable :1;
  3968. unsigned32 WrapXEnable :1;
  3969. unsigned32 UseTexelCoord :1;
  3970. unsigned32 PCIMappingEnable :1;
  3971. unsigned32 Blocking :1;
  3972. unsigned32 Origin :1;
  3973. unsigned32 Layout :2;
  3974. unsigned32 StripeHeight :3;
  3975. unsigned32 StripePitch :3;
  3976. unsigned32 PrefetchEnable :1;
  3977. unsigned32 ReadEnable :1;
  3978. #else
  3979. unsigned32 ReadEnable :1;
  3980. unsigned32 PrefetchEnable :1;
  3981. unsigned32 StripePitch :3;
  3982. unsigned32 StripeHeight :3;
  3983. unsigned32 Layout :2;
  3984. unsigned32 Origin :1;
  3985. unsigned32 Blocking :1;
  3986. unsigned32 PCIMappingEnable :1;
  3987. unsigned32 UseTexelCoord :1;
  3988. unsigned32 WrapXEnable :1;
  3989. unsigned32 WrapYEnable :1;
  3990. unsigned32 WrapX :4;
  3991. unsigned32 WrapY :4;
  3992. unsigned32 ExternalSourceData :1;
  3993. unsigned32 :7;
  3994. #endif
  3995. #ifdef __cplusplus
  3996. FBSourceReadMode(void) { }
  3997. FBSourceReadMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  3998. FBSourceReadMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  3999. FBSourceReadMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4000. FBSourceReadMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4001. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4002. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<24|0xf<<20|0xf<<16|0x1<<15|0x1<<14|0x1<<13|0x1<<12|0x1<<11|0x1<<10|0x3<<8|0x7<<5|0x7<<2|0x1<<1|0x1<<0)); }
  4003. #endif /* __cplusplus */
  4004. };
  4005. struct FBSourceReadBufferWidth {
  4006. #if BIG_ENDIAN == 1
  4007. unsigned32 :20;
  4008. unsigned32 Width :12;
  4009. #else
  4010. unsigned32 Width :12;
  4011. unsigned32 :20;
  4012. #endif
  4013. #ifdef __cplusplus
  4014. FBSourceReadBufferWidth(void) { }
  4015. FBSourceReadBufferWidth(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4016. FBSourceReadBufferWidth& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4017. FBSourceReadBufferWidth& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4018. FBSourceReadBufferWidth& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4019. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4020. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xfff<<0)); }
  4021. #endif /* __cplusplus */
  4022. };
  4023. struct MergeSpanDataLower {
  4024. #if BIG_ENDIAN == 1
  4025. unsigned32 :1;
  4026. unsigned32 Addr :5;
  4027. unsigned32 Buffer :3;
  4028. unsigned32 Load :1;
  4029. unsigned32 PostDest :3;
  4030. unsigned32 PostLength :4;
  4031. unsigned32 PostStart :4;
  4032. unsigned32 PreDest :3;
  4033. unsigned32 PreLength :4;
  4034. unsigned32 PreStart :4;
  4035. #else
  4036. unsigned32 PreStart :4;
  4037. unsigned32 PreLength :4;
  4038. unsigned32 PreDest :3;
  4039. unsigned32 PostStart :4;
  4040. unsigned32 PostLength :4;
  4041. unsigned32 PostDest :3;
  4042. unsigned32 Load :1;
  4043. unsigned32 Buffer :3;
  4044. unsigned32 Addr :5;
  4045. unsigned32 :1;
  4046. #endif
  4047. #ifdef __cplusplus
  4048. MergeSpanDataLower(void) { }
  4049. MergeSpanDataLower(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4050. MergeSpanDataLower& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4051. MergeSpanDataLower& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4052. MergeSpanDataLower& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4053. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4054. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1f<<26|0x7<<23|0x1<<22|0x7<<19|0xf<<15|0xf<<11|0x7<<8|0xf<<4|0xf<<0)); }
  4055. #endif /* __cplusplus */
  4056. };
  4057. struct MergeSpanDataUpper {
  4058. #if BIG_ENDIAN == 1
  4059. unsigned32 :29;
  4060. unsigned32 Operation :3;
  4061. #else
  4062. unsigned32 Operation :3;
  4063. unsigned32 :29;
  4064. #endif
  4065. #ifdef __cplusplus
  4066. MergeSpanDataUpper(void) { }
  4067. MergeSpanDataUpper(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4068. MergeSpanDataUpper& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4069. MergeSpanDataUpper& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4070. MergeSpanDataUpper& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4071. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4072. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x7<<0)); }
  4073. #endif /* __cplusplus */
  4074. };
  4075. struct AlphaBlendColorMode {
  4076. #if BIG_ENDIAN == 1
  4077. unsigned32 :7;
  4078. unsigned32 SwapSD :1;
  4079. unsigned32 Operation :4;
  4080. unsigned32 ConstantDest :1;
  4081. unsigned32 ConstantSource :1;
  4082. unsigned32 ColorConversion :1;
  4083. unsigned32 ColorOrder :1;
  4084. unsigned32 ColorFormat :4;
  4085. unsigned32 InvertDest :1;
  4086. unsigned32 InvertSource :1;
  4087. unsigned32 DestTimesTwo :1;
  4088. unsigned32 SourceTimesTwo :1;
  4089. unsigned32 DestBlend :3;
  4090. unsigned32 SourceBlend :4;
  4091. unsigned32 Enable :1;
  4092. #else
  4093. unsigned32 Enable :1;
  4094. unsigned32 SourceBlend :4;
  4095. unsigned32 DestBlend :3;
  4096. unsigned32 SourceTimesTwo :1;
  4097. unsigned32 DestTimesTwo :1;
  4098. unsigned32 InvertSource :1;
  4099. unsigned32 InvertDest :1;
  4100. unsigned32 ColorFormat :4;
  4101. unsigned32 ColorOrder :1;
  4102. unsigned32 ColorConversion :1;
  4103. unsigned32 ConstantSource :1;
  4104. unsigned32 ConstantDest :1;
  4105. unsigned32 Operation :4;
  4106. unsigned32 SwapSD :1;
  4107. unsigned32 :7;
  4108. #endif
  4109. #ifdef __cplusplus
  4110. AlphaBlendColorMode(void) { }
  4111. AlphaBlendColorMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4112. AlphaBlendColorMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4113. AlphaBlendColorMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4114. AlphaBlendColorMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4115. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4116. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<24|0xf<<20|0x1<<19|0x1<<18|0x1<<17|0x1<<16|0xf<<12|0x1<<11|0x1<<10|0x1<<9|0x1<<8|0x7<<5|0xf<<1|0x1<<0)); }
  4117. #endif /* __cplusplus */
  4118. };
  4119. struct AlphaBlendAlphaMode {
  4120. #if BIG_ENDIAN == 1
  4121. unsigned32 :12;
  4122. unsigned32 Operation :3;
  4123. unsigned32 ConstantDest :1;
  4124. unsigned32 ConstantSource :1;
  4125. unsigned32 AlphaConversion :1;
  4126. unsigned32 AlphaType :1;
  4127. unsigned32 NoAlphaBuffer :1;
  4128. unsigned32 InvertDest :1;
  4129. unsigned32 InvertSource :1;
  4130. unsigned32 DestTimesTwo :1;
  4131. unsigned32 SourceTimesTwo :1;
  4132. unsigned32 DestBlend :3;
  4133. unsigned32 SourceBlend :4;
  4134. unsigned32 Enable :1;
  4135. #else
  4136. unsigned32 Enable :1;
  4137. unsigned32 SourceBlend :4;
  4138. unsigned32 DestBlend :3;
  4139. unsigned32 SourceTimesTwo :1;
  4140. unsigned32 DestTimesTwo :1;
  4141. unsigned32 InvertSource :1;
  4142. unsigned32 InvertDest :1;
  4143. unsigned32 NoAlphaBuffer :1;
  4144. unsigned32 AlphaType :1;
  4145. unsigned32 AlphaConversion :1;
  4146. unsigned32 ConstantSource :1;
  4147. unsigned32 ConstantDest :1;
  4148. unsigned32 Operation :3;
  4149. unsigned32 :12;
  4150. #endif
  4151. #ifdef __cplusplus
  4152. AlphaBlendAlphaMode(void) { }
  4153. AlphaBlendAlphaMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4154. AlphaBlendAlphaMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4155. AlphaBlendAlphaMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4156. AlphaBlendAlphaMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4157. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4158. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x7<<17|0x1<<16|0x1<<15|0x1<<14|0x1<<13|0x1<<12|0x1<<11|0x1<<10|0x1<<9|0x1<<8|0x7<<5|0xf<<1|0x1<<0)); }
  4159. #endif /* __cplusplus */
  4160. };
  4161. struct FBWriteBufferWidth {
  4162. #if BIG_ENDIAN == 1
  4163. unsigned32 :20;
  4164. unsigned32 Width :12;
  4165. #else
  4166. unsigned32 Width :12;
  4167. unsigned32 :20;
  4168. #endif
  4169. #ifdef __cplusplus
  4170. FBWriteBufferWidth(void) { }
  4171. FBWriteBufferWidth(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4172. FBWriteBufferWidth& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4173. FBWriteBufferWidth& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4174. FBWriteBufferWidth& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4175. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4176. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xfff<<0)); }
  4177. #endif /* __cplusplus */
  4178. };
  4179. struct TextureCompositeMode {
  4180. #if BIG_ENDIAN == 1
  4181. unsigned32 :31;
  4182. unsigned32 Enable :1;
  4183. #else
  4184. unsigned32 Enable :1;
  4185. unsigned32 :31;
  4186. #endif
  4187. #ifdef __cplusplus
  4188. TextureCompositeMode(void) { }
  4189. TextureCompositeMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4190. TextureCompositeMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4191. TextureCompositeMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4192. TextureCompositeMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4193. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4194. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<0)); }
  4195. #endif /* __cplusplus */
  4196. };
  4197. struct TextureCompositeRGBAMode {
  4198. #if BIG_ENDIAN == 1
  4199. unsigned32 :9;
  4200. unsigned32 Scale :2;
  4201. unsigned32 Operation :4;
  4202. unsigned32 B :1;
  4203. unsigned32 A :1;
  4204. unsigned32 InvertI :1;
  4205. unsigned32 I :3;
  4206. unsigned32 InvertArg2 :1;
  4207. unsigned32 Arg2 :4;
  4208. unsigned32 InvertArg1 :1;
  4209. unsigned32 Arg1 :4;
  4210. unsigned32 Enable :1;
  4211. #else
  4212. unsigned32 Enable :1;
  4213. unsigned32 Arg1 :4;
  4214. unsigned32 InvertArg1 :1;
  4215. unsigned32 Arg2 :4;
  4216. unsigned32 InvertArg2 :1;
  4217. unsigned32 I :3;
  4218. unsigned32 InvertI :1;
  4219. unsigned32 A :1;
  4220. unsigned32 B :1;
  4221. unsigned32 Operation :4;
  4222. unsigned32 Scale :2;
  4223. unsigned32 :9;
  4224. #endif
  4225. #ifdef __cplusplus
  4226. TextureCompositeRGBAMode(void) { }
  4227. TextureCompositeRGBAMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4228. TextureCompositeRGBAMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4229. TextureCompositeRGBAMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4230. TextureCompositeRGBAMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4231. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4232. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<21|0xf<<17|0x1<<16|0x1<<15|0x1<<14|0x7<<11|0x1<<10|0xf<<6|0x1<<5|0xf<<1|0x1<<0)); }
  4233. #endif /* __cplusplus */
  4234. };
  4235. struct TextureIndexMode {
  4236. #if BIG_ENDIAN == 1
  4237. unsigned32 :6;
  4238. unsigned32 SourceTexelEnable :1;
  4239. unsigned32 LinearBias :2;
  4240. unsigned32 NearestBias :2;
  4241. unsigned32 MipMapEnable :1;
  4242. unsigned32 Texture3DEnable :1;
  4243. unsigned32 MinificationFilter :3;
  4244. unsigned32 MagnificationFilter :1;
  4245. unsigned32 MapType :1;
  4246. unsigned32 WrapV :2;
  4247. unsigned32 WrapU :2;
  4248. unsigned32 Border :1;
  4249. unsigned32 Height :4;
  4250. unsigned32 Width :4;
  4251. unsigned32 Enable :1;
  4252. #else
  4253. unsigned32 Enable :1;
  4254. unsigned32 Width :4;
  4255. unsigned32 Height :4;
  4256. unsigned32 Border :1;
  4257. unsigned32 WrapU :2;
  4258. unsigned32 WrapV :2;
  4259. unsigned32 MapType :1;
  4260. unsigned32 MagnificationFilter :1;
  4261. unsigned32 MinificationFilter :3;
  4262. unsigned32 Texture3DEnable :1;
  4263. unsigned32 MipMapEnable :1;
  4264. unsigned32 NearestBias :2;
  4265. unsigned32 LinearBias :2;
  4266. unsigned32 SourceTexelEnable :1;
  4267. unsigned32 :6;
  4268. #endif
  4269. #ifdef __cplusplus
  4270. TextureIndexMode(void) { }
  4271. TextureIndexMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4272. TextureIndexMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4273. TextureIndexMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4274. TextureIndexMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4275. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4276. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<25|0x3<<23|0x3<<21|0x1<<20|0x1<<19|0x7<<16|0x1<<15|0x1<<14|0x3<<12|0x3<<10|0x1<<9|0xf<<5|0xf<<1|0x1<<0)); }
  4277. #endif /* __cplusplus */
  4278. };
  4279. struct LodRange {
  4280. #if BIG_ENDIAN == 1
  4281. unsigned32 :8;
  4282. unsigned32 Max :12;
  4283. unsigned32 Min :12;
  4284. #else
  4285. unsigned32 Min :12;
  4286. unsigned32 Max :12;
  4287. unsigned32 :8;
  4288. #endif
  4289. #ifdef __cplusplus
  4290. LodRange(void) { }
  4291. LodRange(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4292. LodRange& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4293. LodRange& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4294. LodRange& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4295. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4296. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xfff<<12|0xfff<<0)); }
  4297. #endif /* __cplusplus */
  4298. };
  4299. struct InvalidateCache {
  4300. #if BIG_ENDIAN == 1
  4301. unsigned32 :29;
  4302. unsigned32 InvalidateTLB :1;
  4303. unsigned32 InvalidateBank1 :1;
  4304. unsigned32 InvalidateBank0 :1;
  4305. #else
  4306. unsigned32 InvalidateBank0 :1;
  4307. unsigned32 InvalidateBank1 :1;
  4308. unsigned32 InvalidateTLB :1;
  4309. unsigned32 :29;
  4310. #endif
  4311. #ifdef __cplusplus
  4312. InvalidateCache(void) { }
  4313. InvalidateCache(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4314. InvalidateCache& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4315. InvalidateCache& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4316. InvalidateCache& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4317. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4318. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<2|0x1<<1|0x1<<0)); }
  4319. #endif /* __cplusplus */
  4320. };
  4321. struct TouchLogicalPage {
  4322. #if BIG_ENDIAN == 1
  4323. unsigned32 Mode :2;
  4324. unsigned32 Count :14;
  4325. unsigned32 LogicalPage :16;
  4326. #else
  4327. unsigned32 LogicalPage :16;
  4328. unsigned32 Count :14;
  4329. unsigned32 Mode :2;
  4330. #endif
  4331. #ifdef __cplusplus
  4332. TouchLogicalPage(void) { }
  4333. TouchLogicalPage(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4334. TouchLogicalPage& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4335. TouchLogicalPage& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4336. TouchLogicalPage& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4337. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4338. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<30|0x3fff<<16|0xffff<<0)); }
  4339. #endif /* __cplusplus */
  4340. };
  4341. struct LUTMode {
  4342. #if BIG_ENDIAN == 1
  4343. unsigned32 :4;
  4344. unsigned32 SpanVCXAlignment :1;
  4345. unsigned32 SpanCCXAlignment :1;
  4346. unsigned32 PatternBase :8;
  4347. unsigned32 YOffset :3;
  4348. unsigned32 XOffset :3;
  4349. unsigned32 MotionComp8Bits :1;
  4350. unsigned32 SpanOperation :3;
  4351. unsigned32 FragmentOperation :3;
  4352. unsigned32 LoadColorOrder :1;
  4353. unsigned32 LoadFormat :2;
  4354. unsigned32 InColorOrder :1;
  4355. unsigned32 Enable :1;
  4356. #else
  4357. unsigned32 Enable :1;
  4358. unsigned32 InColorOrder :1;
  4359. unsigned32 LoadFormat :2;
  4360. unsigned32 LoadColorOrder :1;
  4361. unsigned32 FragmentOperation :3;
  4362. unsigned32 SpanOperation :3;
  4363. unsigned32 MotionComp8Bits :1;
  4364. unsigned32 XOffset :3;
  4365. unsigned32 YOffset :3;
  4366. unsigned32 PatternBase :8;
  4367. unsigned32 SpanCCXAlignment :1;
  4368. unsigned32 SpanVCXAlignment :1;
  4369. unsigned32 :4;
  4370. #endif
  4371. #ifdef __cplusplus
  4372. LUTMode(void) { }
  4373. LUTMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4374. LUTMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4375. LUTMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4376. LUTMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4377. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4378. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<27|0x1<<26|0xff<<18|0x7<<15|0x7<<12|0x1<<11|0x7<<8|0x7<<5|0x1<<4|0x3<<2|0x1<<1|0x1<<0)); }
  4379. #endif /* __cplusplus */
  4380. };
  4381. struct TextureLayoutMode {
  4382. #if BIG_ENDIAN == 1
  4383. unsigned32 Layout15 :2;
  4384. unsigned32 Layout14 :2;
  4385. unsigned32 Layout13 :2;
  4386. unsigned32 Layout12 :2;
  4387. unsigned32 Layout11 :2;
  4388. unsigned32 Layout10 :2;
  4389. unsigned32 Layout9 :2;
  4390. unsigned32 Layout8 :2;
  4391. unsigned32 Layout7 :2;
  4392. unsigned32 Layout6 :2;
  4393. unsigned32 Layout5 :2;
  4394. unsigned32 Layout4 :2;
  4395. unsigned32 Layout3 :2;
  4396. unsigned32 Layout2 :2;
  4397. unsigned32 Layout1 :2;
  4398. unsigned32 Layout0 :2;
  4399. #else
  4400. unsigned32 Layout0 :2;
  4401. unsigned32 Layout1 :2;
  4402. unsigned32 Layout2 :2;
  4403. unsigned32 Layout3 :2;
  4404. unsigned32 Layout4 :2;
  4405. unsigned32 Layout5 :2;
  4406. unsigned32 Layout6 :2;
  4407. unsigned32 Layout7 :2;
  4408. unsigned32 Layout8 :2;
  4409. unsigned32 Layout9 :2;
  4410. unsigned32 Layout10 :2;
  4411. unsigned32 Layout11 :2;
  4412. unsigned32 Layout12 :2;
  4413. unsigned32 Layout13 :2;
  4414. unsigned32 Layout14 :2;
  4415. unsigned32 Layout15 :2;
  4416. #endif
  4417. #ifdef __cplusplus
  4418. TextureLayoutMode(void) { }
  4419. TextureLayoutMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4420. TextureLayoutMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4421. TextureLayoutMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4422. TextureLayoutMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4423. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4424. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<30|0x3<<28|0x3<<26|0x3<<24|0x3<<22|0x3<<20|0x3<<18|0x3<<16|0x3<<14|0x3<<12|0x3<<10|0x3<<8|0x3<<6|0x3<<4|0x3<<2|0x3<<0)); }
  4425. #endif /* __cplusplus */
  4426. };
  4427. struct TextureMapWidth {
  4428. #if BIG_ENDIAN == 1
  4429. unsigned32 :16;
  4430. unsigned32 HostTexture :1;
  4431. unsigned32 Layout :2;
  4432. unsigned32 Border :1;
  4433. unsigned32 Width :12;
  4434. #else
  4435. unsigned32 Width :12;
  4436. unsigned32 Border :1;
  4437. unsigned32 Layout :2;
  4438. unsigned32 HostTexture :1;
  4439. unsigned32 :16;
  4440. #endif
  4441. #ifdef __cplusplus
  4442. TextureMapWidth(void) { }
  4443. TextureMapWidth(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4444. TextureMapWidth& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4445. TextureMapWidth& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4446. TextureMapWidth& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4447. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4448. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<15|0x3<<13|0x1<<12|0xfff<<0)); }
  4449. #endif /* __cplusplus */
  4450. };
  4451. struct TextureCacheReplacementMode {
  4452. #if BIG_ENDIAN == 1
  4453. unsigned32 :19;
  4454. unsigned32 ShowCacheInfo :1;
  4455. unsigned32 ScratchLines1 :5;
  4456. unsigned32 KeepOldest1 :1;
  4457. unsigned32 ScratchLines0 :5;
  4458. unsigned32 KeepOldest0 :1;
  4459. #else
  4460. unsigned32 KeepOldest0 :1;
  4461. unsigned32 ScratchLines0 :5;
  4462. unsigned32 KeepOldest1 :1;
  4463. unsigned32 ScratchLines1 :5;
  4464. unsigned32 ShowCacheInfo :1;
  4465. unsigned32 :19;
  4466. #endif
  4467. #ifdef __cplusplus
  4468. TextureCacheReplacementMode(void) { }
  4469. TextureCacheReplacementMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4470. TextureCacheReplacementMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4471. TextureCacheReplacementMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4472. TextureCacheReplacementMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4473. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4474. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<12|0x1f<<7|0x1<<6|0x1f<<1|0x1<<0)); }
  4475. #endif /* __cplusplus */
  4476. };
  4477. struct PhysicalPageAllocation {
  4478. #if BIG_ENDIAN == 1
  4479. unsigned32 :16;
  4480. unsigned32 Page :16;
  4481. #else
  4482. unsigned32 Page :16;
  4483. unsigned32 :16;
  4484. #endif
  4485. #ifdef __cplusplus
  4486. PhysicalPageAllocation(void) { }
  4487. PhysicalPageAllocation(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4488. PhysicalPageAllocation& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4489. PhysicalPageAllocation& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4490. PhysicalPageAllocation& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4491. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4492. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xffff<<0)); }
  4493. #endif /* __cplusplus */
  4494. };
  4495. struct PhysicalPageListEntry1 {
  4496. #if BIG_ENDIAN == 1
  4497. unsigned32 PrevPage :16;
  4498. unsigned32 NextPage :16;
  4499. #else
  4500. unsigned32 NextPage :16;
  4501. unsigned32 PrevPage :16;
  4502. #endif
  4503. #ifdef __cplusplus
  4504. PhysicalPageListEntry1(void) { }
  4505. PhysicalPageListEntry1(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4506. PhysicalPageListEntry1& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4507. PhysicalPageListEntry1& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4508. PhysicalPageListEntry1& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4509. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4510. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xffff<<16|0xffff<<0)); }
  4511. #endif /* __cplusplus */
  4512. };
  4513. struct LogicalPageTableEntry0 {
  4514. #if BIG_ENDIAN == 1
  4515. unsigned32 :15;
  4516. unsigned32 Resident :1;
  4517. unsigned32 PhysicalPage :16;
  4518. #else
  4519. unsigned32 PhysicalPage :16;
  4520. unsigned32 Resident :1;
  4521. unsigned32 :15;
  4522. #endif
  4523. #ifdef __cplusplus
  4524. LogicalPageTableEntry0(void) { }
  4525. LogicalPageTableEntry0(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4526. LogicalPageTableEntry0& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4527. LogicalPageTableEntry0& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4528. LogicalPageTableEntry0& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4529. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4530. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<16|0xffff<<0)); }
  4531. #endif /* __cplusplus */
  4532. };
  4533. struct LogicalPageTableEntry1 {
  4534. #if BIG_ENDIAN == 1
  4535. unsigned32 HostPage :20;
  4536. unsigned32 VirtualHostPage :1;
  4537. unsigned32 MemoryPool :2;
  4538. unsigned32 Length :9;
  4539. #else
  4540. unsigned32 Length :9;
  4541. unsigned32 MemoryPool :2;
  4542. unsigned32 VirtualHostPage :1;
  4543. unsigned32 HostPage :20;
  4544. #endif
  4545. #ifdef __cplusplus
  4546. LogicalPageTableEntry1(void) { }
  4547. LogicalPageTableEntry1(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4548. LogicalPageTableEntry1& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4549. LogicalPageTableEntry1& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4550. LogicalPageTableEntry1& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4551. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4552. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xfffff<<12|0x1<<11|0x3<<9|0x1ff<<0)); }
  4553. #endif /* __cplusplus */
  4554. };
  4555. struct LBDestReadMode {
  4556. #if BIG_ENDIAN == 1
  4557. unsigned32 :8;
  4558. unsigned32 Width :12;
  4559. unsigned32 Packed16 :1;
  4560. unsigned32 UseReadEnables :1;
  4561. unsigned32 Origin :1;
  4562. unsigned32 Layout :1;
  4563. unsigned32 StripeHeight :3;
  4564. unsigned32 StripePitch :3;
  4565. unsigned32 PrefetchEnable :1;
  4566. unsigned32 Enable :1;
  4567. #else
  4568. unsigned32 Enable :1;
  4569. unsigned32 PrefetchEnable :1;
  4570. unsigned32 StripePitch :3;
  4571. unsigned32 StripeHeight :3;
  4572. unsigned32 Layout :1;
  4573. unsigned32 Origin :1;
  4574. unsigned32 UseReadEnables :1;
  4575. unsigned32 Packed16 :1;
  4576. unsigned32 Width :12;
  4577. unsigned32 :8;
  4578. #endif
  4579. #ifdef __cplusplus
  4580. LBDestReadMode(void) { }
  4581. LBDestReadMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4582. LBDestReadMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4583. LBDestReadMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4584. LBDestReadMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4585. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4586. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xfff<<12|0x1<<11|0x1<<10|0x1<<9|0x1<<8|0x7<<5|0x7<<2|0x1<<1|0x1<<0)); }
  4587. #endif /* __cplusplus */
  4588. };
  4589. struct LBDestReadEnables {
  4590. #if BIG_ENDIAN == 1
  4591. unsigned32 :16;
  4592. unsigned32 R :8;
  4593. unsigned32 E :8;
  4594. #else
  4595. unsigned32 E :8;
  4596. unsigned32 R :8;
  4597. unsigned32 :16;
  4598. #endif
  4599. #ifdef __cplusplus
  4600. LBDestReadEnables(void) { }
  4601. LBDestReadEnables(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4602. LBDestReadEnables& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4603. LBDestReadEnables& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4604. LBDestReadEnables& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4605. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4606. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xff<<8|0xff<<0)); }
  4607. #endif /* __cplusplus */
  4608. };
  4609. struct LBSourceReadMode {
  4610. #if BIG_ENDIAN == 1
  4611. unsigned32 :9;
  4612. unsigned32 Width :12;
  4613. unsigned32 Packed16 :1;
  4614. unsigned32 Origin :1;
  4615. unsigned32 Layout :1;
  4616. unsigned32 StripeHeight :3;
  4617. unsigned32 StripePitch :3;
  4618. unsigned32 PrefetchEnable :1;
  4619. unsigned32 Enable :1;
  4620. #else
  4621. unsigned32 Enable :1;
  4622. unsigned32 PrefetchEnable :1;
  4623. unsigned32 StripePitch :3;
  4624. unsigned32 StripeHeight :3;
  4625. unsigned32 Layout :1;
  4626. unsigned32 Origin :1;
  4627. unsigned32 Packed16 :1;
  4628. unsigned32 Width :12;
  4629. unsigned32 :9;
  4630. #endif
  4631. #ifdef __cplusplus
  4632. LBSourceReadMode(void) { }
  4633. LBSourceReadMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4634. LBSourceReadMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4635. LBSourceReadMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4636. LBSourceReadMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4637. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4638. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xfff<<11|0x1<<10|0x1<<9|0x1<<8|0x7<<5|0x7<<2|0x1<<1|0x1<<0)); }
  4639. #endif /* __cplusplus */
  4640. };
  4641. struct GIDMode {
  4642. #if BIG_ENDIAN == 1
  4643. unsigned32 :18;
  4644. unsigned32 ReplaceValue :4;
  4645. unsigned32 ReplaceMode :2;
  4646. unsigned32 CompareMode :2;
  4647. unsigned32 CompareValue :4;
  4648. unsigned32 SpanEnable :1;
  4649. unsigned32 FragmentEnable :1;
  4650. #else
  4651. unsigned32 FragmentEnable :1;
  4652. unsigned32 SpanEnable :1;
  4653. unsigned32 CompareValue :4;
  4654. unsigned32 CompareMode :2;
  4655. unsigned32 ReplaceMode :2;
  4656. unsigned32 ReplaceValue :4;
  4657. unsigned32 :18;
  4658. #endif
  4659. #ifdef __cplusplus
  4660. GIDMode(void) { }
  4661. GIDMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4662. GIDMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4663. GIDMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4664. GIDMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4665. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4666. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xf<<10|0x3<<8|0x3<<6|0xf<<2|0x1<<1|0x1<<0)); }
  4667. #endif /* __cplusplus */
  4668. };
  4669. struct Config2D {
  4670. #if BIG_ENDIAN == 1
  4671. unsigned32 :11;
  4672. unsigned32 LUTModeEnable :1;
  4673. unsigned32 FBSourceReadModeExternalSourceData :1;
  4674. unsigned32 FBSourceReadModeBlocking :1;
  4675. unsigned32 FBWriteModeWriteEnable :1;
  4676. unsigned32 LogicalOpModeUseConstantSource :1;
  4677. unsigned32 LogicalOpBackgroundLogicalOp :4;
  4678. unsigned32 LogicalOpBackgroundEnable :1;
  4679. unsigned32 LogicalOpForegroundLogicalOp :4;
  4680. unsigned32 LogicalOpForegroundEnable :1;
  4681. unsigned32 DitherModeEnable :1;
  4682. unsigned32 AlphaBlendEnable :1;
  4683. unsigned32 FBDestReadModeReadEnable :1;
  4684. unsigned32 ScissorModeUserScissorEnable :1;
  4685. unsigned32 RasterizerModeMultiRXBlit :1;
  4686. unsigned32 RasterizerModeOpaqueSpans :1;
  4687. #else
  4688. unsigned32 RasterizerModeOpaqueSpans :1;
  4689. unsigned32 RasterizerModeMultiRXBlit :1;
  4690. unsigned32 ScissorModeUserScissorEnable :1;
  4691. unsigned32 FBDestReadModeReadEnable :1;
  4692. unsigned32 AlphaBlendEnable :1;
  4693. unsigned32 DitherModeEnable :1;
  4694. unsigned32 LogicalOpForegroundEnable :1;
  4695. unsigned32 LogicalOpForegroundLogicalOp :4;
  4696. unsigned32 LogicalOpBackgroundEnable :1;
  4697. unsigned32 LogicalOpBackgroundLogicalOp :4;
  4698. unsigned32 LogicalOpModeUseConstantSource :1;
  4699. unsigned32 FBWriteModeWriteEnable :1;
  4700. unsigned32 FBSourceReadModeBlocking :1;
  4701. unsigned32 FBSourceReadModeExternalSourceData :1;
  4702. unsigned32 LUTModeEnable :1;
  4703. unsigned32 :11;
  4704. #endif
  4705. #ifdef __cplusplus
  4706. Config2D(void) { }
  4707. Config2D(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4708. Config2D& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4709. Config2D& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4710. Config2D& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4711. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4712. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<20|0x1<<19|0x1<<18|0x1<<17|0x1<<16|0xf<<12|0x1<<11|0xf<<7|0x1<<6|0x1<<5|0x1<<4|0x1<<3|0x1<<2|0x1<<1|0x1<<0)); }
  4713. #endif /* __cplusplus */
  4714. };
  4715. struct Render2D {
  4716. #if BIG_ENDIAN == 1
  4717. unsigned32 TextureEnable :1;
  4718. unsigned32 AreaStippleEnable :1;
  4719. unsigned32 IncreasingY :1;
  4720. unsigned32 IncreasingX :1;
  4721. unsigned32 Height :12;
  4722. unsigned32 SpanOperation :1;
  4723. unsigned32 FBReadSourceEnable :1;
  4724. unsigned32 Operation :2;
  4725. unsigned32 Width :12;
  4726. #else
  4727. unsigned32 Width :12;
  4728. unsigned32 Operation :2;
  4729. unsigned32 FBReadSourceEnable :1;
  4730. unsigned32 SpanOperation :1;
  4731. unsigned32 Height :12;
  4732. unsigned32 IncreasingX :1;
  4733. unsigned32 IncreasingY :1;
  4734. unsigned32 AreaStippleEnable :1;
  4735. unsigned32 TextureEnable :1;
  4736. #endif
  4737. #ifdef __cplusplus
  4738. Render2D(void) { }
  4739. Render2D(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4740. Render2D& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4741. Render2D& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4742. Render2D& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4743. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4744. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<31|0x1<<30|0x1<<29|0x1<<28|0xfff<<16|0x1<<15|0x1<<14|0x3<<12|0xfff<<0)); }
  4745. #endif /* __cplusplus */
  4746. };
  4747. struct Render2DGlyph {
  4748. #if BIG_ENDIAN == 1
  4749. signed32 AdvanceY :9;
  4750. signed32 AdvanceX :9;
  4751. unsigned32 Height :7;
  4752. unsigned32 Width :7;
  4753. #else
  4754. unsigned32 Width :7;
  4755. unsigned32 Height :7;
  4756. signed32 AdvanceX :9;
  4757. signed32 AdvanceY :9;
  4758. #endif
  4759. #ifdef __cplusplus
  4760. Render2DGlyph(void) { }
  4761. Render2DGlyph(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4762. Render2DGlyph& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4763. Render2DGlyph& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4764. Render2DGlyph& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4765. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4766. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1ff<<23|0x1ff<<14|0x7f<<7|0x7f<<0)); }
  4767. #endif /* __cplusplus */
  4768. };
  4769. struct DMAMemoryControl {
  4770. #if BIG_ENDIAN == 1
  4771. unsigned32 WriteDMAAlignment :1;
  4772. unsigned32 :2;
  4773. unsigned32 BurstSize :5;
  4774. unsigned32 :12;
  4775. unsigned32 ReadDMAAlignment :1;
  4776. unsigned32 :1;
  4777. unsigned32 ReadDMAMemory :1;
  4778. unsigned32 VertexAlignment :1;
  4779. unsigned32 :1;
  4780. unsigned32 VertexMemory :1;
  4781. unsigned32 IndexAlignment :1;
  4782. unsigned32 :1;
  4783. unsigned32 IndexMemory :1;
  4784. unsigned32 InputDMAAlignment :1;
  4785. unsigned32 :1;
  4786. unsigned32 InputDMAMemory :1;
  4787. #else
  4788. unsigned32 InputDMAMemory :1;
  4789. unsigned32 :1;
  4790. unsigned32 InputDMAAlignment :1;
  4791. unsigned32 IndexMemory :1;
  4792. unsigned32 :1;
  4793. unsigned32 IndexAlignment :1;
  4794. unsigned32 VertexMemory :1;
  4795. unsigned32 :1;
  4796. unsigned32 VertexAlignment :1;
  4797. unsigned32 ReadDMAMemory :1;
  4798. unsigned32 :1;
  4799. unsigned32 ReadDMAAlignment :1;
  4800. unsigned32 :12;
  4801. unsigned32 BurstSize :5;
  4802. unsigned32 :2;
  4803. unsigned32 WriteDMAAlignment :1;
  4804. #endif
  4805. #ifdef __cplusplus
  4806. DMAMemoryControl(void) { }
  4807. DMAMemoryControl(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4808. DMAMemoryControl& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4809. DMAMemoryControl& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4810. DMAMemoryControl& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4811. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4812. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<31|0x1f<<24|0x1<<11|0x1<<9|0x1<<8|0x1<<6|0x1<<5|0x1<<3|0x1<<2|0x1<<0)); }
  4813. #endif /* __cplusplus */
  4814. };
  4815. struct IndexBaseAddress {
  4816. #if BIG_ENDIAN == 1
  4817. unsigned32 Address :31;
  4818. unsigned32 :1;
  4819. #else
  4820. unsigned32 :1;
  4821. unsigned32 Address :31;
  4822. #endif
  4823. #ifdef __cplusplus
  4824. IndexBaseAddress(void) { }
  4825. IndexBaseAddress(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4826. IndexBaseAddress& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4827. IndexBaseAddress& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4828. IndexBaseAddress& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4829. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4830. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x7fffffff<<1)); }
  4831. #endif /* __cplusplus */
  4832. };
  4833. struct VertexBaseAddress {
  4834. #if BIG_ENDIAN == 1
  4835. unsigned32 Address :30;
  4836. unsigned32 :2;
  4837. #else
  4838. unsigned32 :2;
  4839. unsigned32 Address :30;
  4840. #endif
  4841. #ifdef __cplusplus
  4842. VertexBaseAddress(void) { }
  4843. VertexBaseAddress(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4844. VertexBaseAddress& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4845. VertexBaseAddress& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4846. VertexBaseAddress& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4847. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4848. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3fffffff<<2)); }
  4849. #endif /* __cplusplus */
  4850. };
  4851. struct VertexControl {
  4852. #if BIG_ENDIAN == 1
  4853. unsigned32 :21;
  4854. unsigned32 Line2D :1;
  4855. unsigned32 OGL :1;
  4856. unsigned32 SkipFlags :1;
  4857. unsigned32 ReadAll :1;
  4858. unsigned32 Flat :1;
  4859. unsigned32 CacheEnable :1;
  4860. unsigned32 Size :5;
  4861. #else
  4862. unsigned32 Size :5;
  4863. unsigned32 CacheEnable :1;
  4864. unsigned32 Flat :1;
  4865. unsigned32 ReadAll :1;
  4866. unsigned32 SkipFlags :1;
  4867. unsigned32 OGL :1;
  4868. unsigned32 Line2D :1;
  4869. unsigned32 :21;
  4870. #endif
  4871. #ifdef __cplusplus
  4872. VertexControl(void) { }
  4873. VertexControl(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4874. VertexControl& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4875. VertexControl& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4876. VertexControl& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4877. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4878. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<10|0x1<<9|0x1<<8|0x1<<7|0x1<<6|0x1<<5|0x1f<<0)); }
  4879. #endif /* __cplusplus */
  4880. };
  4881. struct VertexTagList {
  4882. #if BIG_ENDIAN == 1
  4883. unsigned32 :21;
  4884. unsigned32 Tag :11;
  4885. #else
  4886. unsigned32 Tag :11;
  4887. unsigned32 :21;
  4888. #endif
  4889. #ifdef __cplusplus
  4890. VertexTagList(void) { }
  4891. VertexTagList(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4892. VertexTagList& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4893. VertexTagList& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4894. VertexTagList& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4895. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4896. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x7ff<<0)); }
  4897. #endif /* __cplusplus */
  4898. };
  4899. struct IndexedDoubleVertex {
  4900. #if BIG_ENDIAN == 1
  4901. unsigned32 Index1 :16;
  4902. unsigned32 Index0 :16;
  4903. #else
  4904. unsigned32 Index0 :16;
  4905. unsigned32 Index1 :16;
  4906. #endif
  4907. #ifdef __cplusplus
  4908. IndexedDoubleVertex(void) { }
  4909. IndexedDoubleVertex(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4910. IndexedDoubleVertex& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4911. IndexedDoubleVertex& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4912. IndexedDoubleVertex& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4913. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4914. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xffff<<16|0xffff<<0)); }
  4915. #endif /* __cplusplus */
  4916. };
  4917. struct HostInState {
  4918. #if BIG_ENDIAN == 1
  4919. unsigned32 :1;
  4920. unsigned32 ReadDMAPitch :2;
  4921. unsigned32 ReadDMAAddress :2;
  4922. unsigned32 :12;
  4923. unsigned32 DataCount :6;
  4924. unsigned32 ProvokingVertexSent :1;
  4925. unsigned32 PrimitiveType :3;
  4926. unsigned32 PrimitiveStarted :1;
  4927. unsigned32 InvertBackfaceCull :1;
  4928. unsigned32 :1;
  4929. unsigned32 Vertex :2;
  4930. #else
  4931. unsigned32 Vertex :2;
  4932. unsigned32 :1;
  4933. unsigned32 InvertBackfaceCull :1;
  4934. unsigned32 PrimitiveStarted :1;
  4935. unsigned32 PrimitiveType :3;
  4936. unsigned32 ProvokingVertexSent :1;
  4937. unsigned32 DataCount :6;
  4938. unsigned32 :12;
  4939. unsigned32 ReadDMAAddress :2;
  4940. unsigned32 ReadDMAPitch :2;
  4941. unsigned32 :1;
  4942. #endif
  4943. #ifdef __cplusplus
  4944. HostInState(void) { }
  4945. HostInState(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4946. HostInState& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4947. HostInState& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4948. HostInState& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4949. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4950. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<29|0x3<<27|0x3f<<9|0x1<<8|0x7<<5|0x1<<4|0x1<<3|0x3<<0)); }
  4951. #endif /* __cplusplus */
  4952. };
  4953. struct Security {
  4954. #if BIG_ENDIAN == 1
  4955. unsigned32 :31;
  4956. unsigned32 Secure :1;
  4957. #else
  4958. unsigned32 Secure :1;
  4959. unsigned32 :31;
  4960. #endif
  4961. #ifdef __cplusplus
  4962. Security(void) { }
  4963. Security(const unsigned32 i) { *((unsigned32 *)this) = i; }
  4964. Security& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  4965. Security& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  4966. Security& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  4967. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  4968. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<0)); }
  4969. #endif /* __cplusplus */
  4970. };
  4971. struct SClkProfileMask {
  4972. #if BIG_ENDIAN == 1
  4973. unsigned32 :1;
  4974. unsigned32 Mode :1;
  4975. unsigned32 :7;
  4976. unsigned32 SetupOutputFull :1;
  4977. unsigned32 SetupInputEmpty :1;
  4978. unsigned32 PCIReadCtrlFull :1;
  4979. unsigned32 PCIDataEmpty :1;
  4980. unsigned32 VertexAddressEmpty :1;
  4981. unsigned32 IndexAddressEmpty :1;
  4982. unsigned32 DMAAddressEmpty :1;
  4983. unsigned32 VertexDataEmpty :1;
  4984. unsigned32 OutputFull :1;
  4985. unsigned32 VertexEmpty :1;
  4986. unsigned32 IndexDataEmpty :1;
  4987. unsigned32 VertexFull :1;
  4988. unsigned32 VertexAddressFull :1;
  4989. unsigned32 IndexEmpty :1;
  4990. unsigned32 DMAWriteCtrlFull :1;
  4991. unsigned32 DMADataEmpty :1;
  4992. unsigned32 IndexFull :1;
  4993. unsigned32 IndexAddressFull :1;
  4994. unsigned32 DMAEmpty :1;
  4995. unsigned32 DMAFull :1;
  4996. unsigned32 DMAAddressFull :1;
  4997. unsigned32 InputEmpty :1;
  4998. unsigned32 Always :1;
  4999. #else
  5000. unsigned32 Always :1;
  5001. unsigned32 InputEmpty :1;
  5002. unsigned32 DMAAddressFull :1;
  5003. unsigned32 DMAFull :1;
  5004. unsigned32 DMAEmpty :1;
  5005. unsigned32 IndexAddressFull :1;
  5006. unsigned32 IndexFull :1;
  5007. unsigned32 DMADataEmpty :1;
  5008. unsigned32 DMAWriteCtrlFull :1;
  5009. unsigned32 IndexEmpty :1;
  5010. unsigned32 VertexAddressFull :1;
  5011. unsigned32 VertexFull :1;
  5012. unsigned32 IndexDataEmpty :1;
  5013. unsigned32 VertexEmpty :1;
  5014. unsigned32 OutputFull :1;
  5015. unsigned32 VertexDataEmpty :1;
  5016. unsigned32 DMAAddressEmpty :1;
  5017. unsigned32 IndexAddressEmpty :1;
  5018. unsigned32 VertexAddressEmpty :1;
  5019. unsigned32 PCIDataEmpty :1;
  5020. unsigned32 PCIReadCtrlFull :1;
  5021. unsigned32 SetupInputEmpty :1;
  5022. unsigned32 SetupOutputFull :1;
  5023. unsigned32 :7;
  5024. unsigned32 Mode :1;
  5025. unsigned32 :1;
  5026. #endif
  5027. #ifdef __cplusplus
  5028. SClkProfileMask(void) { }
  5029. SClkProfileMask(const unsigned32 i) { *((unsigned32 *)this) = i; }
  5030. SClkProfileMask& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  5031. SClkProfileMask& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  5032. SClkProfileMask& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  5033. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  5034. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<30|0x1<<22|0x1<<21|0x1<<20|0x1<<19|0x1<<18|0x1<<17|0x1<<16|0x1<<15|0x1<<14|0x1<<13|0x1<<12|0x1<<11|0x1<<10|0x1<<9|0x1<<8|0x1<<7|0x1<<6|0x1<<5|0x1<<4|0x1<<3|0x1<<2|0x1<<1|0x1<<0)); }
  5035. #endif /* __cplusplus */
  5036. };
  5037. struct TextureDownloadControl {
  5038. #if BIG_ENDIAN == 1
  5039. unsigned32 :18;
  5040. unsigned32 SlavetextureDownload :1;
  5041. unsigned32 TextureThreshold :5;
  5042. unsigned32 TextureGranularity :5;
  5043. unsigned32 TextureMemType :1;
  5044. unsigned32 TextureDownloadBusy :1;
  5045. unsigned32 TextureDownloadEnable :1;
  5046. #else
  5047. unsigned32 TextureDownloadEnable :1;
  5048. unsigned32 TextureDownloadBusy :1;
  5049. unsigned32 TextureMemType :1;
  5050. unsigned32 TextureGranularity :5;
  5051. unsigned32 TextureThreshold :5;
  5052. unsigned32 SlavetextureDownload :1;
  5053. unsigned32 :18;
  5054. #endif
  5055. #ifdef __cplusplus
  5056. TextureDownloadControl(void) { }
  5057. TextureDownloadControl(const unsigned32 i) { *((unsigned32 *)this) = i; }
  5058. TextureDownloadControl& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  5059. TextureDownloadControl& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  5060. TextureDownloadControl& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  5061. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  5062. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<13|0x1f<<8|0x1f<<3|0x1<<2|0x1<<1|0x1<<0)); }
  5063. #endif /* __cplusplus */
  5064. };
  5065. struct DeltaFormatControl {
  5066. #if BIG_ENDIAN == 1
  5067. unsigned32 :15;
  5068. unsigned32 TextureShift1 :1;
  5069. unsigned32 BackfaceCull :1;
  5070. unsigned32 PerPolyMipMap1 :1;
  5071. unsigned32 PerPolyMipMap :1;
  5072. unsigned32 ShareQ :1;
  5073. unsigned32 ShareT :1;
  5074. unsigned32 ShareS :1;
  5075. unsigned32 ForceQ :1;
  5076. unsigned32 ScaleByQ1 :1;
  5077. unsigned32 ScaleByQ :1;
  5078. unsigned32 TextureShift :1;
  5079. unsigned32 WrapT1 :1;
  5080. unsigned32 WrapS1 :1;
  5081. unsigned32 WrapT :1;
  5082. unsigned32 WrapS :1;
  5083. unsigned32 EqualQ :1;
  5084. unsigned32 Enable :1;
  5085. #else
  5086. unsigned32 Enable :1;
  5087. unsigned32 EqualQ :1;
  5088. unsigned32 WrapS :1;
  5089. unsigned32 WrapT :1;
  5090. unsigned32 WrapS1 :1;
  5091. unsigned32 WrapT1 :1;
  5092. unsigned32 TextureShift :1;
  5093. unsigned32 ScaleByQ :1;
  5094. unsigned32 ScaleByQ1 :1;
  5095. unsigned32 ForceQ :1;
  5096. unsigned32 ShareS :1;
  5097. unsigned32 ShareT :1;
  5098. unsigned32 ShareQ :1;
  5099. unsigned32 PerPolyMipMap :1;
  5100. unsigned32 PerPolyMipMap1 :1;
  5101. unsigned32 BackfaceCull :1;
  5102. unsigned32 TextureShift1 :1;
  5103. unsigned32 :15;
  5104. #endif
  5105. #ifdef __cplusplus
  5106. DeltaFormatControl(void) { }
  5107. DeltaFormatControl(const unsigned32 i) { *((unsigned32 *)this) = i; }
  5108. DeltaFormatControl& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  5109. DeltaFormatControl& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  5110. DeltaFormatControl& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  5111. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  5112. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<16|0x1<<15|0x1<<14|0x1<<13|0x1<<12|0x1<<11|0x1<<10|0x1<<9|0x1<<8|0x1<<7|0x1<<6|0x1<<5|0x1<<4|0x1<<3|0x1<<2|0x1<<1|0x1<<0)); }
  5113. #endif /* __cplusplus */
  5114. };
  5115. struct DeltaFormatMode {
  5116. #if BIG_ENDIAN == 1
  5117. unsigned32 :2;
  5118. unsigned32 :3;
  5119. unsigned32 TextureEnable1 :1;
  5120. unsigned32 :20;
  5121. unsigned32 TextureEnable :1;
  5122. unsigned32 :5;
  5123. #else
  5124. unsigned32 :5;
  5125. unsigned32 TextureEnable :1;
  5126. unsigned32 :20;
  5127. unsigned32 TextureEnable1 :1;
  5128. unsigned32 :3;
  5129. unsigned32 :2;
  5130. #endif
  5131. #ifdef __cplusplus
  5132. DeltaFormatMode(void) { }
  5133. DeltaFormatMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  5134. DeltaFormatMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  5135. DeltaFormatMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  5136. DeltaFormatMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  5137. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  5138. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<26|0x1<<5)); }
  5139. #endif /* __cplusplus */
  5140. };
  5141. struct StripeOwnership {
  5142. #if BIG_ENDIAN == 1
  5143. unsigned32 :24;
  5144. unsigned32 Stripe1 :3;
  5145. unsigned32 Stripe1Enable :1;
  5146. unsigned32 Stripe0 :3;
  5147. unsigned32 Stripe0Enable :1;
  5148. #else
  5149. unsigned32 Stripe0Enable :1;
  5150. unsigned32 Stripe0 :3;
  5151. unsigned32 Stripe1Enable :1;
  5152. unsigned32 Stripe1 :3;
  5153. unsigned32 :24;
  5154. #endif
  5155. #ifdef __cplusplus
  5156. StripeOwnership(void) { }
  5157. StripeOwnership(const unsigned32 i) { *((unsigned32 *)this) = i; }
  5158. StripeOwnership& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  5159. StripeOwnership& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  5160. StripeOwnership& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  5161. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  5162. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x7<<5|0x1<<4|0x7<<1|0x1<<0)); }
  5163. #endif /* __cplusplus */
  5164. };
  5165. struct Extend {
  5166. #if BIG_ENDIAN == 1
  5167. unsigned32 :21;
  5168. unsigned32 Integer :8;
  5169. unsigned32 Fraction :3;
  5170. #else
  5171. unsigned32 Fraction :3;
  5172. unsigned32 Integer :8;
  5173. unsigned32 :21;
  5174. #endif
  5175. #ifdef __cplusplus
  5176. Extend(void) { }
  5177. Extend(const unsigned32 i) { *((unsigned32 *)this) = i; }
  5178. Extend& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  5179. Extend& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  5180. Extend& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  5181. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  5182. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0xff<<3|0x7<<0)); }
  5183. #endif /* __cplusplus */
  5184. };
  5185. struct MatrixStatus {
  5186. #if BIG_ENDIAN == 1
  5187. unsigned32 :29;
  5188. unsigned32 BoundingBoxOverrun :1;
  5189. unsigned32 StackUnderflow :1;
  5190. unsigned32 StackOverflow :1;
  5191. #else
  5192. unsigned32 StackOverflow :1;
  5193. unsigned32 StackUnderflow :1;
  5194. unsigned32 BoundingBoxOverrun :1;
  5195. unsigned32 :29;
  5196. #endif
  5197. #ifdef __cplusplus
  5198. MatrixStatus(void) { }
  5199. MatrixStatus(const unsigned32 i) { *((unsigned32 *)this) = i; }
  5200. MatrixStatus& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  5201. MatrixStatus& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  5202. MatrixStatus& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  5203. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  5204. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<2|0x1<<1|0x1<<0)); }
  5205. #endif /* __cplusplus */
  5206. };
  5207. struct GetMatrix {
  5208. #if BIG_ENDIAN == 1
  5209. unsigned32 :22;
  5210. unsigned32 Level :5;
  5211. unsigned32 Select :4;
  5212. unsigned32 AnyMatrix :1;
  5213. #else
  5214. unsigned32 AnyMatrix :1;
  5215. unsigned32 Select :4;
  5216. unsigned32 Level :5;
  5217. unsigned32 :22;
  5218. #endif
  5219. #ifdef __cplusplus
  5220. GetMatrix(void) { }
  5221. GetMatrix(const unsigned32 i) { *((unsigned32 *)this) = i; }
  5222. GetMatrix& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  5223. GetMatrix& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  5224. GetMatrix& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  5225. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  5226. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1f<<5|0xf<<1|0x1<<0)); }
  5227. #endif /* __cplusplus */
  5228. };
  5229. struct TextureFogMiscGeneralContext {
  5230. #if BIG_ENDIAN == 1
  5231. unsigned32 :17;
  5232. unsigned32 TextureTexGenSelect :3;
  5233. unsigned32 TextureMatrixSelect :3;
  5234. unsigned32 TextureModeSelect :3;
  5235. unsigned32 Vertex :2;
  5236. unsigned32 ValidatedTextureFog :1;
  5237. unsigned32 InPrimitive :1;
  5238. unsigned32 FogEnable :1;
  5239. unsigned32 TextureEnable :1;
  5240. #else
  5241. unsigned32 TextureEnable :1;
  5242. unsigned32 FogEnable :1;
  5243. unsigned32 InPrimitive :1;
  5244. unsigned32 ValidatedTextureFog :1;
  5245. unsigned32 Vertex :2;
  5246. unsigned32 TextureModeSelect :3;
  5247. unsigned32 TextureMatrixSelect :3;
  5248. unsigned32 TextureTexGenSelect :3;
  5249. unsigned32 :17;
  5250. #endif
  5251. #ifdef __cplusplus
  5252. TextureFogMiscGeneralContext(void) { }
  5253. TextureFogMiscGeneralContext(const unsigned32 i) { *((unsigned32 *)this) = i; }
  5254. TextureFogMiscGeneralContext& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  5255. TextureFogMiscGeneralContext& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  5256. TextureFogMiscGeneralContext& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  5257. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  5258. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x7<<12|0x7<<9|0x7<<6|0x3<<4|0x1<<3|0x1<<2|0x1<<1|0x1<<0)); }
  5259. #endif /* __cplusplus */
  5260. };
  5261. struct PipeMode {
  5262. #if BIG_ENDIAN == 1
  5263. unsigned32 :10;
  5264. unsigned32 ObjectIDPerPrimitive :1;
  5265. unsigned32 ObjectTagEnable :1;
  5266. unsigned32 FifoBusyLevel :5;
  5267. unsigned32 MaxPrimCount :7;
  5268. unsigned32 MinPrimCount :5;
  5269. unsigned32 NextPipe :1;
  5270. unsigned32 SwitchPipe :1;
  5271. unsigned32 UseOnePipeOnly :1;
  5272. #else
  5273. unsigned32 UseOnePipeOnly :1;
  5274. unsigned32 SwitchPipe :1;
  5275. unsigned32 NextPipe :1;
  5276. unsigned32 MinPrimCount :5;
  5277. unsigned32 MaxPrimCount :7;
  5278. unsigned32 FifoBusyLevel :5;
  5279. unsigned32 ObjectTagEnable :1;
  5280. unsigned32 ObjectIDPerPrimitive :1;
  5281. unsigned32 :10;
  5282. #endif
  5283. #ifdef __cplusplus
  5284. PipeMode(void) { }
  5285. PipeMode(const unsigned32 i) { *((unsigned32 *)this) = i; }
  5286. PipeMode& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  5287. PipeMode& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  5288. PipeMode& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  5289. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  5290. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<21|0x1<<20|0x1f<<15|0x7f<<8|0x1f<<3|0x1<<2|0x1<<1|0x1<<0)); }
  5291. #endif /* __cplusplus */
  5292. };
  5293. struct PipeLoad {
  5294. #if BIG_ENDIAN == 1
  5295. unsigned32 :19;
  5296. unsigned32 BlendEnable :1;
  5297. unsigned32 FogEnable :1;
  5298. unsigned32 SpecularEnable :1;
  5299. unsigned32 DiffuseEnable :1;
  5300. unsigned32 FaceNormalEnable :1;
  5301. unsigned32 TextureEnable7 :1;
  5302. unsigned32 TextureEnable6 :1;
  5303. unsigned32 TextureEnable5 :1;
  5304. unsigned32 TextureEnable4 :1;
  5305. unsigned32 TextureEnable3 :1;
  5306. unsigned32 TextureEnable2 :1;
  5307. unsigned32 TextureEnable1 :1;
  5308. unsigned32 ForceReload :1;
  5309. #else
  5310. unsigned32 ForceReload :1;
  5311. unsigned32 TextureEnable1 :1;
  5312. unsigned32 TextureEnable2 :1;
  5313. unsigned32 TextureEnable3 :1;
  5314. unsigned32 TextureEnable4 :1;
  5315. unsigned32 TextureEnable5 :1;
  5316. unsigned32 TextureEnable6 :1;
  5317. unsigned32 TextureEnable7 :1;
  5318. unsigned32 FaceNormalEnable :1;
  5319. unsigned32 DiffuseEnable :1;
  5320. unsigned32 SpecularEnable :1;
  5321. unsigned32 FogEnable :1;
  5322. unsigned32 BlendEnable :1;
  5323. unsigned32 :19;
  5324. #endif
  5325. #ifdef __cplusplus
  5326. PipeLoad(void) { }
  5327. PipeLoad(const unsigned32 i) { *((unsigned32 *)this) = i; }
  5328. PipeLoad& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  5329. PipeLoad& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  5330. PipeLoad& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  5331. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  5332. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x1<<12|0x1<<11|0x1<<10|0x1<<9|0x1<<8|0x1<<7|0x1<<6|0x1<<5|0x1<<4|0x1<<3|0x1<<2|0x1<<1|0x1<<0)); }
  5333. #endif /* __cplusplus */
  5334. };
  5335. struct CommandDMAControl {
  5336. #if BIG_ENDIAN == 1
  5337. unsigned32 :25;
  5338. unsigned32 BurstSize :3;
  5339. unsigned32 ByteSwap :2;
  5340. unsigned32 Alignment :1;
  5341. unsigned32 Protocol :1;
  5342. #else
  5343. unsigned32 Protocol :1;
  5344. unsigned32 Alignment :1;
  5345. unsigned32 ByteSwap :2;
  5346. unsigned32 BurstSize :3;
  5347. unsigned32 :25;
  5348. #endif
  5349. #ifdef __cplusplus
  5350. CommandDMAControl(void) { }
  5351. CommandDMAControl(const unsigned32 i) { *((unsigned32 *)this) = i; }
  5352. CommandDMAControl& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  5353. CommandDMAControl& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  5354. CommandDMAControl& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  5355. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  5356. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x7<<4|0x3<<2|0x1<<1|0x1<<0)); }
  5357. #endif /* __cplusplus */
  5358. };
  5359. struct CommandState {
  5360. #if BIG_ENDIAN == 1
  5361. unsigned32 :28;
  5362. unsigned32 Started :2;
  5363. unsigned32 Result :1;
  5364. unsigned32 Test :1;
  5365. #else
  5366. unsigned32 Test :1;
  5367. unsigned32 Result :1;
  5368. unsigned32 Started :2;
  5369. unsigned32 :28;
  5370. #endif
  5371. #ifdef __cplusplus
  5372. CommandState(void) { }
  5373. CommandState(const unsigned32 i) { *((unsigned32 *)this) = i; }
  5374. CommandState& operator=(const unsigned32 i) { *((unsigned32 *)this) = i; return (*this); }
  5375. CommandState& operator&=(const unsigned32 i) { *((unsigned32 *)this) &= i; return (*this); }
  5376. CommandState& operator|=(const unsigned32 i) { *((unsigned32 *)this) |= i; return (*this); }
  5377. unsigned32 ReadUnmasked(void) { return *((unsigned32 *)this); }
  5378. operator unsigned32(void) const { return (*((unsigned32 *)this) & (0x3<<2|0x1<<1|0x1<<0)); }
  5379. #endif /* __cplusplus */
  5380. };
  5381. #endif /* _REG_H_ */
  5382. #endif