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.

1780 lines
50 KiB

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