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.

1811 lines
50 KiB

  1. #ifndef GIGIREG_H
  2. #define GIGIREG_H
  3. /******************************Module*Header*******************************\
  4. *
  5. * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  6. * !! !!
  7. * !! WARNING: NOT DDK SAMPLE CODE !!
  8. * !! !!
  9. * !! This source code is provided for completeness only and should not be !!
  10. * !! used as sample code for display driver development. Only those sources !!
  11. * !! marked as sample code for a given driver component should be used for !!
  12. * !! development purposes. !!
  13. * !! !!
  14. * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  15. *
  16. * Module Name: gigiregl.h
  17. *
  18. * Content:
  19. *
  20. * Copyright (c) 1994-1999 3Dlabs Inc. Ltd. All rights reserved.
  21. * Copyright (c) 1995-2003 Microsoft Corporation. All rights reserved.
  22. \*****************************************************************************/
  23. #if (defined(_MSDOS) || (defined(__cplusplus) && !defined(_WIN32)))
  24. typedef unsigned long unsigned32;
  25. typedef signed long signed32;
  26. #else
  27. typedef unsigned long unsigned32;
  28. typedef signed long signed32;
  29. #endif
  30. typedef unsigned short unsigned16;
  31. typedef signed short signed16;
  32. typedef unsigned char unsigned8;
  33. typedef signed char signed8;
  34. typedef long __GigiSignedIntegerFmat;
  35. typedef unsigned32 __GigiUnsignedIntegerFmat;
  36. /*
  37. ** Generic signed 16 + signed 16 format
  38. */
  39. #if BIG_ENDIAN == 1
  40. typedef struct {
  41. signed32 hi: 16;
  42. signed32 lo: 16;
  43. } __GigiS16S16Fmat;
  44. #else
  45. typedef struct {
  46. signed32 lo: 16;
  47. signed32 hi: 16;
  48. } __GigiS16S16Fmat;
  49. #endif
  50. /*
  51. ** Delta Registers
  52. */
  53. #ifdef BIG_ENDIAN
  54. typedef struct {
  55. unsigned32 pad: 13;
  56. unsigned32 ColorOrder: 1;
  57. unsigned32 BackfaceCull: 1;
  58. unsigned32 FillDirection: 1;
  59. unsigned32 TextureParameterMode: 2;
  60. unsigned32 ClampEnable: 1;
  61. unsigned32 NoDraw: 1;
  62. unsigned32 DiamondExit: 1;
  63. unsigned32 SubPixelCorrectionEnable: 1;
  64. unsigned32 DiffuseTextureEnable: 1;
  65. unsigned32 SpecularTextureEnable: 1;
  66. unsigned32 DepthEnable: 1;
  67. unsigned32 SmoothShadingEnable: 1;
  68. unsigned32 TextureEnable: 1;
  69. unsigned32 FogEnable: 1;
  70. unsigned32 DepthFormat: 2;
  71. unsigned32 TargetChip: 2;
  72. } __GigiDeltaModeFmat;
  73. #else
  74. typedef struct {
  75. unsigned32 TargetChip: 2;
  76. unsigned32 DepthFormat: 2;
  77. unsigned32 FogEnable: 1;
  78. unsigned32 TextureEnable: 1;
  79. unsigned32 SmoothShadingEnable: 1;
  80. unsigned32 DepthEnable: 1;
  81. unsigned32 SpecularTextureEnable: 1;
  82. unsigned32 DiffuseTextureEnable: 1;
  83. unsigned32 SubPixelCorrectionEnable: 1;
  84. unsigned32 DiamondExit: 1;
  85. unsigned32 NoDraw: 1;
  86. unsigned32 ClampEnable: 1;
  87. unsigned32 TextureParameterMode: 2;
  88. unsigned32 FillDirection: 1;
  89. unsigned32 BackfaceCull: 1;
  90. unsigned32 ColorOrder: 1;
  91. unsigned32 pad: 13;
  92. } __GigiDeltaModeFmat;
  93. #endif
  94. #ifdef BIG_ENDIAN
  95. typedef struct {
  96. unsigned32 pad2: 11;
  97. unsigned32 RejectNegativeFace: 1;
  98. unsigned32 pad1: 1;
  99. unsigned32 SpanOperation: 1;
  100. unsigned32 pad0: 1;
  101. unsigned32 SubPixelCorrectionEnable: 1;
  102. unsigned32 CoverageEnable: 1;
  103. unsigned32 FogEnable: 1;
  104. unsigned32 TextureEnable: 1;
  105. unsigned32 SyncOnHostData: 1;
  106. unsigned32 SyncOnBitMask: 1;
  107. unsigned32 UsePointTable: 1;
  108. unsigned32 AntialiasingQuality: 1;
  109. unsigned32 AntialiasEnable: 1;
  110. unsigned32 PrimitiveType: 2;
  111. unsigned32 reserved: 2;
  112. unsigned32 FastFillEnable: 1;
  113. unsigned32 ResetLineStipple: 1;
  114. unsigned32 LineStippleEnable: 1;
  115. unsigned32 AreaStippleEnable: 1;
  116. } __GigiDeltaDrawFmat;
  117. #else
  118. typedef struct {
  119. unsigned32 AreaStippleEnable: 1;
  120. unsigned32 LineStippleEnable: 1;
  121. unsigned32 ResetLineStipple: 1;
  122. unsigned32 FastFillEnable: 1;
  123. unsigned32 reserved: 2;
  124. unsigned32 PrimitiveType: 2;
  125. unsigned32 AntialiasEnable: 1;
  126. unsigned32 AntialiasingQuality: 1;
  127. unsigned32 UsePointTable: 1;
  128. unsigned32 SyncOnBitMask: 1;
  129. unsigned32 SyncOnHostData: 1;
  130. unsigned32 TextureEnable: 1;
  131. unsigned32 FogEnable: 1;
  132. unsigned32 CoverageEnable: 1;
  133. unsigned32 SubPixelCorrectionEnable: 1;
  134. unsigned32 pad0: 1;
  135. unsigned32 SpanOperation: 1;
  136. unsigned32 pad1: 1;
  137. unsigned32 RejectNegativeFace: 1;
  138. unsigned32 pad2: 11;
  139. } __GigiDeltaDrawFmat;
  140. #endif
  141. #ifdef BIG_ENDIAN
  142. typedef union {
  143. struct {
  144. signed32 Val: 32; /* 2.30s or 16.16s */
  145. } STQ;
  146. struct {
  147. unsigned32 pad: 8;
  148. unsigned32 Val: 24; /* 2.22s */
  149. } K;
  150. struct {
  151. unsigned32 pad: 1;
  152. unsigned32 Val: 31; /* 1.30us */
  153. } RGBA;
  154. struct {
  155. signed32 Val: 32; /* 10.22s */
  156. } F;
  157. struct {
  158. signed32 Val: 32; /* 16.16s */
  159. } XY;
  160. struct {
  161. unsigned32 pad: 1;
  162. unsigned32 Val: 31; /* 1.31us */
  163. } Z;
  164. } __GigiDeltaFixedFmat;
  165. #else
  166. typedef union {
  167. struct {
  168. signed32 Val: 32; /* 2.30s or 16.16s */
  169. } STQ;
  170. struct {
  171. unsigned32 Val: 24; /* 2.22s */
  172. unsigned32 pad: 8;
  173. } K;
  174. struct {
  175. unsigned32 Val: 31; /* 1.30us */
  176. unsigned32 pad: 1;
  177. } RGBA;
  178. struct {
  179. signed32 Val: 32; /* 10.22s */
  180. } F;
  181. struct {
  182. signed32 Val: 32; /* 16.16s */
  183. } XY;
  184. struct {
  185. unsigned32 Val: 31; /* 1.31us */
  186. unsigned32 pad: 1;
  187. } Z;
  188. } __GigiDeltaFixedFmat;
  189. #endif
  190. #define N_GIGI_DELTA_BROADCAST_MASK_BITS 4
  191. #ifdef BIG_ENDIAN
  192. typedef struct {
  193. unsigned32 pad: 32 - N_GIGI_DELTA_BROADCAST_MASK_BITS;
  194. unsigned32 Mask: N_GIGI_DELTA_BROADCAST_MASK_BITS ;
  195. } __GigiDeltaBroadcastMaskFmat;
  196. #else
  197. typedef struct {
  198. unsigned32 Mask: N_GIGI_DELTA_BROADCAST_MASK_BITS ;
  199. unsigned32 pad: 32 - N_GIGI_DELTA_BROADCAST_MASK_BITS ;
  200. } __GigiDeltaBroadcastMaskFmat;
  201. #endif
  202. /*
  203. ** GIGI Host In Registers
  204. */
  205. #if BIG_ENDIAN == 1
  206. typedef struct {
  207. unsigned32 Mask: 16;
  208. unsigned32 Mode: 2;
  209. unsigned32 pad0: 5;
  210. unsigned32 MajorGroup: 5;
  211. unsigned32 Offset: 4;
  212. } __GigiDMADataFmat;
  213. #else
  214. typedef struct {
  215. unsigned32 Offset: 4;
  216. unsigned32 MajorGroup: 5;
  217. unsigned32 pad0: 5;
  218. unsigned32 Mode: 2;
  219. unsigned32 Mask: 16;
  220. } __GigiDMADataFmat;
  221. #endif
  222. /*
  223. ** GIGI Rasterizer Registers
  224. */
  225. #if BIG_ENDIAN == 1
  226. typedef struct {
  227. unsigned32 pad1: 4;
  228. signed32 Integer: 12;
  229. unsigned32 Fraction: 15;
  230. unsigned32 pad0: 1;
  231. } __GigiStartXDomFmat,
  232. __GigidXDomFmat,
  233. __GigiStartXSubFmat,
  234. __GigidXSubFmat;
  235. #else
  236. typedef struct {
  237. unsigned32 pad0: 1;
  238. unsigned32 Fraction: 15;
  239. signed32 Integer: 12;
  240. unsigned32 pad1: 4;
  241. } __GigiStartXDomFmat,
  242. __GigidXDomFmat,
  243. __GigiStartXSubFmat,
  244. __GigidXSubFmat;
  245. #endif
  246. #if BIG_ENDIAN == 1
  247. typedef struct {
  248. unsigned32 pad1: 4;
  249. signed32 Integer: 12;
  250. unsigned32 Fraction: 15;
  251. unsigned32 pad0: 1;
  252. } __GigiStartYFmat,
  253. __GigidYFmat;
  254. #else
  255. typedef struct {
  256. unsigned32 pad0: 1;
  257. unsigned32 Fraction: 15;
  258. signed32 Integer: 12;
  259. unsigned32 pad1: 4;
  260. } __GigiStartYFmat,
  261. __GigidYFmat;
  262. #endif
  263. #if BIG_ENDIAN == 1
  264. typedef struct {
  265. unsigned32 pad0: 20;
  266. unsigned32 Val: 12;
  267. } __GigiCountFmat,
  268. __GigiContinueNewLineFmat,
  269. __GigiContinueNewDomFmat,
  270. __GigiContinueNewSubFmat,
  271. __GigiContinueFmat;
  272. #else
  273. typedef struct {
  274. unsigned32 Val: 12;
  275. unsigned32 pad0: 20;
  276. } __GigiCountFmat,
  277. __GigiContinueNewLineFmat,
  278. __GigiContinueNewDomFmat,
  279. __GigiContinueNewSubFmat,
  280. __GigiContinueFmat;
  281. #endif
  282. #if BIG_ENDIAN == 1
  283. typedef struct {
  284. unsigned32 pad5: 9;
  285. unsigned32 IncreaseY: 1;
  286. unsigned32 IncreaseX: 1;
  287. unsigned32 RejectNegativeFace: 1;
  288. unsigned32 pad4: 2;
  289. unsigned32 ReuseBitMask: 1;
  290. unsigned32 SubPixelCorrectionEnable: 1;
  291. unsigned32 pad3: 1;
  292. unsigned32 FogEnable: 1;
  293. unsigned32 TextureEnable: 1;
  294. unsigned32 SyncOnHostData: 1;
  295. unsigned32 SyncOnBitMask: 1;
  296. unsigned32 pad2: 3;
  297. unsigned32 PrimitiveType: 2;
  298. unsigned32 pad1: 2;
  299. unsigned32 FastFillEnable: 1;
  300. unsigned32 pad0: 2;
  301. unsigned32 AreaStippleEnable: 1;
  302. } __GigiRenderFmat,
  303. __GigiPrepareToRenderFmat;
  304. #else
  305. typedef struct {
  306. unsigned32 AreaStippleEnable: 1;
  307. unsigned32 pad0: 2;
  308. unsigned32 FastFillEnable: 1;
  309. unsigned32 pad1: 2;
  310. unsigned32 PrimitiveType: 2;
  311. unsigned32 pad2: 3;
  312. unsigned32 SyncOnBitMask: 1;
  313. unsigned32 SyncOnHostData: 1;
  314. unsigned32 TextureEnable: 1;
  315. unsigned32 FogEnable: 1;
  316. unsigned32 pad3: 1;
  317. unsigned32 SubPixelCorrectionEnable: 1;
  318. unsigned32 ReuseBitMask: 1;
  319. unsigned32 pad4: 2;
  320. unsigned32 RejectNegativeFace: 1;
  321. unsigned32 IncreaseX: 1;
  322. unsigned32 IncreaseY: 1;
  323. unsigned32 pad5: 9;
  324. } __GigiRenderFmat,
  325. __GigiPrepareToRenderFmat;
  326. #endif
  327. typedef __GigiUnsignedIntegerFmat __GigiBitMaskPatternFmat;
  328. #if BIG_ENDIAN == 1
  329. typedef struct {
  330. unsigned32 pad1: 12;
  331. unsigned32 BitMaskRelative: 1;
  332. unsigned32 LimitsEnable: 1;
  333. unsigned32 pad0: 1;
  334. unsigned32 HostDataByteSwapMode: 2;
  335. unsigned32 BitMaskOffset: 5;
  336. unsigned32 BitMaskPacking: 1;
  337. unsigned32 BitMaskByteSwapMode: 2;
  338. unsigned32 ForceBackgroundColor: 1;
  339. unsigned32 BiasCoordinates: 2;
  340. unsigned32 FractionAdjust: 2;
  341. unsigned32 InvertBitMask: 1;
  342. unsigned32 MirrorBitMask: 1;
  343. } __GigiRasterizerModeFmat;
  344. #else
  345. typedef struct {
  346. unsigned32 MirrorBitMask: 1;
  347. unsigned32 InvertBitMask: 1;
  348. unsigned32 FractionAdjust: 2;
  349. unsigned32 BiasCoordinates: 2;
  350. unsigned32 ForceBackgroundColor: 1;
  351. unsigned32 BitMaskByteSwapMode: 2;
  352. unsigned32 BitMaskPacking: 1;
  353. unsigned32 BitMaskOffset: 5;
  354. unsigned32 HostDataByteSwapMode: 2;
  355. unsigned32 pad0: 1;
  356. unsigned32 LimitsEnable: 1;
  357. unsigned32 BitMaskRelative: 1;
  358. unsigned32 pad1: 12;
  359. } __GigiRasterizerModeFmat;
  360. #endif
  361. #if BIG_ENDIAN == 1
  362. typedef struct {
  363. unsigned32 pad1: 4;
  364. signed32 Max: 12;
  365. unsigned32 pad0: 4;
  366. signed32 Min: 12;
  367. } __GigiYLimitsFmat, __GigiXLimitsFmat;
  368. #else
  369. typedef struct {
  370. signed32 Min: 12;
  371. unsigned32 pad0: 4;
  372. signed32 Max: 12;
  373. unsigned32 pad1: 4;
  374. } __GigiYLimitsFmat, __GigiXLimitsFmat;
  375. #endif
  376. #if BIG_ENDIAN == 1
  377. typedef struct {
  378. unsigned32 pad1: 4;
  379. signed32 Y: 12;
  380. unsigned32 pad0: 4;
  381. signed32 X: 12;
  382. } __GigiStepFmat;
  383. #else
  384. typedef struct {
  385. signed32 X: 12;
  386. unsigned32 pad0: 4;
  387. signed32 Y: 12;
  388. unsigned32 pad1: 4;
  389. } __GigiStepFmat;
  390. #endif
  391. typedef __GigiStepFmat __GigiActiveStepXFmat;
  392. typedef __GigiStepFmat __GigiActiveStepYDomEdgeFmat;
  393. typedef __GigiStepFmat __GigiPassiveStepXFmat;
  394. typedef __GigiStepFmat __GigiPassiveStepYDomEdgeFmat;
  395. typedef __GigiStepFmat __GigiFastBlockFillFmat;
  396. typedef __GigiStepFmat __GigiRectangleOriginFmat;
  397. typedef __GigiStepFmat __GigiRectangleSizeFmat;
  398. typedef __GigiStepFmat __GigiFBSourceDeltaFmat;
  399. #if BIG_ENDIAN == 1
  400. typedef struct {
  401. unsigned32 pad1: 5;
  402. unsigned32 Y: 11;
  403. unsigned32 pad0: 5;
  404. unsigned32 X: 11;
  405. } __GigiUnsignedStepFmat;
  406. #else
  407. typedef struct {
  408. unsigned32 X: 11;
  409. unsigned32 pad0: 5;
  410. unsigned32 Y: 11;
  411. unsigned32 pad1: 5;
  412. } __GigiUnsignedStepFmat;
  413. #endif
  414. #if BIG_ENDIAN == 1
  415. typedef struct {
  416. unsigned32 pad1: 4;
  417. signed32 XRight: 12;
  418. unsigned32 pad0: 4;
  419. signed32 XLeft: 12;
  420. } __GigiFastBlockLimitsFmat;
  421. #else
  422. typedef struct {
  423. signed32 XLeft: 12;
  424. unsigned32 pad0: 4;
  425. signed32 XRight: 12;
  426. unsigned32 pad1: 4;
  427. } __GigiFastBlockLimitsFmat;
  428. #endif
  429. #if BIG_ENDIAN == 1
  430. typedef struct {
  431. unsigned32 pad0: 27;
  432. unsigned32 Sign: 1;
  433. unsigned32 Magnitude: 4;
  434. } __GigiSubPixelCorrectionFmat;
  435. #else
  436. typedef struct {
  437. unsigned32 Magnitude: 4;
  438. unsigned32 Sign: 1;
  439. unsigned32 pad0: 27;
  440. } __GigiSubPixelCorrectionFmat;
  441. #endif
  442. #if BIG_ENDIAN == 1
  443. typedef struct {
  444. signed32 RelativeOffset: 3;
  445. unsigned32 pad1: 1;
  446. signed32 XStart: 12;
  447. unsigned32 pad0: 4;
  448. signed32 XEnd: 12;
  449. } __GigiPackedDataLimitsFmat;
  450. #else
  451. typedef struct {
  452. signed32 XEnd: 12;
  453. unsigned32 pad0: 4;
  454. signed32 XStart: 12;
  455. unsigned32 pad1: 1;
  456. signed32 RelativeOffset: 3;
  457. } __GigiPackedDataLimitsFmat;
  458. #endif
  459. typedef __GigiUnsignedIntegerFmat __GigiSpanMaskFmat;
  460. /*
  461. ** GIGI Scissor and Stipple Registers
  462. */
  463. #if BIG_ENDIAN == 1
  464. typedef struct {
  465. unsigned32 pad0: 30;
  466. unsigned32 ScreenScissorEnable: 1;
  467. unsigned32 UserScissorEnable: 1;
  468. } __GigiScissorModeFmat;
  469. #else
  470. typedef struct {
  471. unsigned32 UserScissorEnable: 1;
  472. unsigned32 ScreenScissorEnable: 1;
  473. unsigned32 pad0: 30;
  474. } __GigiScissorModeFmat;
  475. #endif
  476. #if BIG_ENDIAN == 1
  477. typedef struct {
  478. unsigned32 pad3: 11;
  479. unsigned32 ForceBackgroundColor: 1;
  480. unsigned32 MirrorY: 1;
  481. unsigned32 MirrorX: 1;
  482. unsigned32 InvertStipplePattern: 1;
  483. unsigned32 pad2: 2;
  484. unsigned32 YOffset: 3;
  485. unsigned32 pad1: 2;
  486. unsigned32 XOffset: 3;
  487. unsigned32 pad0: 6;
  488. unsigned32 UnitEnable: 1;
  489. } __GigiAreaStippleModeFmat;
  490. #else
  491. typedef struct {
  492. unsigned32 UnitEnable: 1;
  493. unsigned32 pad0: 6;
  494. unsigned32 XOffset: 3;
  495. unsigned32 pad1: 2;
  496. unsigned32 YOffset: 3;
  497. unsigned32 pad2: 2;
  498. unsigned32 InvertStipplePattern: 1;
  499. unsigned32 MirrorX: 1;
  500. unsigned32 MirrorY: 1;
  501. unsigned32 ForceBackgroundColor: 1;
  502. unsigned32 pad3: 11;
  503. } __GigiAreaStippleModeFmat;
  504. #endif
  505. typedef __GigiStepFmat __GigiScreenRegionFmat;
  506. #if BIG_ENDIAN == 1
  507. typedef struct {
  508. unsigned32 pad1: 4;
  509. signed32 Y: 12;
  510. unsigned32 pad0: 4;
  511. signed32 X: 12;
  512. } __GigiScissorMinXYFmat, __GigiScissorMaxXYFmat;
  513. #else
  514. typedef struct {
  515. signed32 X: 12;
  516. unsigned32 pad0: 4;
  517. signed32 Y: 12;
  518. unsigned32 pad1: 4;
  519. } __GigiScissorMinXYFmat, __GigiScissorMaxXYFmat;
  520. #endif
  521. #if BIG_ENDIAN == 1
  522. typedef struct {
  523. unsigned32 pad1: 4;
  524. signed32 Y: 12;
  525. unsigned32 pad0: 4;
  526. signed32 X: 12;
  527. } __GigiWindowOriginFmat;
  528. #else
  529. typedef struct {
  530. signed32 X: 12;
  531. unsigned32 pad0: 4;
  532. signed32 Y: 12;
  533. unsigned32 pad1: 4;
  534. } __GigiWindowOriginFmat;
  535. #endif
  536. #if BIG_ENDIAN == 1
  537. typedef struct {
  538. unsigned32 pad1: 5;
  539. unsigned32 Y: 11;
  540. unsigned32 pad0: 5;
  541. unsigned32 X: 11;
  542. } __GigiScreenSizeFmat;
  543. #else
  544. typedef struct {
  545. unsigned32 X: 11;
  546. unsigned32 pad0: 5;
  547. unsigned32 Y: 11;
  548. unsigned32 pad1: 5;
  549. } __GigiScreenSizeFmat;
  550. #endif
  551. #if BIG_ENDIAN == 1
  552. typedef struct {
  553. unsigned32 pad0: 24;
  554. unsigned32 Pattern: 8;
  555. } __GigiAreaStipplePatternFmat;
  556. #else
  557. typedef struct {
  558. unsigned32 Pattern: 8;
  559. unsigned32 pad0: 24;
  560. } __GigiAreaStipplePatternFmat;
  561. #endif
  562. /*
  563. ** GIGI Color DDA Registers
  564. */
  565. #if BIG_ENDIAN == 1
  566. typedef struct {
  567. unsigned32 pad2: 8;
  568. signed32 Integer: 9;
  569. unsigned32 Fraction: 11;
  570. unsigned32 pad0: 4;
  571. } __GigiCStartFmat;
  572. #else
  573. typedef struct {
  574. unsigned32 pad0: 4;
  575. unsigned32 Fraction: 11;
  576. signed32 Integer: 9;
  577. unsigned32 pad2: 8;
  578. } __GigiCStartFmat;
  579. #endif
  580. typedef __GigiCStartFmat __GigiRStartFmat;
  581. typedef __GigiCStartFmat __GigiGStartFmat;
  582. typedef __GigiCStartFmat __GigiBStartFmat;
  583. typedef __GigiCStartFmat __GigiAStartFmat;
  584. #if BIG_ENDIAN == 1
  585. typedef struct {
  586. unsigned32 pad2: 8;
  587. signed32 Integer: 9;
  588. unsigned32 Fraction: 11;
  589. unsigned32 pad0: 4;
  590. } __GigidCdxFmat;
  591. #else
  592. typedef struct {
  593. unsigned32 pad0: 4;
  594. unsigned32 Fraction: 11;
  595. signed32 Integer: 9;
  596. unsigned32 pad2: 8;
  597. } __GigidCdxFmat;
  598. #endif
  599. typedef __GigidCdxFmat __GigidRdxFmat;
  600. typedef __GigidCdxFmat __GigidGdxFmat;
  601. typedef __GigidCdxFmat __GigidBdxFmat;
  602. #if BIG_ENDIAN == 1
  603. typedef struct {
  604. unsigned32 pad2: 8;
  605. signed32 Integer: 9;
  606. unsigned32 Fraction: 11;
  607. unsigned32 pad0: 4;
  608. } __GigidCdyDomFmat;
  609. #else
  610. typedef struct {
  611. unsigned32 pad0: 4;
  612. unsigned32 Fraction: 11;
  613. signed32 Integer: 9;
  614. unsigned32 pad2: 8;
  615. } __GigidCdyDomFmat;
  616. #endif
  617. typedef __GigidCdyDomFmat __GigidRdyDomFmat;
  618. typedef __GigidCdyDomFmat __GigidGdyDomFmat;
  619. typedef __GigidCdyDomFmat __GigidBdyDomFmat;
  620. #if BIG_ENDIAN == 1
  621. typedef struct {
  622. unsigned32 Alpha: 8;
  623. unsigned32 Blue: 8;
  624. unsigned32 Green: 8;
  625. unsigned32 Red: 8;
  626. } __GigiColorFmat;
  627. #else
  628. typedef struct {
  629. unsigned32 Red: 8;
  630. unsigned32 Green: 8;
  631. unsigned32 Blue: 8;
  632. unsigned32 Alpha: 8;
  633. } __GigiColorFmat;
  634. #endif
  635. typedef __GigiColorFmat __GigiConstantColorFmat;
  636. #if BIG_ENDIAN == 1
  637. typedef struct {
  638. unsigned32 AlphaInteger: 5;
  639. unsigned32 AlphaFraction: 3;
  640. unsigned32 BlueInteger: 5;
  641. unsigned32 BlueFraction: 3;
  642. unsigned32 GreenInteger: 5;
  643. unsigned32 GreenFraction: 3;
  644. unsigned32 RedInteger: 5;
  645. unsigned32 RedFraction: 3;
  646. } __GigiFractionalColorFmat;
  647. #else
  648. typedef struct {
  649. unsigned32 RedFraction: 3;
  650. unsigned32 RedInteger: 5;
  651. unsigned32 GreenFraction: 3;
  652. unsigned32 GreenInteger: 5;
  653. unsigned32 BlueFraction: 3;
  654. unsigned32 BlueInteger: 5;
  655. unsigned32 AlphaFraction: 3;
  656. unsigned32 AlphaInteger: 5;
  657. } __GigiFractionalColorFmat;
  658. #endif
  659. #if BIG_ENDIAN == 1
  660. typedef struct {
  661. unsigned32 pad0: 30;
  662. unsigned32 ShadeMode: 1;
  663. unsigned32 UnitEnable: 1;
  664. } __GigiColorDDAModeFmat;
  665. #else
  666. typedef struct {
  667. unsigned32 UnitEnable: 1;
  668. unsigned32 ShadeMode: 1;
  669. unsigned32 pad0: 30;
  670. } __GigiColorDDAModeFmat;
  671. #endif
  672. /*
  673. ** GIGI Texture Application, Fog and
  674. ** Alpha Blend Registers
  675. */
  676. #if BIG_ENDIAN == 1
  677. typedef struct {
  678. unsigned32 pad1: 8;
  679. signed32 Integer: 2;
  680. unsigned32 Fraction: 19;
  681. unsigned32 pad0: 3;
  682. } __GigiFogFmat;
  683. #else
  684. typedef struct {
  685. unsigned32 pad0: 3;
  686. unsigned32 Fraction: 19;
  687. signed32 Integer: 2;
  688. unsigned32 pad1: 8;
  689. } __GigiFogFmat;
  690. #endif
  691. typedef __GigiFogFmat __GigiFStartFmat;
  692. typedef __GigiFogFmat __GigidFdxFmat;
  693. typedef __GigiFogFmat __GigidFdyDomFmat;
  694. #if BIG_ENDIAN == 1
  695. typedef struct {
  696. unsigned32 pad1: 29;
  697. unsigned32 FogTest: 1;
  698. unsigned32 pad0: 1;
  699. unsigned32 FogEnable: 1;
  700. } __GigiFogModeFmat;
  701. #else
  702. typedef struct {
  703. unsigned32 FogEnable: 1;
  704. unsigned32 pad0: 1;
  705. unsigned32 FogTest: 1;
  706. unsigned32 pad1: 29;
  707. } __GigiFogModeFmat;
  708. #endif
  709. typedef __GigiColorFmat __GigiFogColorFmat;
  710. typedef __GigiColorFmat __GigiTexelFmat;
  711. #if BIG_ENDIAN == 1
  712. typedef struct {
  713. unsigned32 pad0: 25;
  714. unsigned32 KsDDA: 1;
  715. unsigned32 KdDDA: 1;
  716. unsigned32 TextureType: 1;
  717. unsigned32 ApplicationMode: 3;
  718. unsigned32 TextureEnable: 1;
  719. } __GigiTextureColorModeFmat;
  720. #else
  721. typedef struct {
  722. unsigned32 TextureEnable: 1;
  723. unsigned32 ApplicationMode: 3;
  724. unsigned32 TextureType: 1;
  725. unsigned32 KdDDA: 1;
  726. unsigned32 KsDDA: 1;
  727. unsigned32 pad0: 25;
  728. } __GigiTextureColorModeFmat;
  729. #endif
  730. #if BIG_ENDIAN == 1
  731. typedef struct {
  732. unsigned32 pad2: 13;
  733. unsigned32 AlphaConversion: 1;
  734. unsigned32 ColorConversion: 1;
  735. unsigned32 ColorFormatExtension: 1;
  736. unsigned32 pad1: 1;
  737. unsigned32 BlendType: 1;
  738. unsigned32 ColorOrder: 1;
  739. unsigned32 NoAlphaBuffer: 1;
  740. unsigned32 ColorFormat: 4;
  741. unsigned32 DestinationBlend: 3;
  742. unsigned32 SourceBlend: 4;
  743. unsigned32 AlphaBlendEnable: 1;
  744. } __GigiAlphaBlendModeFmat;
  745. #else
  746. typedef struct {
  747. unsigned32 AlphaBlendEnable: 1;
  748. unsigned32 SourceBlend: 4;
  749. unsigned32 DestinationBlend: 3;
  750. unsigned32 ColorFormat: 4;
  751. unsigned32 NoAlphaBuffer: 1;
  752. unsigned32 ColorOrder: 1;
  753. unsigned32 BlendType: 1;
  754. unsigned32 pad1: 1;
  755. unsigned32 ColorFormatExtension: 1;
  756. unsigned32 ColorConversion: 1;
  757. unsigned32 AlphaConversion: 1;
  758. unsigned32 pad2: 13;
  759. } __GigiAlphaBlendModeFmat;
  760. #endif
  761. /*
  762. ** GIGI Texture Address Registers
  763. */
  764. #if BIG_ENDIAN == 1
  765. typedef struct {
  766. signed32 Integer: 12;
  767. unsigned32 Fraction: 18;
  768. unsigned32 pad1: 2;
  769. } __GigiSTFmat;
  770. #else
  771. typedef struct {
  772. unsigned32 pad1: 2;
  773. unsigned32 Fraction: 18;
  774. signed32 Integer: 12;
  775. } __GigiSTFmat;
  776. #endif
  777. typedef __GigiSTFmat __GigiSStartFmat;
  778. typedef __GigiSTFmat __GigiTStartFmat;
  779. typedef __GigiSTFmat __GigidSdxFmat;
  780. typedef __GigiSTFmat __GigidTdxFmat;
  781. typedef __GigiSTFmat __GigidSdyDomFmat;
  782. typedef __GigiSTFmat __GigidTdyDomFmat;
  783. #if BIG_ENDIAN == 1
  784. typedef struct {
  785. signed32 Integer: 2;
  786. unsigned32 Fraction: 27;
  787. unsigned32 pad0: 3;
  788. } __GigiQFmat;
  789. #else
  790. typedef struct {
  791. unsigned32 pad0: 3;
  792. unsigned32 Fraction: 27;
  793. signed32 Integer: 2;
  794. } __GigiQFmat;
  795. #endif
  796. typedef __GigiQFmat __GigiQStartFmat;
  797. typedef __GigiQFmat __GigidQdxFmat;
  798. typedef __GigiQFmat __GigidQdyDomFmat;
  799. #if BIG_ENDIAN == 1
  800. typedef struct {
  801. unsigned32 TLoMagnitude: 12;
  802. unsigned32 SSign: 1;
  803. unsigned32 SMagnitude: 19;
  804. } __GigiTextureAddressFmat0;
  805. #else
  806. typedef struct {
  807. unsigned32 SMagnitude: 19;
  808. unsigned32 SSign: 1;
  809. unsigned32 TLoMagnitude: 12;
  810. } __GigiTextureAddressFmat0;
  811. #endif
  812. #if BIG_ENDIAN == 1
  813. typedef struct {
  814. unsigned32 pad0: 24;
  815. unsigned32 TSign: 1;
  816. unsigned32 THiMagnitude: 7;
  817. } __GigiTextureAddressFmat1;
  818. #else
  819. typedef struct {
  820. unsigned32 THiMagnitude: 7;
  821. unsigned32 TSign: 1;
  822. unsigned32 pad0: 24;
  823. } __GigiTextureAddressFmat1;
  824. #endif
  825. #if BIG_ENDIAN == 1
  826. typedef struct {
  827. unsigned32 pad0: 28;
  828. unsigned32 DeltaFormat: 1;
  829. unsigned32 Fast: 1;
  830. unsigned32 PerspectiveCorrection: 1;
  831. unsigned32 Enable: 1;
  832. } __GigiTextureAddrModeFmat;
  833. #else
  834. typedef struct {
  835. unsigned32 Enable: 1;
  836. unsigned32 PerspectiveCorrection: 1;
  837. unsigned32 Fast: 1;
  838. unsigned32 DeltaFormat: 1;
  839. unsigned32 pad0: 28;
  840. } __GigiTextureAddrModeFmat;
  841. #endif
  842. /*
  843. ** GIGI Texture Read Registers
  844. */
  845. typedef struct {
  846. #if BIG_ENDIAN == 1
  847. unsigned32 TCoeff : 8;
  848. unsigned32 Pad1 : 7;
  849. unsigned32 SwapT : 1;
  850. unsigned32 SCoeff : 8;
  851. unsigned32 Pad0 : 7;
  852. unsigned32 SwapS : 1;
  853. #else
  854. unsigned32 SwapS : 1;
  855. unsigned32 Pad0 : 7;
  856. unsigned32 SCoeff : 8;
  857. unsigned32 SwapT : 1;
  858. unsigned32 Pad1 : 7;
  859. unsigned32 TCoeff : 8;
  860. #endif
  861. } __GigiTextureReadPadFmat;
  862. #if BIG_ENDIAN == 1
  863. typedef struct {
  864. unsigned32 pad2: 7;
  865. unsigned32 PackedData: 1;
  866. unsigned32 pad1: 6;
  867. unsigned32 FilterMode: 1;
  868. unsigned32 Height: 4;
  869. unsigned32 Width: 4;
  870. unsigned32 pad0: 4;
  871. unsigned32 TWrapMode: 2;
  872. unsigned32 SWrapMode: 2;
  873. unsigned32 Enable: 1;
  874. } __GigiTextureReadModeFmat;
  875. #else
  876. typedef struct {
  877. unsigned32 Enable: 1;
  878. unsigned32 SWrapMode: 2;
  879. unsigned32 TWrapMode: 2;
  880. unsigned32 pad0: 4;
  881. unsigned32 Width: 4;
  882. unsigned32 Height: 4;
  883. unsigned32 FilterMode: 1;
  884. unsigned32 pad1: 6;
  885. unsigned32 PackedData: 1;
  886. unsigned32 pad2: 7;
  887. } __GigiTextureReadModeFmat;
  888. #endif
  889. #if BIG_ENDIAN == 1
  890. typedef struct {
  891. unsigned32 pad2: 10;
  892. unsigned32 TexelSize: 3;
  893. unsigned32 pad1: 1;
  894. unsigned32 SubPatchMode: 1;
  895. unsigned32 WindowOrigin: 1;
  896. unsigned32 pad0: 7;
  897. unsigned32 PP2: 3;
  898. unsigned32 PP1: 3;
  899. unsigned32 PP0: 3;
  900. } __GigiTextureMapFormatFmat;
  901. #else
  902. typedef struct {
  903. unsigned32 PP0: 3;
  904. unsigned32 PP1: 3;
  905. unsigned32 PP2: 3;
  906. unsigned32 pad0: 7;
  907. unsigned32 WindowOrigin: 1;
  908. unsigned32 SubPatchMode: 1;
  909. unsigned32 pad1: 1;
  910. unsigned32 TexelSize: 3;
  911. unsigned32 pad2: 10;
  912. } __GigiTextureMapFormatFmat;
  913. #endif
  914. #if BIG_ENDIAN == 1
  915. typedef struct {
  916. unsigned32 pad0: 22;
  917. unsigned32 SpanFormat: 1;
  918. unsigned32 AlphaMap: 2;
  919. unsigned32 TextureFormatExtension: 1;
  920. unsigned32 ColorOrder: 1;
  921. unsigned32 NoAlphaBuffer: 1;
  922. unsigned32 TextureFormat: 4;
  923. } __GigiTextureDataFormatFmat;
  924. #else
  925. typedef struct {
  926. unsigned32 TextureFormat: 4;
  927. unsigned32 NoAlphaBuffer: 1;
  928. unsigned32 ColorOrder: 1;
  929. unsigned32 TextureFormatExtension: 1;
  930. unsigned32 AlphaMap: 2;
  931. unsigned32 SpanFormat: 1;
  932. unsigned32 pad0: 22;
  933. } __GigiTextureDataFormatFmat;
  934. #endif
  935. #if BIG_ENDIAN == 1
  936. typedef struct {
  937. unsigned32 pad0: 8;
  938. unsigned32 Addr: 24;
  939. } __GigiTexelLUTAddressFmat, __GigiTexelLUTID;
  940. #else
  941. typedef struct {
  942. unsigned32 Addr: 24;
  943. unsigned32 pad0: 8;
  944. } __GigiTexelLUTAddressFmat, __GigiTexelLUTID;
  945. #endif
  946. #if BIG_ENDIAN == 1
  947. typedef struct {
  948. unsigned32 pad0: 1;
  949. unsigned32 Access: 1;
  950. unsigned32 pad1: 6;
  951. unsigned32 Addr: 24;
  952. } __GigiTextureBaseAddressFmat;
  953. #else
  954. typedef struct {
  955. unsigned32 Addr: 24;
  956. unsigned32 pad1: 6;
  957. unsigned32 Access: 1;
  958. unsigned32 pad0: 1;
  959. } __GigiTextureBaseAddressFmat;
  960. #endif
  961. typedef __GigiUnsignedIntegerFmat __GigiRawDataFmat[2];
  962. #if BIG_ENDIAN == 1
  963. typedef struct {
  964. unsigned32 Alpha: 8;
  965. unsigned32 V: 8;
  966. unsigned32 U: 8;
  967. unsigned32 Y: 8;
  968. } __GigiTexelYUVFmat;
  969. #else
  970. typedef struct {
  971. unsigned32 Y: 8;
  972. unsigned32 U: 8;
  973. unsigned32 V: 8;
  974. unsigned32 Alpha: 8;
  975. } __GigiTexelYUVFmat;
  976. #endif
  977. #if BIG_ENDIAN == 1
  978. typedef struct {
  979. unsigned32 pad0: 20;
  980. unsigned32 PixelsPerEntry: 2;
  981. unsigned32 LUTOffset: 8;
  982. unsigned32 DirectIndex: 1;
  983. unsigned32 Enable: 1;
  984. } __GigiTexelLUTModeFmat;
  985. #else
  986. typedef struct {
  987. unsigned32 Enable: 1;
  988. unsigned32 DirectIndex: 1;
  989. unsigned32 LUTOffset: 8;
  990. unsigned32 PixelsPerEntry: 2;
  991. unsigned32 pad0: 20;
  992. } __GigiTexelLUTModeFmat;
  993. #endif
  994. #if BIG_ENDIAN == 1
  995. typedef struct {
  996. unsigned32 TCoeff: 8;
  997. unsigned32 pad1: 7;
  998. unsigned32 SwapT: 1;
  999. unsigned32 SCoeff: 8;
  1000. unsigned32 pad0: 7;
  1001. unsigned32 SwapS: 1;
  1002. } __GigiInterp0Fmat;
  1003. #else
  1004. typedef struct {
  1005. unsigned32 SwapS: 1;
  1006. unsigned32 pad0: 7;
  1007. unsigned32 SCoeff: 8;
  1008. unsigned32 SwapT: 1;
  1009. unsigned32 pad1: 7;
  1010. unsigned32 TCoeff: 8;
  1011. } __GigiInterp0Fmat;
  1012. #endif
  1013. #if BIG_ENDIAN == 1
  1014. typedef struct {
  1015. unsigned32 pad0: 24;
  1016. unsigned32 Offset: 8;
  1017. } __GigiTexelLUTIndexFmat;
  1018. #else
  1019. typedef struct {
  1020. unsigned32 Offset: 8;
  1021. unsigned32 pad0: 24;
  1022. } __GigiTexelLUTIndexFmat;
  1023. #endif
  1024. #if BIG_ENDIAN == 1
  1025. typedef struct {
  1026. unsigned32 pad0: 15;
  1027. unsigned32 Count: 9;
  1028. unsigned32 Index: 8;
  1029. } __GigiTexelLUTTransferFmat;
  1030. #else
  1031. typedef struct {
  1032. unsigned32 Index: 8;
  1033. unsigned32 Count: 9;
  1034. unsigned32 pad0: 15;
  1035. } __GigiTexelLUTTransferFmat;
  1036. #endif
  1037. #if BIG_ENDIAN == 1
  1038. typedef struct {
  1039. unsigned32 Valid: 1;
  1040. unsigned32 pad0: 7;
  1041. unsigned32 Address: 24;
  1042. } __GigiTextureIDFmat;
  1043. #else
  1044. typedef struct {
  1045. unsigned32 Address: 24;
  1046. unsigned32 pad0: 7;
  1047. unsigned32 Valid: 1;
  1048. } __GigiTextureIDFmat;
  1049. #endif
  1050. typedef __GigiColorFmat __GigiAlphaMapUpperBoundFmat;
  1051. typedef __GigiColorFmat __GigiAlphaMapLowerBoundFmat;
  1052. /*
  1053. ** GIGI YUV-REG Registers
  1054. */
  1055. typedef __GigiColorFmat __GigiChromaUpperBoundFmat;
  1056. typedef __GigiColorFmat __GigiChromaLowerBoundFmat;
  1057. #if BIG_ENDIAN == 1
  1058. typedef struct {
  1059. unsigned32 pad0: 26;
  1060. unsigned32 TexelDisableUpdate:1;
  1061. unsigned32 RejectTexel: 1;
  1062. unsigned32 TestData: 1;
  1063. unsigned32 TestMode: 2;
  1064. unsigned32 Enable: 1;
  1065. } __GigiYUVModeFmat;
  1066. #else
  1067. typedef struct {
  1068. unsigned32 Enable: 1;
  1069. unsigned32 TestMode: 2;
  1070. unsigned32 TestData: 1;
  1071. unsigned32 RejectTexel: 1;
  1072. unsigned32 TexelDisableUpdate:1;
  1073. unsigned32 pad0: 26;
  1074. } __GigiYUVModeFmat;
  1075. #endif
  1076. /*
  1077. ** GIGI Localbuffer Registers
  1078. */
  1079. #if BIG_ENDIAN == 1
  1080. typedef struct {
  1081. unsigned32 pad0: 15;
  1082. unsigned32 Stencil: 1;
  1083. unsigned32 Depth: 16;
  1084. } __GigiLBDataFmat;
  1085. #else
  1086. typedef struct {
  1087. unsigned32 Depth: 16;
  1088. unsigned32 Stencil: 1;
  1089. unsigned32 pad0: 15;
  1090. } __GigiLBDataFmat;
  1091. #endif
  1092. typedef __GigiLBDataFmat __GigiLBWriteDataFmat;
  1093. typedef __GigiLBDataFmat __GigiLBSourceDataFmat;
  1094. typedef __GigiLBDataFmat __GigiLBCancelWriteFmat;
  1095. #if BIG_ENDIAN == 1
  1096. typedef struct {
  1097. unsigned32 pad0: 28;
  1098. unsigned32 StencilWidth: 2;
  1099. unsigned32 DepthWidth: 2;
  1100. } __GigiLBFormatFmat;
  1101. #else
  1102. typedef struct {
  1103. unsigned32 DepthWidth: 2;
  1104. unsigned32 StencilWidth: 2;
  1105. unsigned32 pad0: 28;
  1106. } __GigiLBFormatFmat;
  1107. #endif
  1108. typedef __GigiLBFormatFmat __GigiLBReadFormatFmat;
  1109. typedef __GigiLBFormatFmat __GigiLBWriteFormatFmat;
  1110. #if BIG_ENDIAN == 1
  1111. typedef struct {
  1112. unsigned32 pad1: 12;
  1113. unsigned32 PatchMode: 1;
  1114. unsigned32 WindowOrigin: 1;
  1115. unsigned32 DataType: 2;
  1116. unsigned32 pad0: 5;
  1117. unsigned32 ReadDestinationEnable: 1;
  1118. unsigned32 ReadSourceEnable: 1;
  1119. unsigned32 PP2: 3;
  1120. unsigned32 PP1: 3;
  1121. unsigned32 PP0: 3;
  1122. } __GigiLBReadModeFmat;
  1123. #else
  1124. typedef struct {
  1125. unsigned32 PP0: 3;
  1126. unsigned32 PP1: 3;
  1127. unsigned32 PP2: 3;
  1128. unsigned32 ReadSourceEnable: 1;
  1129. unsigned32 ReadDestinationEnable: 1;
  1130. unsigned32 pad0: 5;
  1131. unsigned32 DataType: 2;
  1132. unsigned32 WindowOrigin: 1;
  1133. unsigned32 PatchMode: 1;
  1134. unsigned32 pad1: 12;
  1135. } __GigiLBReadModeFmat;
  1136. #endif
  1137. #if BIG_ENDIAN == 1
  1138. typedef struct {
  1139. unsigned32 pad1: 12;
  1140. unsigned32 PatchMode: 1;
  1141. unsigned32 WindowOrigin: 1;
  1142. unsigned32 pad0: 9;
  1143. unsigned32 PP2: 3;
  1144. unsigned32 PP1: 3;
  1145. unsigned32 PP0: 3;
  1146. } __GigiLBWriteConfigFmat;
  1147. #else
  1148. typedef struct {
  1149. unsigned32 PP0: 3;
  1150. unsigned32 PP1: 3;
  1151. unsigned32 PP2: 3;
  1152. unsigned32 pad0: 9;
  1153. unsigned32 WindowOrigin: 1;
  1154. unsigned32 PatchMode: 1;
  1155. unsigned32 pad1: 12;
  1156. } __GigiLBWriteConfigFmat;
  1157. #endif
  1158. typedef __GigiUnsignedIntegerFmat __GigiLBReadPadFmat;
  1159. #if BIG_ENDIAN == 1
  1160. typedef struct {
  1161. unsigned32 pad0: 31;
  1162. unsigned32 WriteEnable: 1;
  1163. } __GigiLBWriteModeFmat;
  1164. #else
  1165. typedef struct {
  1166. unsigned32 WriteEnable: 1;
  1167. unsigned32 pad0: 31;
  1168. } __GigiLBWriteModeFmat;
  1169. #endif
  1170. #if BIG_ENDIAN == 1
  1171. typedef struct {
  1172. unsigned32 pad0: 8;
  1173. unsigned32 Addr: 24;
  1174. } __GigiLBAddressFmat;
  1175. #else
  1176. typedef struct {
  1177. unsigned32 Addr: 24;
  1178. unsigned32 pad0: 8;
  1179. } __GigiLBAddressFmat;
  1180. #endif
  1181. typedef __GigiLBAddressFmat __GigiLBWindowBaseFmat;
  1182. typedef __GigiLBAddressFmat __GigiLBSourceOffsetFmat;
  1183. typedef __GigiLBAddressFmat __GigiLBWriteBaseFmat;
  1184. #if BIG_ENDIAN == 1
  1185. typedef struct {
  1186. unsigned32 pad0: 31;
  1187. unsigned32 Stencil: 1;
  1188. } __GigiLBStencilFmat;
  1189. #else
  1190. typedef struct {
  1191. unsigned32 Stencil: 1;
  1192. unsigned32 pad0: 31;
  1193. } __GigiLBStencilFmat;
  1194. #endif
  1195. #if BIG_ENDIAN == 1
  1196. typedef struct {
  1197. unsigned32 pad0: 16;
  1198. unsigned32 Depth: 16;
  1199. } __GigiLBDepthFmat;
  1200. #else
  1201. typedef struct {
  1202. unsigned32 Depth: 16;
  1203. unsigned32 pad0: 16;
  1204. } __GigiLBDepthFmat;
  1205. #endif
  1206. #if BIG_ENDIAN == 1
  1207. typedef struct {
  1208. unsigned32 pad0: 31;
  1209. unsigned32 Data: 1;
  1210. } __GigiStencilFmat;
  1211. #else
  1212. typedef struct {
  1213. unsigned32 Data: 1;
  1214. unsigned32 pad0: 31;
  1215. } __GigiStencilFmat;
  1216. #endif
  1217. #if BIG_ENDIAN == 1
  1218. typedef struct {
  1219. unsigned32 pad0: 16;
  1220. unsigned32 Data: 16;
  1221. } __GigiDepthFmat;
  1222. #else
  1223. typedef struct {
  1224. unsigned32 Data: 16;
  1225. unsigned32 pad0: 16;
  1226. } __GigiDepthFmat;
  1227. #endif
  1228. /*
  1229. ** GIGI Depth and Stencil Registers
  1230. */
  1231. #if BIG_ENDIAN == 1
  1232. typedef struct {
  1233. unsigned32 pad2: 13;
  1234. unsigned32 DisableLBUpdate: 1;
  1235. unsigned32 pad1: 13;
  1236. unsigned32 LBUpdateSource: 1;
  1237. unsigned32 ForceLBUpdate: 1;
  1238. unsigned32 pad0: 3;
  1239. } __GigiWindowFmat;
  1240. #else
  1241. typedef struct {
  1242. unsigned32 pad0: 3;
  1243. unsigned32 ForceLBUpdate: 1;
  1244. unsigned32 LBUpdateSource: 1;
  1245. unsigned32 pad1: 13;
  1246. unsigned32 DisableLBUpdate: 1;
  1247. unsigned32 pad2: 13;
  1248. } __GigiWindowFmat;
  1249. #endif
  1250. #if BIG_ENDIAN == 1
  1251. typedef struct {
  1252. unsigned32 pad2: 15;
  1253. unsigned32 WriteMask: 1;
  1254. unsigned32 pad1: 7;
  1255. unsigned32 CompareMask: 1;
  1256. unsigned32 pad0: 7;
  1257. unsigned32 ReferenceValue: 1;
  1258. } __GigiStencilDataFmat;
  1259. #else
  1260. typedef struct {
  1261. unsigned32 ReferenceValue: 1;
  1262. unsigned32 pad0: 7;
  1263. unsigned32 CompareMask: 1;
  1264. unsigned32 pad1: 7;
  1265. unsigned32 WriteMask: 1;
  1266. unsigned32 pad2: 15;
  1267. } __GigiStencilDataFmat;
  1268. #endif
  1269. #if BIG_ENDIAN == 1
  1270. typedef struct {
  1271. unsigned32 pad0: 17;
  1272. unsigned32 StencilSource: 2;
  1273. unsigned32 CompareFunction: 3;
  1274. unsigned32 SFail: 3;
  1275. unsigned32 DPFail: 3;
  1276. unsigned32 DPPass: 3;
  1277. unsigned32 UnitEnable: 1;
  1278. } __GigiStencilModeFmat;
  1279. #else
  1280. typedef struct {
  1281. unsigned32 UnitEnable: 1;
  1282. unsigned32 DPPass: 3;
  1283. unsigned32 DPFail: 3;
  1284. unsigned32 SFail: 3;
  1285. unsigned32 CompareFunction: 3;
  1286. unsigned32 StencilSource: 2;
  1287. unsigned32 pad0: 17;
  1288. } __GigiStencilModeFmat;
  1289. #endif
  1290. #if BIG_ENDIAN == 1
  1291. typedef struct {
  1292. unsigned32 pad0: 25;
  1293. unsigned32 CompareMode: 3;
  1294. unsigned32 NewDepthSource: 2;
  1295. unsigned32 WriteMask: 1;
  1296. unsigned32 UnitEnable: 1;
  1297. } __GigiDepthModeFmat;
  1298. #else
  1299. typedef struct {
  1300. unsigned32 UnitEnable: 1;
  1301. unsigned32 WriteMask: 1;
  1302. unsigned32 NewDepthSource: 2;
  1303. unsigned32 CompareMode: 3;
  1304. unsigned32 pad0: 25;
  1305. } __GigiDepthModeFmat;
  1306. #endif
  1307. #if BIG_ENDIAN == 1
  1308. typedef struct {
  1309. unsigned32 pad0: 15;
  1310. signed32 Z: 17;
  1311. } __GigiZUFmat;
  1312. #else
  1313. typedef struct {
  1314. signed32 Z: 17;
  1315. unsigned32 pad0: 15;
  1316. } __GigiZUFmat;
  1317. #endif
  1318. typedef __GigiZUFmat __GigiZStartUFmat;
  1319. typedef __GigiZUFmat __GigidZdxUFmat;
  1320. typedef __GigiZUFmat __GigidZdyDomUFmat;
  1321. #if BIG_ENDIAN == 1
  1322. typedef struct {
  1323. unsigned32 Z: 11;
  1324. unsigned32 pad0: 21;
  1325. } __GigiZLFmat;
  1326. #else
  1327. typedef struct {
  1328. unsigned32 pad0: 21;
  1329. unsigned32 Z: 11;
  1330. } __GigiZLFmat;
  1331. #endif
  1332. typedef __GigiZLFmat __GigiZStartLFmat;
  1333. typedef __GigiZLFmat __GigidZdxLFmat;
  1334. typedef __GigiZLFmat __GigidZdyDomLFmat;
  1335. /*
  1336. ** GIGI Framebuffer Registers
  1337. */
  1338. #if BIG_ENDIAN == 1
  1339. typedef struct {
  1340. unsigned32 pad0: 8;
  1341. unsigned32 Addr: 24;
  1342. } __GigiFBAddressFmat;
  1343. #else
  1344. typedef struct {
  1345. unsigned32 Addr: 24;
  1346. unsigned32 pad0: 8;
  1347. } __GigiFBAddressFmat;
  1348. #endif
  1349. typedef __GigiFBAddressFmat __GigiFBBaseAddressFmat;
  1350. typedef __GigiFBAddressFmat __GigiFBPixelOffsetFmat;
  1351. typedef __GigiFBAddressFmat __GigiFBSourceOffsetFmat;
  1352. typedef __GigiFBAddressFmat __GigiFBWindowBaseFmat;
  1353. typedef __GigiFBAddressFmat __GigiFBWriteBaseFmat;
  1354. typedef __GigiFBAddressFmat __GigiFBSourceBaseFmat;
  1355. #if BIG_ENDIAN == 1
  1356. typedef struct {
  1357. unsigned32 pad3: 5;
  1358. unsigned32 PatchMode: 2;
  1359. unsigned32 pad2: 2;
  1360. signed32 RelativeOffset: 3;
  1361. unsigned32 PackedData: 1;
  1362. unsigned32 PatchEnable: 1;
  1363. unsigned32 TexelInhibit: 1;
  1364. unsigned32 WindowOrigin: 1;
  1365. unsigned32 MessageType: 1;
  1366. unsigned32 pad0: 4;
  1367. unsigned32 ReadDestinationEnable: 1;
  1368. unsigned32 ReadSourceEnable: 1;
  1369. unsigned32 PP2: 3;
  1370. unsigned32 PP1: 3;
  1371. unsigned32 PP0: 3;
  1372. } __GigiFBReadModeFmat;
  1373. #else
  1374. typedef struct {
  1375. unsigned32 PP0: 3;
  1376. unsigned32 PP1: 3;
  1377. unsigned32 PP2: 3;
  1378. unsigned32 ReadSourceEnable: 1;
  1379. unsigned32 ReadDestinationEnable: 1;
  1380. unsigned32 pad0: 4;
  1381. unsigned32 MessageType: 1;
  1382. unsigned32 WindowOrigin: 1;
  1383. unsigned32 TexelInhibit: 1;
  1384. unsigned32 PatchEnable: 1;
  1385. unsigned32 PackedData: 1;
  1386. signed32 RelativeOffset: 3;
  1387. unsigned32 pad2: 2;
  1388. unsigned32 PatchMode: 2;
  1389. unsigned32 pad3: 5;
  1390. } __GigiFBReadModeFmat;
  1391. #endif
  1392. #if BIG_ENDIAN == 1
  1393. typedef struct {
  1394. unsigned32 pad3: 5;
  1395. unsigned32 PatchMode: 2;
  1396. unsigned32 pad2: 2;
  1397. signed32 RelativeOffset: 3;
  1398. unsigned32 PackedData: 1;
  1399. unsigned32 PatchEnable: 1;
  1400. unsigned32 pad1: 1;
  1401. unsigned32 WindowOrigin: 1;
  1402. unsigned32 pad0: 7;
  1403. unsigned32 PP2: 3;
  1404. unsigned32 PP1: 3;
  1405. unsigned32 PP0: 3;
  1406. } __GigiFBWriteConfigFmat;
  1407. #else
  1408. typedef struct {
  1409. unsigned32 PP0: 3;
  1410. unsigned32 PP1: 3;
  1411. unsigned32 PP2: 3;
  1412. unsigned32 pad0: 7;
  1413. unsigned32 WindowOrigin: 1;
  1414. unsigned32 pad1: 1;
  1415. unsigned32 PatchEnable: 1;
  1416. unsigned32 PackedData: 1;
  1417. signed32 RelativeOffset: 3;
  1418. unsigned32 pad2: 2;
  1419. unsigned32 PatchMode: 2;
  1420. unsigned32 pad3: 5;
  1421. } __GigiFBWriteConfigFmat;
  1422. #endif
  1423. #if BIG_ENDIAN == 1
  1424. typedef struct {
  1425. unsigned32 pad1: 29;
  1426. unsigned32 PixelSize: 3;
  1427. } __GigiFBPixelFmat;
  1428. #else
  1429. typedef struct {
  1430. unsigned32 PixelSize: 3;
  1431. unsigned32 pad1: 29;
  1432. } __GigiFBPixelFmat;
  1433. #endif
  1434. typedef __GigiFBPixelFmat __GigiFBReadPixelFmat;
  1435. typedef __GigiFBPixelFmat __GigiFBWritePixelFmat;
  1436. typedef __GigiUnsignedIntegerFmat __GigiFBReadPadFmat;
  1437. #if BIG_ENDIAN == 1
  1438. typedef struct {
  1439. unsigned32 pad1: 28;
  1440. unsigned32 UpLoadData: 1;
  1441. unsigned32 pad0: 2;
  1442. unsigned32 WriteEnable: 1;
  1443. } __GigiFBWriteModeFmat;
  1444. #else
  1445. typedef struct {
  1446. unsigned32 WriteEnable: 1;
  1447. unsigned32 pad0: 2;
  1448. unsigned32 UpLoadData: 1;
  1449. unsigned32 pad1: 28;
  1450. } __GigiFBWriteModeFmat;
  1451. #endif
  1452. #if BIG_ENDIAN == 1
  1453. typedef struct {
  1454. unsigned32 pad0: 28;
  1455. signed32 RelativeOffset: 3;
  1456. unsigned32 DataPacking: 1;
  1457. } __GigiFBPackedDataModeFmat;
  1458. #else
  1459. typedef struct {
  1460. unsigned32 DataPacking: 1;
  1461. signed32 RelativeOffset: 3;
  1462. unsigned32 pad0: 28;
  1463. } __GigiFBPackedDataModeFmat;
  1464. #endif
  1465. typedef __GigiUnsignedIntegerFmat __GigiFBFmat;
  1466. typedef __GigiFBFmat __GigiFBColorFmat;
  1467. typedef __GigiFBFmat __GigiFBDataFmat;
  1468. typedef __GigiFBFmat __GigiFBSourceDataFmat;
  1469. typedef __GigiUnsignedIntegerFmat __GigiFBHardwareWriteMaskFmat;
  1470. typedef __GigiUnsignedIntegerFmat __GigiFBBlockColorFmat;
  1471. #if BIG_ENDIAN == 1
  1472. typedef struct {
  1473. unsigned32 pad0: 10;
  1474. unsigned32 Offset: 22;
  1475. } __GigiTextureDownloadOffsetFmat;
  1476. #else
  1477. typedef struct {
  1478. unsigned32 Offset: 22;
  1479. unsigned32 pad0: 10;
  1480. } __GigiTextureDownloadOffsetFmat;
  1481. #endif
  1482. #if BIG_ENDIAN == 1
  1483. typedef struct {
  1484. unsigned32 pad: 22;
  1485. unsigned32 LogicOpLogicOp: 4;
  1486. unsigned32 LogicOpEnable: 1;
  1487. unsigned32 ColorDDAModeEnable: 1;
  1488. unsigned32 FBWriteModeEnable: 1;
  1489. unsigned32 FBReadModePackedData: 1;
  1490. unsigned32 FBReadModeReadDestination: 1;
  1491. unsigned32 FBReadModeReadSource: 1;
  1492. } __GigiConfigFmat;
  1493. #else
  1494. typedef struct {
  1495. unsigned32 FBReadModeReadSource: 1;
  1496. unsigned32 FBReadModeReadDestination: 1;
  1497. unsigned32 FBReadModePackedData: 1;
  1498. unsigned32 FBWriteModeEnable: 1;
  1499. unsigned32 ColorDDAModeEnable: 1;
  1500. unsigned32 LogicOpEnable: 1;
  1501. unsigned32 LogicOpLogicOp: 4;
  1502. unsigned32 pad: 22;
  1503. } __GigiConfigFmat;
  1504. #endif
  1505. /*
  1506. ** GIGI Dither Registers
  1507. */
  1508. #if BIG_ENDIAN == 1
  1509. typedef struct {
  1510. unsigned32 pad1: 15;
  1511. unsigned32 ColorFormatExtension: 1;
  1512. unsigned32 pad0: 2;
  1513. unsigned32 ForceAlpha: 2;
  1514. unsigned32 DitherMethod: 1;
  1515. unsigned32 ColorOrder: 1;
  1516. unsigned32 YOffset: 2;
  1517. unsigned32 XOffset: 2;
  1518. unsigned32 ColorFormat: 4;
  1519. unsigned32 DitherEnable: 1;
  1520. unsigned32 UnitEnable: 1;
  1521. } __GigiDitherModeFmat;
  1522. #else
  1523. typedef struct {
  1524. unsigned32 UnitEnable: 1;
  1525. unsigned32 DitherEnable: 1;
  1526. unsigned32 ColorFormat: 4;
  1527. unsigned32 XOffset: 2;
  1528. unsigned32 YOffset: 2;
  1529. unsigned32 ColorOrder: 1;
  1530. unsigned32 DitherMethod: 1;
  1531. unsigned32 ForceAlpha: 2;
  1532. unsigned32 pad0: 2;
  1533. unsigned32 ColorFormatExtension: 1;
  1534. unsigned32 pad1: 15;
  1535. } __GigiDitherModeFmat;
  1536. #endif
  1537. /*
  1538. ** GIGI Logic Ops and WriteMask Registers
  1539. */
  1540. #if BIG_ENDIAN == 1
  1541. typedef struct {
  1542. unsigned32 pad0: 26;
  1543. unsigned32 UseConstantFBWriteData: 1;
  1544. unsigned32 LogicalOp: 4;
  1545. unsigned32 LogicalOpEnable: 1;
  1546. } __GigiLogicalOpModeFmat;
  1547. #else
  1548. typedef struct {
  1549. unsigned32 LogicalOpEnable: 1;
  1550. unsigned32 LogicalOp: 4;
  1551. unsigned32 UseConstantFBWriteData: 1;
  1552. unsigned32 pad0: 26;
  1553. } __GigiLogicalOpModeFmat;
  1554. #endif
  1555. typedef __GigiFBFmat __GigiFBWriteDataFmat;
  1556. typedef __GigiFBFmat __GigiFBSoftwareWriteMaskFmat;
  1557. /*
  1558. ** GIGI Host Out Registers
  1559. */
  1560. #if BIG_ENDIAN == 1
  1561. typedef struct {
  1562. unsigned32 pad0: 16;
  1563. unsigned32 Remainder: 2;
  1564. unsigned32 Statistics: 2;
  1565. unsigned32 Synchronization: 2;
  1566. unsigned32 Color: 2;
  1567. unsigned32 Stencil: 2;
  1568. unsigned32 Depth: 2;
  1569. unsigned32 Passive: 2;
  1570. unsigned32 Active: 2;
  1571. } __GigiFilterModeFmat;
  1572. #else
  1573. typedef struct {
  1574. unsigned32 Active: 2;
  1575. unsigned32 Passive: 2;
  1576. unsigned32 Depth: 2;
  1577. unsigned32 Stencil: 2;
  1578. unsigned32 Color: 2;
  1579. unsigned32 Synchronization: 2;
  1580. unsigned32 Statistics: 2;
  1581. unsigned32 Remainder: 2;
  1582. unsigned32 pad0: 16;
  1583. } __GigiFilterModeFmat;
  1584. #endif
  1585. #if BIG_ENDIAN == 1
  1586. typedef struct {
  1587. unsigned32 pad0: 26;
  1588. unsigned32 Spans: 1;
  1589. unsigned32 CompareFunction: 1;
  1590. unsigned32 PassiveSteps: 1;
  1591. unsigned32 ActiveSteps: 1;
  1592. unsigned32 StatType: 1;
  1593. unsigned32 Enable: 1;
  1594. } __GigiStatisticModeFmat;
  1595. #else
  1596. typedef struct {
  1597. unsigned32 Enable: 1;
  1598. unsigned32 StatType: 1;
  1599. unsigned32 ActiveSteps: 1;
  1600. unsigned32 PassiveSteps: 1;
  1601. unsigned32 CompareFunction: 1;
  1602. unsigned32 Spans: 1;
  1603. unsigned32 pad0: 26;
  1604. } __GigiStatisticModeFmat;
  1605. #endif
  1606. #if BIG_ENDIAN == 1
  1607. typedef struct {
  1608. unsigned32 InterruptEnable: 1;
  1609. unsigned32 pad0: 31;
  1610. } __GigiSyncFmat;
  1611. #else
  1612. typedef struct {
  1613. unsigned32 pad0: 31;
  1614. unsigned32 InterruptEnable: 1;
  1615. } __GigiSyncFmat;
  1616. #endif
  1617. #if BIG_ENDIAN == 1
  1618. typedef struct {
  1619. unsigned32 pad1: 4;
  1620. signed32 Y: 12;
  1621. unsigned32 pad0: 4;
  1622. signed32 X: 12;
  1623. } __GigiMinRegionFmat,
  1624. __GigiMaxRegionFmat,
  1625. __GigiMinHitRegionFmat,
  1626. __GigiMaxHitRegionFmat;
  1627. #else
  1628. typedef struct {
  1629. signed32 X: 12;
  1630. unsigned32 pad0: 4;
  1631. signed32 Y: 12;
  1632. unsigned32 pad1: 4;
  1633. } __GigiMinRegionFmat,
  1634. __GigiMaxRegionFmat,
  1635. __GigiMinHitRegionFmat,
  1636. __GigiMaxHitRegionFmat;
  1637. #endif
  1638. #if BIG_ENDIAN == 1
  1639. typedef struct {
  1640. unsigned32 pad0: 30;
  1641. unsigned32 BusyFlag: 1;
  1642. unsigned32 PickFlag: 1;
  1643. } __GigiPickResultFmat;
  1644. #else
  1645. typedef struct {
  1646. unsigned32 PickFlag: 1;
  1647. unsigned32 BusyFlag: 1;
  1648. unsigned32 pad0: 30;
  1649. } __GigiPickResultFmat;
  1650. #endif
  1651. #if BIG_ENDIAN == 1
  1652. typedef struct {
  1653. unsigned32 pad0: 12;
  1654. unsigned32 screenbase: 20;
  1655. } __GigiSuspendUntilFrameBlankFmat;
  1656. #else
  1657. typedef struct {
  1658. unsigned32 screenbase: 20;
  1659. unsigned32 pad0: 12;
  1660. } __GigiSuspendUntilFrameBlankFmat;
  1661. #endif
  1662. typedef __GigiUnsignedIntegerFmat __GigiResetPickResultFmat;
  1663. #if BIG_ENDIAN == 1
  1664. typedef struct {
  1665. unsigned32 pad: 31;
  1666. unsigned32 value: 1;
  1667. } __GigiPCITextureCacheFmat;
  1668. #else
  1669. typedef struct {
  1670. unsigned32 value: 1;
  1671. unsigned32 pad: 31;
  1672. } __GigiPCITextureCacheFmat;
  1673. #endif
  1674. typedef __GigiPCITextureCacheFmat __GigiPCIReadTextureCacheFmat;
  1675. typedef __GigiPCITextureCacheFmat __GigiPCIWriteTextureCacheFmat;
  1676. #endif /* GIGIREG_H */