via_3d_reg.h 66 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650
  1. /*
  2. * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
  3. * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved.
  4. *
  5. * Permission is hereby granted, free of charge, to any person obtaining a
  6. * copy of this software and associated documentation files (the "Software"),
  7. * to deal in the Software without restriction, including without limitation
  8. * the rights to use, copy, modify, merge, publish, distribute, sub license,
  9. * and/or sell copies of the Software, and to permit persons to whom the
  10. * Software is furnished to do so, subject to the following conditions:
  11. *
  12. * The above copyright notice and this permission notice (including the
  13. * next paragraph) shall be included in all copies or substantial portions
  14. * of the Software.
  15. *
  16. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18. * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
  19. * VIA, S3 GRAPHICS, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
  20. * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  21. * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  22. * DEALINGS IN THE SOFTWARE.
  23. */
  24. #ifndef VIA_3D_REG_H
  25. #define VIA_3D_REG_H
  26. #define HC_REG_BASE 0x0400
  27. #define HC_REG_TRANS_SPACE 0x0040
  28. #define HC_ParaN_MASK 0xffffffff
  29. #define HC_Para_MASK 0x00ffffff
  30. #define HC_SubA_MASK 0xff000000
  31. #define HC_SubA_SHIFT 24
  32. /* Transmission Setting
  33. */
  34. #define HC_REG_TRANS_SET 0x003c
  35. #define HC_ParaSubType_MASK 0xff000000
  36. #define HC_ParaType_MASK 0x00ff0000
  37. #define HC_ParaOS_MASK 0x0000ff00
  38. #define HC_ParaAdr_MASK 0x000000ff
  39. #define HC_ParaSubType_SHIFT 24
  40. #define HC_ParaType_SHIFT 16
  41. #define HC_ParaOS_SHIFT 8
  42. #define HC_ParaAdr_SHIFT 0
  43. #define HC_ParaType_CmdVdata 0x0000
  44. #define HC_ParaType_NotTex 0x0001
  45. #define HC_ParaType_Tex 0x0002
  46. #define HC_ParaType_Palette 0x0003
  47. #define HC_ParaType_PreCR 0x0010
  48. #define HC_ParaType_Auto 0x00fe
  49. /* Transmission Space
  50. */
  51. #define HC_REG_Hpara0 0x0040
  52. #define HC_REG_HpataAF 0x02fc
  53. /* Read
  54. */
  55. #define HC_REG_HREngSt 0x0000
  56. #define HC_REG_HRFIFOempty 0x0004
  57. #define HC_REG_HRFIFOfull 0x0008
  58. #define HC_REG_HRErr 0x000c
  59. #define HC_REG_FIFOstatus 0x0010
  60. /* HC_REG_HREngSt 0x0000
  61. */
  62. #define HC_HDASZC_MASK 0x00010000
  63. #define HC_HSGEMI_MASK 0x0000f000
  64. #define HC_HLGEMISt_MASK 0x00000f00
  65. #define HC_HCRSt_MASK 0x00000080
  66. #define HC_HSE0St_MASK 0x00000040
  67. #define HC_HSE1St_MASK 0x00000020
  68. #define HC_HPESt_MASK 0x00000010
  69. #define HC_HXESt_MASK 0x00000008
  70. #define HC_HBESt_MASK 0x00000004
  71. #define HC_HE2St_MASK 0x00000002
  72. #define HC_HE3St_MASK 0x00000001
  73. /* HC_REG_HRFIFOempty 0x0004
  74. */
  75. #define HC_HRZDempty_MASK 0x00000010
  76. #define HC_HRTXAempty_MASK 0x00000008
  77. #define HC_HRTXDempty_MASK 0x00000004
  78. #define HC_HWZDempty_MASK 0x00000002
  79. #define HC_HWCDempty_MASK 0x00000001
  80. /* HC_REG_HRFIFOfull 0x0008
  81. */
  82. #define HC_HRZDfull_MASK 0x00000010
  83. #define HC_HRTXAfull_MASK 0x00000008
  84. #define HC_HRTXDfull_MASK 0x00000004
  85. #define HC_HWZDfull_MASK 0x00000002
  86. #define HC_HWCDfull_MASK 0x00000001
  87. /* HC_REG_HRErr 0x000c
  88. */
  89. #define HC_HAGPCMErr_MASK 0x80000000
  90. #define HC_HAGPCMErrC_MASK 0x70000000
  91. /* HC_REG_FIFOstatus 0x0010
  92. */
  93. #define HC_HRFIFOATall_MASK 0x80000000
  94. #define HC_HRFIFOATbusy_MASK 0x40000000
  95. #define HC_HRATFGMDo_MASK 0x00000100
  96. #define HC_HRATFGMDi_MASK 0x00000080
  97. #define HC_HRATFRZD_MASK 0x00000040
  98. #define HC_HRATFRTXA_MASK 0x00000020
  99. #define HC_HRATFRTXD_MASK 0x00000010
  100. #define HC_HRATFWZD_MASK 0x00000008
  101. #define HC_HRATFWCD_MASK 0x00000004
  102. #define HC_HRATTXTAG_MASK 0x00000002
  103. #define HC_HRATTXCH_MASK 0x00000001
  104. /* AGP Command Setting
  105. */
  106. #define HC_SubA_HAGPBstL 0x0060
  107. #define HC_SubA_HAGPBendL 0x0061
  108. #define HC_SubA_HAGPCMNT 0x0062
  109. #define HC_SubA_HAGPBpL 0x0063
  110. #define HC_SubA_HAGPBpH 0x0064
  111. /* HC_SubA_HAGPCMNT 0x0062
  112. */
  113. #define HC_HAGPCMNT_MASK 0x00800000
  114. #define HC_HCmdErrClr_MASK 0x00400000
  115. #define HC_HAGPBendH_MASK 0x0000ff00
  116. #define HC_HAGPBstH_MASK 0x000000ff
  117. #define HC_HAGPBendH_SHIFT 8
  118. #define HC_HAGPBstH_SHIFT 0
  119. /* HC_SubA_HAGPBpL 0x0063
  120. */
  121. #define HC_HAGPBpL_MASK 0x00fffffc
  122. #define HC_HAGPBpID_MASK 0x00000003
  123. #define HC_HAGPBpID_PAUSE 0x00000000
  124. #define HC_HAGPBpID_JUMP 0x00000001
  125. #define HC_HAGPBpID_STOP 0x00000002
  126. /* HC_SubA_HAGPBpH 0x0064
  127. */
  128. #define HC_HAGPBpH_MASK 0x00ffffff
  129. /* Miscellaneous Settings
  130. */
  131. #define HC_SubA_HClipTB 0x0070
  132. #define HC_SubA_HClipLR 0x0071
  133. #define HC_SubA_HFPClipTL 0x0072
  134. #define HC_SubA_HFPClipBL 0x0073
  135. #define HC_SubA_HFPClipLL 0x0074
  136. #define HC_SubA_HFPClipRL 0x0075
  137. #define HC_SubA_HFPClipTBH 0x0076
  138. #define HC_SubA_HFPClipLRH 0x0077
  139. #define HC_SubA_HLP 0x0078
  140. #define HC_SubA_HLPRF 0x0079
  141. #define HC_SubA_HSolidCL 0x007a
  142. #define HC_SubA_HPixGC 0x007b
  143. #define HC_SubA_HSPXYOS 0x007c
  144. #define HC_SubA_HVertexCNT 0x007d
  145. #define HC_HClipT_MASK 0x00fff000
  146. #define HC_HClipT_SHIFT 12
  147. #define HC_HClipB_MASK 0x00000fff
  148. #define HC_HClipB_SHIFT 0
  149. #define HC_HClipL_MASK 0x00fff000
  150. #define HC_HClipL_SHIFT 12
  151. #define HC_HClipR_MASK 0x00000fff
  152. #define HC_HClipR_SHIFT 0
  153. #define HC_HFPClipBH_MASK 0x0000ff00
  154. #define HC_HFPClipBH_SHIFT 8
  155. #define HC_HFPClipTH_MASK 0x000000ff
  156. #define HC_HFPClipTH_SHIFT 0
  157. #define HC_HFPClipRH_MASK 0x0000ff00
  158. #define HC_HFPClipRH_SHIFT 8
  159. #define HC_HFPClipLH_MASK 0x000000ff
  160. #define HC_HFPClipLH_SHIFT 0
  161. #define HC_HSolidCH_MASK 0x000000ff
  162. #define HC_HPixGC_MASK 0x00800000
  163. #define HC_HSPXOS_MASK 0x00fff000
  164. #define HC_HSPXOS_SHIFT 12
  165. #define HC_HSPYOS_MASK 0x00000fff
  166. /* Command
  167. * Command A
  168. */
  169. #define HC_HCmdHeader_MASK 0xfe000000 /*0xffe00000 */
  170. #define HC_HE3Fire_MASK 0x00100000
  171. #define HC_HPMType_MASK 0x000f0000
  172. #define HC_HEFlag_MASK 0x0000e000
  173. #define HC_HShading_MASK 0x00001c00
  174. #define HC_HPMValidN_MASK 0x00000200
  175. #define HC_HPLEND_MASK 0x00000100
  176. #define HC_HVCycle_MASK 0x000000ff
  177. #define HC_HVCycle_Style_MASK 0x000000c0
  178. #define HC_HVCycle_ChgA_MASK 0x00000030
  179. #define HC_HVCycle_ChgB_MASK 0x0000000c
  180. #define HC_HVCycle_ChgC_MASK 0x00000003
  181. #define HC_HPMType_Point 0x00000000
  182. #define HC_HPMType_Line 0x00010000
  183. #define HC_HPMType_Tri 0x00020000
  184. #define HC_HPMType_TriWF 0x00040000
  185. #define HC_HEFlag_NoAA 0x00000000
  186. #define HC_HEFlag_ab 0x00008000
  187. #define HC_HEFlag_bc 0x00004000
  188. #define HC_HEFlag_ca 0x00002000
  189. #define HC_HShading_Solid 0x00000000
  190. #define HC_HShading_FlatA 0x00000400
  191. #define HC_HShading_FlatB 0x00000800
  192. #define HC_HShading_FlatC 0x00000c00
  193. #define HC_HShading_Gouraud 0x00001000
  194. #define HC_HVCycle_Full 0x00000000
  195. #define HC_HVCycle_AFP 0x00000040
  196. #define HC_HVCycle_One 0x000000c0
  197. #define HC_HVCycle_NewA 0x00000000
  198. #define HC_HVCycle_AA 0x00000010
  199. #define HC_HVCycle_AB 0x00000020
  200. #define HC_HVCycle_AC 0x00000030
  201. #define HC_HVCycle_NewB 0x00000000
  202. #define HC_HVCycle_BA 0x00000004
  203. #define HC_HVCycle_BB 0x00000008
  204. #define HC_HVCycle_BC 0x0000000c
  205. #define HC_HVCycle_NewC 0x00000000
  206. #define HC_HVCycle_CA 0x00000001
  207. #define HC_HVCycle_CB 0x00000002
  208. #define HC_HVCycle_CC 0x00000003
  209. /* Command B
  210. */
  211. #define HC_HLPrst_MASK 0x00010000
  212. #define HC_HLLastP_MASK 0x00008000
  213. #define HC_HVPMSK_MASK 0x00007f80
  214. #define HC_HBFace_MASK 0x00000040
  215. #define HC_H2nd1VT_MASK 0x0000003f
  216. #define HC_HVPMSK_X 0x00004000
  217. #define HC_HVPMSK_Y 0x00002000
  218. #define HC_HVPMSK_Z 0x00001000
  219. #define HC_HVPMSK_W 0x00000800
  220. #define HC_HVPMSK_Cd 0x00000400
  221. #define HC_HVPMSK_Cs 0x00000200
  222. #define HC_HVPMSK_S 0x00000100
  223. #define HC_HVPMSK_T 0x00000080
  224. /* Enable Setting
  225. */
  226. #define HC_SubA_HEnable 0x0000
  227. #define HC_HenTXEnvMap_MASK 0x00200000
  228. #define HC_HenVertexCNT_MASK 0x00100000
  229. #define HC_HenCPUDAZ_MASK 0x00080000
  230. #define HC_HenDASZWC_MASK 0x00040000
  231. #define HC_HenFBCull_MASK 0x00020000
  232. #define HC_HenCW_MASK 0x00010000
  233. #define HC_HenAA_MASK 0x00008000
  234. #define HC_HenST_MASK 0x00004000
  235. #define HC_HenZT_MASK 0x00002000
  236. #define HC_HenZW_MASK 0x00001000
  237. #define HC_HenAT_MASK 0x00000800
  238. #define HC_HenAW_MASK 0x00000400
  239. #define HC_HenSP_MASK 0x00000200
  240. #define HC_HenLP_MASK 0x00000100
  241. #define HC_HenTXCH_MASK 0x00000080
  242. #define HC_HenTXMP_MASK 0x00000040
  243. #define HC_HenTXPP_MASK 0x00000020
  244. #define HC_HenTXTR_MASK 0x00000010
  245. #define HC_HenCS_MASK 0x00000008
  246. #define HC_HenFOG_MASK 0x00000004
  247. #define HC_HenABL_MASK 0x00000002
  248. #define HC_HenDT_MASK 0x00000001
  249. /* Z Setting
  250. */
  251. #define HC_SubA_HZWBBasL 0x0010
  252. #define HC_SubA_HZWBBasH 0x0011
  253. #define HC_SubA_HZWBType 0x0012
  254. #define HC_SubA_HZBiasL 0x0013
  255. #define HC_SubA_HZWBend 0x0014
  256. #define HC_SubA_HZWTMD 0x0015
  257. #define HC_SubA_HZWCDL 0x0016
  258. #define HC_SubA_HZWCTAGnum 0x0017
  259. #define HC_SubA_HZCYNum 0x0018
  260. #define HC_SubA_HZWCFire 0x0019
  261. /* HC_SubA_HZWBType
  262. */
  263. #define HC_HZWBType_MASK 0x00800000
  264. #define HC_HZBiasedWB_MASK 0x00400000
  265. #define HC_HZONEasFF_MASK 0x00200000
  266. #define HC_HZOONEasFF_MASK 0x00100000
  267. #define HC_HZWBFM_MASK 0x00030000
  268. #define HC_HZWBLoc_MASK 0x0000c000
  269. #define HC_HZWBPit_MASK 0x00003fff
  270. #define HC_HZWBFM_16 0x00000000
  271. #define HC_HZWBFM_32 0x00020000
  272. #define HC_HZWBFM_24 0x00030000
  273. #define HC_HZWBLoc_Local 0x00000000
  274. #define HC_HZWBLoc_SyS 0x00004000
  275. /* HC_SubA_HZWBend
  276. */
  277. #define HC_HZWBend_MASK 0x00ffe000
  278. #define HC_HZBiasH_MASK 0x000000ff
  279. #define HC_HZWBend_SHIFT 10
  280. /* HC_SubA_HZWTMD
  281. */
  282. #define HC_HZWTMD_MASK 0x00070000
  283. #define HC_HEBEBias_MASK 0x00007f00
  284. #define HC_HZNF_MASK 0x000000ff
  285. #define HC_HZWTMD_NeverPass 0x00000000
  286. #define HC_HZWTMD_LT 0x00010000
  287. #define HC_HZWTMD_EQ 0x00020000
  288. #define HC_HZWTMD_LE 0x00030000
  289. #define HC_HZWTMD_GT 0x00040000
  290. #define HC_HZWTMD_NE 0x00050000
  291. #define HC_HZWTMD_GE 0x00060000
  292. #define HC_HZWTMD_AllPass 0x00070000
  293. #define HC_HEBEBias_SHIFT 8
  294. /* HC_SubA_HZWCDL 0x0016
  295. */
  296. #define HC_HZWCDL_MASK 0x00ffffff
  297. /* HC_SubA_HZWCTAGnum 0x0017
  298. */
  299. #define HC_HZWCTAGnum_MASK 0x00ff0000
  300. #define HC_HZWCTAGnum_SHIFT 16
  301. #define HC_HZWCDH_MASK 0x000000ff
  302. #define HC_HZWCDH_SHIFT 0
  303. /* HC_SubA_HZCYNum 0x0018
  304. */
  305. #define HC_HZCYNum_MASK 0x00030000
  306. #define HC_HZCYNum_SHIFT 16
  307. #define HC_HZWCQWnum_MASK 0x00003fff
  308. #define HC_HZWCQWnum_SHIFT 0
  309. /* HC_SubA_HZWCFire 0x0019
  310. */
  311. #define HC_ZWCFire_MASK 0x00010000
  312. #define HC_HZWCQWnumLast_MASK 0x00003fff
  313. #define HC_HZWCQWnumLast_SHIFT 0
  314. /* Stencil Setting
  315. */
  316. #define HC_SubA_HSTREF 0x0023
  317. #define HC_SubA_HSTMD 0x0024
  318. /* HC_SubA_HSBFM
  319. */
  320. #define HC_HSBFM_MASK 0x00030000
  321. #define HC_HSBLoc_MASK 0x0000c000
  322. #define HC_HSBPit_MASK 0x00003fff
  323. /* HC_SubA_HSTREF
  324. */
  325. #define HC_HSTREF_MASK 0x00ff0000
  326. #define HC_HSTOPMSK_MASK 0x0000ff00
  327. #define HC_HSTBMSK_MASK 0x000000ff
  328. #define HC_HSTREF_SHIFT 16
  329. #define HC_HSTOPMSK_SHIFT 8
  330. /* HC_SubA_HSTMD
  331. */
  332. #define HC_HSTMD_MASK 0x00070000
  333. #define HC_HSTOPSF_MASK 0x000001c0
  334. #define HC_HSTOPSPZF_MASK 0x00000038
  335. #define HC_HSTOPSPZP_MASK 0x00000007
  336. #define HC_HSTMD_NeverPass 0x00000000
  337. #define HC_HSTMD_LT 0x00010000
  338. #define HC_HSTMD_EQ 0x00020000
  339. #define HC_HSTMD_LE 0x00030000
  340. #define HC_HSTMD_GT 0x00040000
  341. #define HC_HSTMD_NE 0x00050000
  342. #define HC_HSTMD_GE 0x00060000
  343. #define HC_HSTMD_AllPass 0x00070000
  344. #define HC_HSTOPSF_KEEP 0x00000000
  345. #define HC_HSTOPSF_ZERO 0x00000040
  346. #define HC_HSTOPSF_REPLACE 0x00000080
  347. #define HC_HSTOPSF_INCRSAT 0x000000c0
  348. #define HC_HSTOPSF_DECRSAT 0x00000100
  349. #define HC_HSTOPSF_INVERT 0x00000140
  350. #define HC_HSTOPSF_INCR 0x00000180
  351. #define HC_HSTOPSF_DECR 0x000001c0
  352. #define HC_HSTOPSPZF_KEEP 0x00000000
  353. #define HC_HSTOPSPZF_ZERO 0x00000008
  354. #define HC_HSTOPSPZF_REPLACE 0x00000010
  355. #define HC_HSTOPSPZF_INCRSAT 0x00000018
  356. #define HC_HSTOPSPZF_DECRSAT 0x00000020
  357. #define HC_HSTOPSPZF_INVERT 0x00000028
  358. #define HC_HSTOPSPZF_INCR 0x00000030
  359. #define HC_HSTOPSPZF_DECR 0x00000038
  360. #define HC_HSTOPSPZP_KEEP 0x00000000
  361. #define HC_HSTOPSPZP_ZERO 0x00000001
  362. #define HC_HSTOPSPZP_REPLACE 0x00000002
  363. #define HC_HSTOPSPZP_INCRSAT 0x00000003
  364. #define HC_HSTOPSPZP_DECRSAT 0x00000004
  365. #define HC_HSTOPSPZP_INVERT 0x00000005
  366. #define HC_HSTOPSPZP_INCR 0x00000006
  367. #define HC_HSTOPSPZP_DECR 0x00000007
  368. /* Alpha Setting
  369. */
  370. #define HC_SubA_HABBasL 0x0030
  371. #define HC_SubA_HABBasH 0x0031
  372. #define HC_SubA_HABFM 0x0032
  373. #define HC_SubA_HATMD 0x0033
  374. #define HC_SubA_HABLCsat 0x0034
  375. #define HC_SubA_HABLCop 0x0035
  376. #define HC_SubA_HABLAsat 0x0036
  377. #define HC_SubA_HABLAop 0x0037
  378. #define HC_SubA_HABLRCa 0x0038
  379. #define HC_SubA_HABLRFCa 0x0039
  380. #define HC_SubA_HABLRCbias 0x003a
  381. #define HC_SubA_HABLRCb 0x003b
  382. #define HC_SubA_HABLRFCb 0x003c
  383. #define HC_SubA_HABLRAa 0x003d
  384. #define HC_SubA_HABLRAb 0x003e
  385. /* HC_SubA_HABFM
  386. */
  387. #define HC_HABFM_MASK 0x00030000
  388. #define HC_HABLoc_MASK 0x0000c000
  389. #define HC_HABPit_MASK 0x000007ff
  390. /* HC_SubA_HATMD
  391. */
  392. #define HC_HATMD_MASK 0x00000700
  393. #define HC_HATREF_MASK 0x000000ff
  394. #define HC_HATMD_NeverPass 0x00000000
  395. #define HC_HATMD_LT 0x00000100
  396. #define HC_HATMD_EQ 0x00000200
  397. #define HC_HATMD_LE 0x00000300
  398. #define HC_HATMD_GT 0x00000400
  399. #define HC_HATMD_NE 0x00000500
  400. #define HC_HATMD_GE 0x00000600
  401. #define HC_HATMD_AllPass 0x00000700
  402. /* HC_SubA_HABLCsat
  403. */
  404. #define HC_HABLCsat_MASK 0x00010000
  405. #define HC_HABLCa_MASK 0x0000fc00
  406. #define HC_HABLCa_C_MASK 0x0000c000
  407. #define HC_HABLCa_OPC_MASK 0x00003c00
  408. #define HC_HABLFCa_MASK 0x000003f0
  409. #define HC_HABLFCa_C_MASK 0x00000300
  410. #define HC_HABLFCa_OPC_MASK 0x000000f0
  411. #define HC_HABLCbias_MASK 0x0000000f
  412. #define HC_HABLCbias_C_MASK 0x00000008
  413. #define HC_HABLCbias_OPC_MASK 0x00000007
  414. /*-- Define the input color.
  415. */
  416. #define HC_XC_Csrc 0x00000000
  417. #define HC_XC_Cdst 0x00000001
  418. #define HC_XC_Asrc 0x00000002
  419. #define HC_XC_Adst 0x00000003
  420. #define HC_XC_Fog 0x00000004
  421. #define HC_XC_HABLRC 0x00000005
  422. #define HC_XC_minSrcDst 0x00000006
  423. #define HC_XC_maxSrcDst 0x00000007
  424. #define HC_XC_mimAsrcInvAdst 0x00000008
  425. #define HC_XC_OPC 0x00000000
  426. #define HC_XC_InvOPC 0x00000010
  427. #define HC_XC_OPCp5 0x00000020
  428. /*-- Define the input Alpha
  429. */
  430. #define HC_XA_OPA 0x00000000
  431. #define HC_XA_InvOPA 0x00000010
  432. #define HC_XA_OPAp5 0x00000020
  433. #define HC_XA_0 0x00000000
  434. #define HC_XA_Asrc 0x00000001
  435. #define HC_XA_Adst 0x00000002
  436. #define HC_XA_Fog 0x00000003
  437. #define HC_XA_minAsrcFog 0x00000004
  438. #define HC_XA_minAsrcAdst 0x00000005
  439. #define HC_XA_maxAsrcFog 0x00000006
  440. #define HC_XA_maxAsrcAdst 0x00000007
  441. #define HC_XA_HABLRA 0x00000008
  442. #define HC_XA_minAsrcInvAdst 0x00000008
  443. #define HC_XA_HABLFRA 0x00000009
  444. /*--
  445. */
  446. #define HC_HABLCa_OPC (HC_XC_OPC << 10)
  447. #define HC_HABLCa_InvOPC (HC_XC_InvOPC << 10)
  448. #define HC_HABLCa_OPCp5 (HC_XC_OPCp5 << 10)
  449. #define HC_HABLCa_Csrc (HC_XC_Csrc << 10)
  450. #define HC_HABLCa_Cdst (HC_XC_Cdst << 10)
  451. #define HC_HABLCa_Asrc (HC_XC_Asrc << 10)
  452. #define HC_HABLCa_Adst (HC_XC_Adst << 10)
  453. #define HC_HABLCa_Fog (HC_XC_Fog << 10)
  454. #define HC_HABLCa_HABLRCa (HC_XC_HABLRC << 10)
  455. #define HC_HABLCa_minSrcDst (HC_XC_minSrcDst << 10)
  456. #define HC_HABLCa_maxSrcDst (HC_XC_maxSrcDst << 10)
  457. #define HC_HABLFCa_OPC (HC_XC_OPC << 4)
  458. #define HC_HABLFCa_InvOPC (HC_XC_InvOPC << 4)
  459. #define HC_HABLFCa_OPCp5 (HC_XC_OPCp5 << 4)
  460. #define HC_HABLFCa_Csrc (HC_XC_Csrc << 4)
  461. #define HC_HABLFCa_Cdst (HC_XC_Cdst << 4)
  462. #define HC_HABLFCa_Asrc (HC_XC_Asrc << 4)
  463. #define HC_HABLFCa_Adst (HC_XC_Adst << 4)
  464. #define HC_HABLFCa_Fog (HC_XC_Fog << 4)
  465. #define HC_HABLFCa_HABLRCa (HC_XC_HABLRC << 4)
  466. #define HC_HABLFCa_minSrcDst (HC_XC_minSrcDst << 4)
  467. #define HC_HABLFCa_maxSrcDst (HC_XC_maxSrcDst << 4)
  468. #define HC_HABLFCa_mimAsrcInvAdst (HC_XC_mimAsrcInvAdst << 4)
  469. #define HC_HABLCbias_HABLRCbias 0x00000000
  470. #define HC_HABLCbias_Asrc 0x00000001
  471. #define HC_HABLCbias_Adst 0x00000002
  472. #define HC_HABLCbias_Fog 0x00000003
  473. #define HC_HABLCbias_Cin 0x00000004
  474. /* HC_SubA_HABLCop 0x0035
  475. */
  476. #define HC_HABLdot_MASK 0x00010000
  477. #define HC_HABLCop_MASK 0x00004000
  478. #define HC_HABLCb_MASK 0x00003f00
  479. #define HC_HABLCb_C_MASK 0x00003000
  480. #define HC_HABLCb_OPC_MASK 0x00000f00
  481. #define HC_HABLFCb_MASK 0x000000fc
  482. #define HC_HABLFCb_C_MASK 0x000000c0
  483. #define HC_HABLFCb_OPC_MASK 0x0000003c
  484. #define HC_HABLCshift_MASK 0x00000003
  485. #define HC_HABLCb_OPC (HC_XC_OPC << 8)
  486. #define HC_HABLCb_InvOPC (HC_XC_InvOPC << 8)
  487. #define HC_HABLCb_OPCp5 (HC_XC_OPCp5 << 8)
  488. #define HC_HABLCb_Csrc (HC_XC_Csrc << 8)
  489. #define HC_HABLCb_Cdst (HC_XC_Cdst << 8)
  490. #define HC_HABLCb_Asrc (HC_XC_Asrc << 8)
  491. #define HC_HABLCb_Adst (HC_XC_Adst << 8)
  492. #define HC_HABLCb_Fog (HC_XC_Fog << 8)
  493. #define HC_HABLCb_HABLRCa (HC_XC_HABLRC << 8)
  494. #define HC_HABLCb_minSrcDst (HC_XC_minSrcDst << 8)
  495. #define HC_HABLCb_maxSrcDst (HC_XC_maxSrcDst << 8)
  496. #define HC_HABLFCb_OPC (HC_XC_OPC << 2)
  497. #define HC_HABLFCb_InvOPC (HC_XC_InvOPC << 2)
  498. #define HC_HABLFCb_OPCp5 (HC_XC_OPCp5 << 2)
  499. #define HC_HABLFCb_Csrc (HC_XC_Csrc << 2)
  500. #define HC_HABLFCb_Cdst (HC_XC_Cdst << 2)
  501. #define HC_HABLFCb_Asrc (HC_XC_Asrc << 2)
  502. #define HC_HABLFCb_Adst (HC_XC_Adst << 2)
  503. #define HC_HABLFCb_Fog (HC_XC_Fog << 2)
  504. #define HC_HABLFCb_HABLRCb (HC_XC_HABLRC << 2)
  505. #define HC_HABLFCb_minSrcDst (HC_XC_minSrcDst << 2)
  506. #define HC_HABLFCb_maxSrcDst (HC_XC_maxSrcDst << 2)
  507. #define HC_HABLFCb_mimAsrcInvAdst (HC_XC_mimAsrcInvAdst << 2)
  508. /* HC_SubA_HABLAsat 0x0036
  509. */
  510. #define HC_HABLAsat_MASK 0x00010000
  511. #define HC_HABLAa_MASK 0x0000fc00
  512. #define HC_HABLAa_A_MASK 0x0000c000
  513. #define HC_HABLAa_OPA_MASK 0x00003c00
  514. #define HC_HABLFAa_MASK 0x000003f0
  515. #define HC_HABLFAa_A_MASK 0x00000300
  516. #define HC_HABLFAa_OPA_MASK 0x000000f0
  517. #define HC_HABLAbias_MASK 0x0000000f
  518. #define HC_HABLAbias_A_MASK 0x00000008
  519. #define HC_HABLAbias_OPA_MASK 0x00000007
  520. #define HC_HABLAa_OPA (HC_XA_OPA << 10)
  521. #define HC_HABLAa_InvOPA (HC_XA_InvOPA << 10)
  522. #define HC_HABLAa_OPAp5 (HC_XA_OPAp5 << 10)
  523. #define HC_HABLAa_0 (HC_XA_0 << 10)
  524. #define HC_HABLAa_Asrc (HC_XA_Asrc << 10)
  525. #define HC_HABLAa_Adst (HC_XA_Adst << 10)
  526. #define HC_HABLAa_Fog (HC_XA_Fog << 10)
  527. #define HC_HABLAa_minAsrcFog (HC_XA_minAsrcFog << 10)
  528. #define HC_HABLAa_minAsrcAdst (HC_XA_minAsrcAdst << 10)
  529. #define HC_HABLAa_maxAsrcFog (HC_XA_maxAsrcFog << 10)
  530. #define HC_HABLAa_maxAsrcAdst (HC_XA_maxAsrcAdst << 10)
  531. #define HC_HABLAa_HABLRA (HC_XA_HABLRA << 10)
  532. #define HC_HABLFAa_OPA (HC_XA_OPA << 4)
  533. #define HC_HABLFAa_InvOPA (HC_XA_InvOPA << 4)
  534. #define HC_HABLFAa_OPAp5 (HC_XA_OPAp5 << 4)
  535. #define HC_HABLFAa_0 (HC_XA_0 << 4)
  536. #define HC_HABLFAa_Asrc (HC_XA_Asrc << 4)
  537. #define HC_HABLFAa_Adst (HC_XA_Adst << 4)
  538. #define HC_HABLFAa_Fog (HC_XA_Fog << 4)
  539. #define HC_HABLFAa_minAsrcFog (HC_XA_minAsrcFog << 4)
  540. #define HC_HABLFAa_minAsrcAdst (HC_XA_minAsrcAdst << 4)
  541. #define HC_HABLFAa_maxAsrcFog (HC_XA_maxAsrcFog << 4)
  542. #define HC_HABLFAa_maxAsrcAdst (HC_XA_maxAsrcAdst << 4)
  543. #define HC_HABLFAa_minAsrcInvAdst (HC_XA_minAsrcInvAdst << 4)
  544. #define HC_HABLFAa_HABLFRA (HC_XA_HABLFRA << 4)
  545. #define HC_HABLAbias_HABLRAbias 0x00000000
  546. #define HC_HABLAbias_Asrc 0x00000001
  547. #define HC_HABLAbias_Adst 0x00000002
  548. #define HC_HABLAbias_Fog 0x00000003
  549. #define HC_HABLAbias_Aaa 0x00000004
  550. /* HC_SubA_HABLAop 0x0037
  551. */
  552. #define HC_HABLAop_MASK 0x00004000
  553. #define HC_HABLAb_MASK 0x00003f00
  554. #define HC_HABLAb_OPA_MASK 0x00000f00
  555. #define HC_HABLFAb_MASK 0x000000fc
  556. #define HC_HABLFAb_OPA_MASK 0x0000003c
  557. #define HC_HABLAshift_MASK 0x00000003
  558. #define HC_HABLAb_OPA (HC_XA_OPA << 8)
  559. #define HC_HABLAb_InvOPA (HC_XA_InvOPA << 8)
  560. #define HC_HABLAb_OPAp5 (HC_XA_OPAp5 << 8)
  561. #define HC_HABLAb_0 (HC_XA_0 << 8)
  562. #define HC_HABLAb_Asrc (HC_XA_Asrc << 8)
  563. #define HC_HABLAb_Adst (HC_XA_Adst << 8)
  564. #define HC_HABLAb_Fog (HC_XA_Fog << 8)
  565. #define HC_HABLAb_minAsrcFog (HC_XA_minAsrcFog << 8)
  566. #define HC_HABLAb_minAsrcAdst (HC_XA_minAsrcAdst << 8)
  567. #define HC_HABLAb_maxAsrcFog (HC_XA_maxAsrcFog << 8)
  568. #define HC_HABLAb_maxAsrcAdst (HC_XA_maxAsrcAdst << 8)
  569. #define HC_HABLAb_HABLRA (HC_XA_HABLRA << 8)
  570. #define HC_HABLFAb_OPA (HC_XA_OPA << 2)
  571. #define HC_HABLFAb_InvOPA (HC_XA_InvOPA << 2)
  572. #define HC_HABLFAb_OPAp5 (HC_XA_OPAp5 << 2)
  573. #define HC_HABLFAb_0 (HC_XA_0 << 2)
  574. #define HC_HABLFAb_Asrc (HC_XA_Asrc << 2)
  575. #define HC_HABLFAb_Adst (HC_XA_Adst << 2)
  576. #define HC_HABLFAb_Fog (HC_XA_Fog << 2)
  577. #define HC_HABLFAb_minAsrcFog (HC_XA_minAsrcFog << 2)
  578. #define HC_HABLFAb_minAsrcAdst (HC_XA_minAsrcAdst << 2)
  579. #define HC_HABLFAb_maxAsrcFog (HC_XA_maxAsrcFog << 2)
  580. #define HC_HABLFAb_maxAsrcAdst (HC_XA_maxAsrcAdst << 2)
  581. #define HC_HABLFAb_minAsrcInvAdst (HC_XA_minAsrcInvAdst << 2)
  582. #define HC_HABLFAb_HABLFRA (HC_XA_HABLFRA << 2)
  583. /* HC_SubA_HABLRAa 0x003d
  584. */
  585. #define HC_HABLRAa_MASK 0x00ff0000
  586. #define HC_HABLRFAa_MASK 0x0000ff00
  587. #define HC_HABLRAbias_MASK 0x000000ff
  588. #define HC_HABLRAa_SHIFT 16
  589. #define HC_HABLRFAa_SHIFT 8
  590. /* HC_SubA_HABLRAb 0x003e
  591. */
  592. #define HC_HABLRAb_MASK 0x0000ff00
  593. #define HC_HABLRFAb_MASK 0x000000ff
  594. #define HC_HABLRAb_SHIFT 8
  595. /* Destination Setting
  596. */
  597. #define HC_SubA_HDBBasL 0x0040
  598. #define HC_SubA_HDBBasH 0x0041
  599. #define HC_SubA_HDBFM 0x0042
  600. #define HC_SubA_HFBBMSKL 0x0043
  601. #define HC_SubA_HROP 0x0044
  602. /* HC_SubA_HDBFM 0x0042
  603. */
  604. #define HC_HDBFM_MASK 0x001f0000
  605. #define HC_HDBLoc_MASK 0x0000c000
  606. #define HC_HDBPit_MASK 0x00003fff
  607. #define HC_HDBFM_RGB555 0x00000000
  608. #define HC_HDBFM_RGB565 0x00010000
  609. #define HC_HDBFM_ARGB4444 0x00020000
  610. #define HC_HDBFM_ARGB1555 0x00030000
  611. #define HC_HDBFM_BGR555 0x00040000
  612. #define HC_HDBFM_BGR565 0x00050000
  613. #define HC_HDBFM_ABGR4444 0x00060000
  614. #define HC_HDBFM_ABGR1555 0x00070000
  615. #define HC_HDBFM_ARGB0888 0x00080000
  616. #define HC_HDBFM_ARGB8888 0x00090000
  617. #define HC_HDBFM_ABGR0888 0x000a0000
  618. #define HC_HDBFM_ABGR8888 0x000b0000
  619. #define HC_HDBLoc_Local 0x00000000
  620. #define HC_HDBLoc_Sys 0x00004000
  621. /* HC_SubA_HROP 0x0044
  622. */
  623. #define HC_HROP_MASK 0x00000f00
  624. #define HC_HFBBMSKH_MASK 0x000000ff
  625. #define HC_HROP_BLACK 0x00000000
  626. #define HC_HROP_DPon 0x00000100
  627. #define HC_HROP_DPna 0x00000200
  628. #define HC_HROP_Pn 0x00000300
  629. #define HC_HROP_PDna 0x00000400
  630. #define HC_HROP_Dn 0x00000500
  631. #define HC_HROP_DPx 0x00000600
  632. #define HC_HROP_DPan 0x00000700
  633. #define HC_HROP_DPa 0x00000800
  634. #define HC_HROP_DPxn 0x00000900
  635. #define HC_HROP_D 0x00000a00
  636. #define HC_HROP_DPno 0x00000b00
  637. #define HC_HROP_P 0x00000c00
  638. #define HC_HROP_PDno 0x00000d00
  639. #define HC_HROP_DPo 0x00000e00
  640. #define HC_HROP_WHITE 0x00000f00
  641. /* Fog Setting
  642. */
  643. #define HC_SubA_HFogLF 0x0050
  644. #define HC_SubA_HFogCL 0x0051
  645. #define HC_SubA_HFogCH 0x0052
  646. #define HC_SubA_HFogStL 0x0053
  647. #define HC_SubA_HFogStH 0x0054
  648. #define HC_SubA_HFogOOdMF 0x0055
  649. #define HC_SubA_HFogOOdEF 0x0056
  650. #define HC_SubA_HFogEndL 0x0057
  651. #define HC_SubA_HFogDenst 0x0058
  652. /* HC_SubA_FogLF 0x0050
  653. */
  654. #define HC_FogLF_MASK 0x00000010
  655. #define HC_FogEq_MASK 0x00000008
  656. #define HC_FogMD_MASK 0x00000007
  657. #define HC_FogMD_LocalFog 0x00000000
  658. #define HC_FogMD_LinearFog 0x00000002
  659. #define HC_FogMD_ExponentialFog 0x00000004
  660. #define HC_FogMD_Exponential2Fog 0x00000005
  661. /* #define HC_FogMD_FogTable 0x00000003 */
  662. /* HC_SubA_HFogDenst 0x0058
  663. */
  664. #define HC_FogDenst_MASK 0x001fff00
  665. #define HC_FogEndL_MASK 0x000000ff
  666. /* Texture subtype definitions
  667. */
  668. #define HC_SubType_Tex0 0x00000000
  669. #define HC_SubType_Tex1 0x00000001
  670. #define HC_SubType_TexGeneral 0x000000fe
  671. /* Attribute of texture n
  672. */
  673. #define HC_SubA_HTXnL0BasL 0x0000
  674. #define HC_SubA_HTXnL1BasL 0x0001
  675. #define HC_SubA_HTXnL2BasL 0x0002
  676. #define HC_SubA_HTXnL3BasL 0x0003
  677. #define HC_SubA_HTXnL4BasL 0x0004
  678. #define HC_SubA_HTXnL5BasL 0x0005
  679. #define HC_SubA_HTXnL6BasL 0x0006
  680. #define HC_SubA_HTXnL7BasL 0x0007
  681. #define HC_SubA_HTXnL8BasL 0x0008
  682. #define HC_SubA_HTXnL9BasL 0x0009
  683. #define HC_SubA_HTXnLaBasL 0x000a
  684. #define HC_SubA_HTXnLbBasL 0x000b
  685. #define HC_SubA_HTXnLcBasL 0x000c
  686. #define HC_SubA_HTXnLdBasL 0x000d
  687. #define HC_SubA_HTXnLeBasL 0x000e
  688. #define HC_SubA_HTXnLfBasL 0x000f
  689. #define HC_SubA_HTXnL10BasL 0x0010
  690. #define HC_SubA_HTXnL11BasL 0x0011
  691. #define HC_SubA_HTXnL012BasH 0x0020
  692. #define HC_SubA_HTXnL345BasH 0x0021
  693. #define HC_SubA_HTXnL678BasH 0x0022
  694. #define HC_SubA_HTXnL9abBasH 0x0023
  695. #define HC_SubA_HTXnLcdeBasH 0x0024
  696. #define HC_SubA_HTXnLf1011BasH 0x0025
  697. #define HC_SubA_HTXnL0Pit 0x002b
  698. #define HC_SubA_HTXnL1Pit 0x002c
  699. #define HC_SubA_HTXnL2Pit 0x002d
  700. #define HC_SubA_HTXnL3Pit 0x002e
  701. #define HC_SubA_HTXnL4Pit 0x002f
  702. #define HC_SubA_HTXnL5Pit 0x0030
  703. #define HC_SubA_HTXnL6Pit 0x0031
  704. #define HC_SubA_HTXnL7Pit 0x0032
  705. #define HC_SubA_HTXnL8Pit 0x0033
  706. #define HC_SubA_HTXnL9Pit 0x0034
  707. #define HC_SubA_HTXnLaPit 0x0035
  708. #define HC_SubA_HTXnLbPit 0x0036
  709. #define HC_SubA_HTXnLcPit 0x0037
  710. #define HC_SubA_HTXnLdPit 0x0038
  711. #define HC_SubA_HTXnLePit 0x0039
  712. #define HC_SubA_HTXnLfPit 0x003a
  713. #define HC_SubA_HTXnL10Pit 0x003b
  714. #define HC_SubA_HTXnL11Pit 0x003c
  715. #define HC_SubA_HTXnL0_5WE 0x004b
  716. #define HC_SubA_HTXnL6_bWE 0x004c
  717. #define HC_SubA_HTXnLc_11WE 0x004d
  718. #define HC_SubA_HTXnL0_5HE 0x0051
  719. #define HC_SubA_HTXnL6_bHE 0x0052
  720. #define HC_SubA_HTXnLc_11HE 0x0053
  721. #define HC_SubA_HTXnL0OS 0x0077
  722. #define HC_SubA_HTXnTB 0x0078
  723. #define HC_SubA_HTXnMPMD 0x0079
  724. #define HC_SubA_HTXnCLODu 0x007a
  725. #define HC_SubA_HTXnFM 0x007b
  726. #define HC_SubA_HTXnTRCH 0x007c
  727. #define HC_SubA_HTXnTRCL 0x007d
  728. #define HC_SubA_HTXnTBC 0x007e
  729. #define HC_SubA_HTXnTRAH 0x007f
  730. #define HC_SubA_HTXnTBLCsat 0x0080
  731. #define HC_SubA_HTXnTBLCop 0x0081
  732. #define HC_SubA_HTXnTBLMPfog 0x0082
  733. #define HC_SubA_HTXnTBLAsat 0x0083
  734. #define HC_SubA_HTXnTBLRCa 0x0085
  735. #define HC_SubA_HTXnTBLRCb 0x0086
  736. #define HC_SubA_HTXnTBLRCc 0x0087
  737. #define HC_SubA_HTXnTBLRCbias 0x0088
  738. #define HC_SubA_HTXnTBLRAa 0x0089
  739. #define HC_SubA_HTXnTBLRFog 0x008a
  740. #define HC_SubA_HTXnBumpM00 0x0090
  741. #define HC_SubA_HTXnBumpM01 0x0091
  742. #define HC_SubA_HTXnBumpM10 0x0092
  743. #define HC_SubA_HTXnBumpM11 0x0093
  744. #define HC_SubA_HTXnLScale 0x0094
  745. #define HC_SubA_HTXSMD 0x0000
  746. /* HC_SubA_HTXnL012BasH 0x0020
  747. */
  748. #define HC_HTXnL0BasH_MASK 0x000000ff
  749. #define HC_HTXnL1BasH_MASK 0x0000ff00
  750. #define HC_HTXnL2BasH_MASK 0x00ff0000
  751. #define HC_HTXnL1BasH_SHIFT 8
  752. #define HC_HTXnL2BasH_SHIFT 16
  753. /* HC_SubA_HTXnL345BasH 0x0021
  754. */
  755. #define HC_HTXnL3BasH_MASK 0x000000ff
  756. #define HC_HTXnL4BasH_MASK 0x0000ff00
  757. #define HC_HTXnL5BasH_MASK 0x00ff0000
  758. #define HC_HTXnL4BasH_SHIFT 8
  759. #define HC_HTXnL5BasH_SHIFT 16
  760. /* HC_SubA_HTXnL678BasH 0x0022
  761. */
  762. #define HC_HTXnL6BasH_MASK 0x000000ff
  763. #define HC_HTXnL7BasH_MASK 0x0000ff00
  764. #define HC_HTXnL8BasH_MASK 0x00ff0000
  765. #define HC_HTXnL7BasH_SHIFT 8
  766. #define HC_HTXnL8BasH_SHIFT 16
  767. /* HC_SubA_HTXnL9abBasH 0x0023
  768. */
  769. #define HC_HTXnL9BasH_MASK 0x000000ff
  770. #define HC_HTXnLaBasH_MASK 0x0000ff00
  771. #define HC_HTXnLbBasH_MASK 0x00ff0000
  772. #define HC_HTXnLaBasH_SHIFT 8
  773. #define HC_HTXnLbBasH_SHIFT 16
  774. /* HC_SubA_HTXnLcdeBasH 0x0024
  775. */
  776. #define HC_HTXnLcBasH_MASK 0x000000ff
  777. #define HC_HTXnLdBasH_MASK 0x0000ff00
  778. #define HC_HTXnLeBasH_MASK 0x00ff0000
  779. #define HC_HTXnLdBasH_SHIFT 8
  780. #define HC_HTXnLeBasH_SHIFT 16
  781. /* HC_SubA_HTXnLcdeBasH 0x0025
  782. */
  783. #define HC_HTXnLfBasH_MASK 0x000000ff
  784. #define HC_HTXnL10BasH_MASK 0x0000ff00
  785. #define HC_HTXnL11BasH_MASK 0x00ff0000
  786. #define HC_HTXnL10BasH_SHIFT 8
  787. #define HC_HTXnL11BasH_SHIFT 16
  788. /* HC_SubA_HTXnL0Pit 0x002b
  789. */
  790. #define HC_HTXnLnPit_MASK 0x00003fff
  791. #define HC_HTXnEnPit_MASK 0x00080000
  792. #define HC_HTXnLnPitE_MASK 0x00f00000
  793. #define HC_HTXnLnPitE_SHIFT 20
  794. /* HC_SubA_HTXnL0_5WE 0x004b
  795. */
  796. #define HC_HTXnL0WE_MASK 0x0000000f
  797. #define HC_HTXnL1WE_MASK 0x000000f0
  798. #define HC_HTXnL2WE_MASK 0x00000f00
  799. #define HC_HTXnL3WE_MASK 0x0000f000
  800. #define HC_HTXnL4WE_MASK 0x000f0000
  801. #define HC_HTXnL5WE_MASK 0x00f00000
  802. #define HC_HTXnL1WE_SHIFT 4
  803. #define HC_HTXnL2WE_SHIFT 8
  804. #define HC_HTXnL3WE_SHIFT 12
  805. #define HC_HTXnL4WE_SHIFT 16
  806. #define HC_HTXnL5WE_SHIFT 20
  807. /* HC_SubA_HTXnL6_bWE 0x004c
  808. */
  809. #define HC_HTXnL6WE_MASK 0x0000000f
  810. #define HC_HTXnL7WE_MASK 0x000000f0
  811. #define HC_HTXnL8WE_MASK 0x00000f00
  812. #define HC_HTXnL9WE_MASK 0x0000f000
  813. #define HC_HTXnLaWE_MASK 0x000f0000
  814. #define HC_HTXnLbWE_MASK 0x00f00000
  815. #define HC_HTXnL7WE_SHIFT 4
  816. #define HC_HTXnL8WE_SHIFT 8
  817. #define HC_HTXnL9WE_SHIFT 12
  818. #define HC_HTXnLaWE_SHIFT 16
  819. #define HC_HTXnLbWE_SHIFT 20
  820. /* HC_SubA_HTXnLc_11WE 0x004d
  821. */
  822. #define HC_HTXnLcWE_MASK 0x0000000f
  823. #define HC_HTXnLdWE_MASK 0x000000f0
  824. #define HC_HTXnLeWE_MASK 0x00000f00
  825. #define HC_HTXnLfWE_MASK 0x0000f000
  826. #define HC_HTXnL10WE_MASK 0x000f0000
  827. #define HC_HTXnL11WE_MASK 0x00f00000
  828. #define HC_HTXnLdWE_SHIFT 4
  829. #define HC_HTXnLeWE_SHIFT 8
  830. #define HC_HTXnLfWE_SHIFT 12
  831. #define HC_HTXnL10WE_SHIFT 16
  832. #define HC_HTXnL11WE_SHIFT 20
  833. /* HC_SubA_HTXnL0_5HE 0x0051
  834. */
  835. #define HC_HTXnL0HE_MASK 0x0000000f
  836. #define HC_HTXnL1HE_MASK 0x000000f0
  837. #define HC_HTXnL2HE_MASK 0x00000f00
  838. #define HC_HTXnL3HE_MASK 0x0000f000
  839. #define HC_HTXnL4HE_MASK 0x000f0000
  840. #define HC_HTXnL5HE_MASK 0x00f00000
  841. #define HC_HTXnL1HE_SHIFT 4
  842. #define HC_HTXnL2HE_SHIFT 8
  843. #define HC_HTXnL3HE_SHIFT 12
  844. #define HC_HTXnL4HE_SHIFT 16
  845. #define HC_HTXnL5HE_SHIFT 20
  846. /* HC_SubA_HTXnL6_bHE 0x0052
  847. */
  848. #define HC_HTXnL6HE_MASK 0x0000000f
  849. #define HC_HTXnL7HE_MASK 0x000000f0
  850. #define HC_HTXnL8HE_MASK 0x00000f00
  851. #define HC_HTXnL9HE_MASK 0x0000f000
  852. #define HC_HTXnLaHE_MASK 0x000f0000
  853. #define HC_HTXnLbHE_MASK 0x00f00000
  854. #define HC_HTXnL7HE_SHIFT 4
  855. #define HC_HTXnL8HE_SHIFT 8
  856. #define HC_HTXnL9HE_SHIFT 12
  857. #define HC_HTXnLaHE_SHIFT 16
  858. #define HC_HTXnLbHE_SHIFT 20
  859. /* HC_SubA_HTXnLc_11HE 0x0053
  860. */
  861. #define HC_HTXnLcHE_MASK 0x0000000f
  862. #define HC_HTXnLdHE_MASK 0x000000f0
  863. #define HC_HTXnLeHE_MASK 0x00000f00
  864. #define HC_HTXnLfHE_MASK 0x0000f000
  865. #define HC_HTXnL10HE_MASK 0x000f0000
  866. #define HC_HTXnL11HE_MASK 0x00f00000
  867. #define HC_HTXnLdHE_SHIFT 4
  868. #define HC_HTXnLeHE_SHIFT 8
  869. #define HC_HTXnLfHE_SHIFT 12
  870. #define HC_HTXnL10HE_SHIFT 16
  871. #define HC_HTXnL11HE_SHIFT 20
  872. /* HC_SubA_HTXnL0OS 0x0077
  873. */
  874. #define HC_HTXnL0OS_MASK 0x003ff000
  875. #define HC_HTXnLVmax_MASK 0x00000fc0
  876. #define HC_HTXnLVmin_MASK 0x0000003f
  877. #define HC_HTXnL0OS_SHIFT 12
  878. #define HC_HTXnLVmax_SHIFT 6
  879. /* HC_SubA_HTXnTB 0x0078
  880. */
  881. #define HC_HTXnTB_MASK 0x00f00000
  882. #define HC_HTXnFLSe_MASK 0x0000e000
  883. #define HC_HTXnFLSs_MASK 0x00001c00
  884. #define HC_HTXnFLTe_MASK 0x00000380
  885. #define HC_HTXnFLTs_MASK 0x00000070
  886. #define HC_HTXnFLDs_MASK 0x0000000f
  887. #define HC_HTXnTB_NoTB 0x00000000
  888. #define HC_HTXnTB_TBC_S 0x00100000
  889. #define HC_HTXnTB_TBC_T 0x00200000
  890. #define HC_HTXnTB_TB_S 0x00400000
  891. #define HC_HTXnTB_TB_T 0x00800000
  892. #define HC_HTXnFLSe_Nearest 0x00000000
  893. #define HC_HTXnFLSe_Linear 0x00002000
  894. #define HC_HTXnFLSe_NonLinear 0x00004000
  895. #define HC_HTXnFLSe_Sharp 0x00008000
  896. #define HC_HTXnFLSe_Flat_Gaussian_Cubic 0x0000c000
  897. #define HC_HTXnFLSs_Nearest 0x00000000
  898. #define HC_HTXnFLSs_Linear 0x00000400
  899. #define HC_HTXnFLSs_NonLinear 0x00000800
  900. #define HC_HTXnFLSs_Flat_Gaussian_Cubic 0x00001800
  901. #define HC_HTXnFLTe_Nearest 0x00000000
  902. #define HC_HTXnFLTe_Linear 0x00000080
  903. #define HC_HTXnFLTe_NonLinear 0x00000100
  904. #define HC_HTXnFLTe_Sharp 0x00000180
  905. #define HC_HTXnFLTe_Flat_Gaussian_Cubic 0x00000300
  906. #define HC_HTXnFLTs_Nearest 0x00000000
  907. #define HC_HTXnFLTs_Linear 0x00000010
  908. #define HC_HTXnFLTs_NonLinear 0x00000020
  909. #define HC_HTXnFLTs_Flat_Gaussian_Cubic 0x00000060
  910. #define HC_HTXnFLDs_Tex0 0x00000000
  911. #define HC_HTXnFLDs_Nearest 0x00000001
  912. #define HC_HTXnFLDs_Linear 0x00000002
  913. #define HC_HTXnFLDs_NonLinear 0x00000003
  914. #define HC_HTXnFLDs_Dither 0x00000004
  915. #define HC_HTXnFLDs_ConstLOD 0x00000005
  916. #define HC_HTXnFLDs_Ani 0x00000006
  917. #define HC_HTXnFLDs_AniDither 0x00000007
  918. /* HC_SubA_HTXnMPMD 0x0079
  919. */
  920. #define HC_HTXnMPMD_SMASK 0x00070000
  921. #define HC_HTXnMPMD_TMASK 0x00380000
  922. #define HC_HTXnLODDTf_MASK 0x00000007
  923. #define HC_HTXnXY2ST_MASK 0x00000008
  924. #define HC_HTXnMPMD_Tsingle 0x00000000
  925. #define HC_HTXnMPMD_Tclamp 0x00080000
  926. #define HC_HTXnMPMD_Trepeat 0x00100000
  927. #define HC_HTXnMPMD_Tmirror 0x00180000
  928. #define HC_HTXnMPMD_Twrap 0x00200000
  929. #define HC_HTXnMPMD_Ssingle 0x00000000
  930. #define HC_HTXnMPMD_Sclamp 0x00010000
  931. #define HC_HTXnMPMD_Srepeat 0x00020000
  932. #define HC_HTXnMPMD_Smirror 0x00030000
  933. #define HC_HTXnMPMD_Swrap 0x00040000
  934. /* HC_SubA_HTXnCLODu 0x007a
  935. */
  936. #define HC_HTXnCLODu_MASK 0x000ffc00
  937. #define HC_HTXnCLODd_MASK 0x000003ff
  938. #define HC_HTXnCLODu_SHIFT 10
  939. /* HC_SubA_HTXnFM 0x007b
  940. */
  941. #define HC_HTXnFM_MASK 0x00ff0000
  942. #define HC_HTXnLoc_MASK 0x00000003
  943. #define HC_HTXnFM_INDEX 0x00000000
  944. #define HC_HTXnFM_Intensity 0x00080000
  945. #define HC_HTXnFM_Lum 0x00100000
  946. #define HC_HTXnFM_Alpha 0x00180000
  947. #define HC_HTXnFM_DX 0x00280000
  948. #define HC_HTXnFM_ARGB16 0x00880000
  949. #define HC_HTXnFM_ARGB32 0x00980000
  950. #define HC_HTXnFM_ABGR16 0x00a80000
  951. #define HC_HTXnFM_ABGR32 0x00b80000
  952. #define HC_HTXnFM_RGBA16 0x00c80000
  953. #define HC_HTXnFM_RGBA32 0x00d80000
  954. #define HC_HTXnFM_BGRA16 0x00e80000
  955. #define HC_HTXnFM_BGRA32 0x00f80000
  956. #define HC_HTXnFM_BUMPMAP 0x00380000
  957. #define HC_HTXnFM_Index1 (HC_HTXnFM_INDEX | 0x00000000)
  958. #define HC_HTXnFM_Index2 (HC_HTXnFM_INDEX | 0x00010000)
  959. #define HC_HTXnFM_Index4 (HC_HTXnFM_INDEX | 0x00020000)
  960. #define HC_HTXnFM_Index8 (HC_HTXnFM_INDEX | 0x00030000)
  961. #define HC_HTXnFM_T1 (HC_HTXnFM_Intensity | 0x00000000)
  962. #define HC_HTXnFM_T2 (HC_HTXnFM_Intensity | 0x00010000)
  963. #define HC_HTXnFM_T4 (HC_HTXnFM_Intensity | 0x00020000)
  964. #define HC_HTXnFM_T8 (HC_HTXnFM_Intensity | 0x00030000)
  965. #define HC_HTXnFM_L1 (HC_HTXnFM_Lum | 0x00000000)
  966. #define HC_HTXnFM_L2 (HC_HTXnFM_Lum | 0x00010000)
  967. #define HC_HTXnFM_L4 (HC_HTXnFM_Lum | 0x00020000)
  968. #define HC_HTXnFM_L8 (HC_HTXnFM_Lum | 0x00030000)
  969. #define HC_HTXnFM_AL44 (HC_HTXnFM_Lum | 0x00040000)
  970. #define HC_HTXnFM_AL88 (HC_HTXnFM_Lum | 0x00050000)
  971. #define HC_HTXnFM_A1 (HC_HTXnFM_Alpha | 0x00000000)
  972. #define HC_HTXnFM_A2 (HC_HTXnFM_Alpha | 0x00010000)
  973. #define HC_HTXnFM_A4 (HC_HTXnFM_Alpha | 0x00020000)
  974. #define HC_HTXnFM_A8 (HC_HTXnFM_Alpha | 0x00030000)
  975. #define HC_HTXnFM_DX1 (HC_HTXnFM_DX | 0x00010000)
  976. #define HC_HTXnFM_DX23 (HC_HTXnFM_DX | 0x00020000)
  977. #define HC_HTXnFM_DX45 (HC_HTXnFM_DX | 0x00030000)
  978. #define HC_HTXnFM_RGB555 (HC_HTXnFM_ARGB16 | 0x00000000)
  979. #define HC_HTXnFM_RGB565 (HC_HTXnFM_ARGB16 | 0x00010000)
  980. #define HC_HTXnFM_ARGB1555 (HC_HTXnFM_ARGB16 | 0x00020000)
  981. #define HC_HTXnFM_ARGB4444 (HC_HTXnFM_ARGB16 | 0x00030000)
  982. #define HC_HTXnFM_ARGB0888 (HC_HTXnFM_ARGB32 | 0x00000000)
  983. #define HC_HTXnFM_ARGB8888 (HC_HTXnFM_ARGB32 | 0x00010000)
  984. #define HC_HTXnFM_BGR555 (HC_HTXnFM_ABGR16 | 0x00000000)
  985. #define HC_HTXnFM_BGR565 (HC_HTXnFM_ABGR16 | 0x00010000)
  986. #define HC_HTXnFM_ABGR1555 (HC_HTXnFM_ABGR16 | 0x00020000)
  987. #define HC_HTXnFM_ABGR4444 (HC_HTXnFM_ABGR16 | 0x00030000)
  988. #define HC_HTXnFM_ABGR0888 (HC_HTXnFM_ABGR32 | 0x00000000)
  989. #define HC_HTXnFM_ABGR8888 (HC_HTXnFM_ABGR32 | 0x00010000)
  990. #define HC_HTXnFM_RGBA5550 (HC_HTXnFM_RGBA16 | 0x00000000)
  991. #define HC_HTXnFM_RGBA5551 (HC_HTXnFM_RGBA16 | 0x00020000)
  992. #define HC_HTXnFM_RGBA4444 (HC_HTXnFM_RGBA16 | 0x00030000)
  993. #define HC_HTXnFM_RGBA8880 (HC_HTXnFM_RGBA32 | 0x00000000)
  994. #define HC_HTXnFM_RGBA8888 (HC_HTXnFM_RGBA32 | 0x00010000)
  995. #define HC_HTXnFM_BGRA5550 (HC_HTXnFM_BGRA16 | 0x00000000)
  996. #define HC_HTXnFM_BGRA5551 (HC_HTXnFM_BGRA16 | 0x00020000)
  997. #define HC_HTXnFM_BGRA4444 (HC_HTXnFM_BGRA16 | 0x00030000)
  998. #define HC_HTXnFM_BGRA8880 (HC_HTXnFM_BGRA32 | 0x00000000)
  999. #define HC_HTXnFM_BGRA8888 (HC_HTXnFM_BGRA32 | 0x00010000)
  1000. #define HC_HTXnFM_VU88 (HC_HTXnFM_BUMPMAP | 0x00000000)
  1001. #define HC_HTXnFM_LVU655 (HC_HTXnFM_BUMPMAP | 0x00010000)
  1002. #define HC_HTXnFM_LVU888 (HC_HTXnFM_BUMPMAP | 0x00020000)
  1003. #define HC_HTXnLoc_Local 0x00000000
  1004. #define HC_HTXnLoc_Sys 0x00000002
  1005. #define HC_HTXnLoc_AGP 0x00000003
  1006. /* HC_SubA_HTXnTRAH 0x007f
  1007. */
  1008. #define HC_HTXnTRAH_MASK 0x00ff0000
  1009. #define HC_HTXnTRAL_MASK 0x0000ff00
  1010. #define HC_HTXnTBA_MASK 0x000000ff
  1011. #define HC_HTXnTRAH_SHIFT 16
  1012. #define HC_HTXnTRAL_SHIFT 8
  1013. /* HC_SubA_HTXnTBLCsat 0x0080
  1014. *-- Define the input texture.
  1015. */
  1016. #define HC_XTC_TOPC 0x00000000
  1017. #define HC_XTC_InvTOPC 0x00000010
  1018. #define HC_XTC_TOPCp5 0x00000020
  1019. #define HC_XTC_Cbias 0x00000000
  1020. #define HC_XTC_InvCbias 0x00000010
  1021. #define HC_XTC_0 0x00000000
  1022. #define HC_XTC_Dif 0x00000001
  1023. #define HC_XTC_Spec 0x00000002
  1024. #define HC_XTC_Tex 0x00000003
  1025. #define HC_XTC_Cur 0x00000004
  1026. #define HC_XTC_Adif 0x00000005
  1027. #define HC_XTC_Fog 0x00000006
  1028. #define HC_XTC_Atex 0x00000007
  1029. #define HC_XTC_Acur 0x00000008
  1030. #define HC_XTC_HTXnTBLRC 0x00000009
  1031. #define HC_XTC_Ctexnext 0x0000000a
  1032. /*--
  1033. */
  1034. #define HC_HTXnTBLCsat_MASK 0x00800000
  1035. #define HC_HTXnTBLCa_MASK 0x000fc000
  1036. #define HC_HTXnTBLCb_MASK 0x00001f80
  1037. #define HC_HTXnTBLCc_MASK 0x0000003f
  1038. #define HC_HTXnTBLCa_TOPC (HC_XTC_TOPC << 14)
  1039. #define HC_HTXnTBLCa_InvTOPC (HC_XTC_InvTOPC << 14)
  1040. #define HC_HTXnTBLCa_TOPCp5 (HC_XTC_TOPCp5 << 14)
  1041. #define HC_HTXnTBLCa_0 (HC_XTC_0 << 14)
  1042. #define HC_HTXnTBLCa_Dif (HC_XTC_Dif << 14)
  1043. #define HC_HTXnTBLCa_Spec (HC_XTC_Spec << 14)
  1044. #define HC_HTXnTBLCa_Tex (HC_XTC_Tex << 14)
  1045. #define HC_HTXnTBLCa_Cur (HC_XTC_Cur << 14)
  1046. #define HC_HTXnTBLCa_Adif (HC_XTC_Adif << 14)
  1047. #define HC_HTXnTBLCa_Fog (HC_XTC_Fog << 14)
  1048. #define HC_HTXnTBLCa_Atex (HC_XTC_Atex << 14)
  1049. #define HC_HTXnTBLCa_Acur (HC_XTC_Acur << 14)
  1050. #define HC_HTXnTBLCa_HTXnTBLRC (HC_XTC_HTXnTBLRC << 14)
  1051. #define HC_HTXnTBLCa_Ctexnext (HC_XTC_Ctexnext << 14)
  1052. #define HC_HTXnTBLCb_TOPC (HC_XTC_TOPC << 7)
  1053. #define HC_HTXnTBLCb_InvTOPC (HC_XTC_InvTOPC << 7)
  1054. #define HC_HTXnTBLCb_TOPCp5 (HC_XTC_TOPCp5 << 7)
  1055. #define HC_HTXnTBLCb_0 (HC_XTC_0 << 7)
  1056. #define HC_HTXnTBLCb_Dif (HC_XTC_Dif << 7)
  1057. #define HC_HTXnTBLCb_Spec (HC_XTC_Spec << 7)
  1058. #define HC_HTXnTBLCb_Tex (HC_XTC_Tex << 7)
  1059. #define HC_HTXnTBLCb_Cur (HC_XTC_Cur << 7)
  1060. #define HC_HTXnTBLCb_Adif (HC_XTC_Adif << 7)
  1061. #define HC_HTXnTBLCb_Fog (HC_XTC_Fog << 7)
  1062. #define HC_HTXnTBLCb_Atex (HC_XTC_Atex << 7)
  1063. #define HC_HTXnTBLCb_Acur (HC_XTC_Acur << 7)
  1064. #define HC_HTXnTBLCb_HTXnTBLRC (HC_XTC_HTXnTBLRC << 7)
  1065. #define HC_HTXnTBLCb_Ctexnext (HC_XTC_Ctexnext << 7)
  1066. #define HC_HTXnTBLCc_TOPC (HC_XTC_TOPC << 0)
  1067. #define HC_HTXnTBLCc_InvTOPC (HC_XTC_InvTOPC << 0)
  1068. #define HC_HTXnTBLCc_TOPCp5 (HC_XTC_TOPCp5 << 0)
  1069. #define HC_HTXnTBLCc_0 (HC_XTC_0 << 0)
  1070. #define HC_HTXnTBLCc_Dif (HC_XTC_Dif << 0)
  1071. #define HC_HTXnTBLCc_Spec (HC_XTC_Spec << 0)
  1072. #define HC_HTXnTBLCc_Tex (HC_XTC_Tex << 0)
  1073. #define HC_HTXnTBLCc_Cur (HC_XTC_Cur << 0)
  1074. #define HC_HTXnTBLCc_Adif (HC_XTC_Adif << 0)
  1075. #define HC_HTXnTBLCc_Fog (HC_XTC_Fog << 0)
  1076. #define HC_HTXnTBLCc_Atex (HC_XTC_Atex << 0)
  1077. #define HC_HTXnTBLCc_Acur (HC_XTC_Acur << 0)
  1078. #define HC_HTXnTBLCc_HTXnTBLRC (HC_XTC_HTXnTBLRC << 0)
  1079. #define HC_HTXnTBLCc_Ctexnext (HC_XTC_Ctexnext << 0)
  1080. /* HC_SubA_HTXnTBLCop 0x0081
  1081. */
  1082. #define HC_HTXnTBLdot_MASK 0x00c00000
  1083. #define HC_HTXnTBLCop_MASK 0x00380000
  1084. #define HC_HTXnTBLCbias_MASK 0x0007c000
  1085. #define HC_HTXnTBLCshift_MASK 0x00001800
  1086. #define HC_HTXnTBLAop_MASK 0x00000380
  1087. #define HC_HTXnTBLAbias_MASK 0x00000078
  1088. #define HC_HTXnTBLAshift_MASK 0x00000003
  1089. #define HC_HTXnTBLCop_Add 0x00000000
  1090. #define HC_HTXnTBLCop_Sub 0x00080000
  1091. #define HC_HTXnTBLCop_Min 0x00100000
  1092. #define HC_HTXnTBLCop_Max 0x00180000
  1093. #define HC_HTXnTBLCop_Mask 0x00200000
  1094. #define HC_HTXnTBLCbias_Cbias (HC_XTC_Cbias << 14)
  1095. #define HC_HTXnTBLCbias_InvCbias (HC_XTC_InvCbias << 14)
  1096. #define HC_HTXnTBLCbias_0 (HC_XTC_0 << 14)
  1097. #define HC_HTXnTBLCbias_Dif (HC_XTC_Dif << 14)
  1098. #define HC_HTXnTBLCbias_Spec (HC_XTC_Spec << 14)
  1099. #define HC_HTXnTBLCbias_Tex (HC_XTC_Tex << 14)
  1100. #define HC_HTXnTBLCbias_Cur (HC_XTC_Cur << 14)
  1101. #define HC_HTXnTBLCbias_Adif (HC_XTC_Adif << 14)
  1102. #define HC_HTXnTBLCbias_Fog (HC_XTC_Fog << 14)
  1103. #define HC_HTXnTBLCbias_Atex (HC_XTC_Atex << 14)
  1104. #define HC_HTXnTBLCbias_Acur (HC_XTC_Acur << 14)
  1105. #define HC_HTXnTBLCbias_HTXnTBLRC (HC_XTC_HTXnTBLRC << 14)
  1106. #define HC_HTXnTBLCshift_1 0x00000000
  1107. #define HC_HTXnTBLCshift_2 0x00000800
  1108. #define HC_HTXnTBLCshift_No 0x00001000
  1109. #define HC_HTXnTBLCshift_DotP 0x00001800
  1110. /*=* John Sheng [2003.7.18] texture combine *=*/
  1111. #define HC_HTXnTBLDOT3 0x00080000
  1112. #define HC_HTXnTBLDOT4 0x000C0000
  1113. #define HC_HTXnTBLAop_Add 0x00000000
  1114. #define HC_HTXnTBLAop_Sub 0x00000080
  1115. #define HC_HTXnTBLAop_Min 0x00000100
  1116. #define HC_HTXnTBLAop_Max 0x00000180
  1117. #define HC_HTXnTBLAop_Mask 0x00000200
  1118. #define HC_HTXnTBLAbias_Inv 0x00000040
  1119. #define HC_HTXnTBLAbias_Adif 0x00000000
  1120. #define HC_HTXnTBLAbias_Fog 0x00000008
  1121. #define HC_HTXnTBLAbias_Acur 0x00000010
  1122. #define HC_HTXnTBLAbias_HTXnTBLRAbias 0x00000018
  1123. #define HC_HTXnTBLAbias_Atex 0x00000020
  1124. #define HC_HTXnTBLAshift_1 0x00000000
  1125. #define HC_HTXnTBLAshift_2 0x00000001
  1126. #define HC_HTXnTBLAshift_No 0x00000002
  1127. /* #define HC_HTXnTBLAshift_DotP 0x00000003 */
  1128. /* HC_SubA_HTXnTBLMPFog 0x0082
  1129. */
  1130. #define HC_HTXnTBLMPfog_MASK 0x00e00000
  1131. #define HC_HTXnTBLMPfog_0 0x00000000
  1132. #define HC_HTXnTBLMPfog_Adif 0x00200000
  1133. #define HC_HTXnTBLMPfog_Fog 0x00400000
  1134. #define HC_HTXnTBLMPfog_Atex 0x00600000
  1135. #define HC_HTXnTBLMPfog_Acur 0x00800000
  1136. #define HC_HTXnTBLMPfog_GHTXnTBLRFog 0x00a00000
  1137. /* HC_SubA_HTXnTBLAsat 0x0083
  1138. *-- Define the texture alpha input.
  1139. */
  1140. #define HC_XTA_TOPA 0x00000000
  1141. #define HC_XTA_InvTOPA 0x00000008
  1142. #define HC_XTA_TOPAp5 0x00000010
  1143. #define HC_XTA_Adif 0x00000000
  1144. #define HC_XTA_Fog 0x00000001
  1145. #define HC_XTA_Acur 0x00000002
  1146. #define HC_XTA_HTXnTBLRA 0x00000003
  1147. #define HC_XTA_Atex 0x00000004
  1148. #define HC_XTA_Atexnext 0x00000005
  1149. /*--
  1150. */
  1151. #define HC_HTXnTBLAsat_MASK 0x00800000
  1152. #define HC_HTXnTBLAMB_MASK 0x00700000
  1153. #define HC_HTXnTBLAa_MASK 0x0007c000
  1154. #define HC_HTXnTBLAb_MASK 0x00000f80
  1155. #define HC_HTXnTBLAc_MASK 0x0000001f
  1156. #define HC_HTXnTBLAMB_SHIFT 20
  1157. #define HC_HTXnTBLAa_TOPA (HC_XTA_TOPA << 14)
  1158. #define HC_HTXnTBLAa_InvTOPA (HC_XTA_InvTOPA << 14)
  1159. #define HC_HTXnTBLAa_TOPAp5 (HC_XTA_TOPAp5 << 14)
  1160. #define HC_HTXnTBLAa_Adif (HC_XTA_Adif << 14)
  1161. #define HC_HTXnTBLAa_Fog (HC_XTA_Fog << 14)
  1162. #define HC_HTXnTBLAa_Acur (HC_XTA_Acur << 14)
  1163. #define HC_HTXnTBLAa_HTXnTBLRA (HC_XTA_HTXnTBLRA << 14)
  1164. #define HC_HTXnTBLAa_Atex (HC_XTA_Atex << 14)
  1165. #define HC_HTXnTBLAa_Atexnext (HC_XTA_Atexnext << 14)
  1166. #define HC_HTXnTBLAb_TOPA (HC_XTA_TOPA << 7)
  1167. #define HC_HTXnTBLAb_InvTOPA (HC_XTA_InvTOPA << 7)
  1168. #define HC_HTXnTBLAb_TOPAp5 (HC_XTA_TOPAp5 << 7)
  1169. #define HC_HTXnTBLAb_Adif (HC_XTA_Adif << 7)
  1170. #define HC_HTXnTBLAb_Fog (HC_XTA_Fog << 7)
  1171. #define HC_HTXnTBLAb_Acur (HC_XTA_Acur << 7)
  1172. #define HC_HTXnTBLAb_HTXnTBLRA (HC_XTA_HTXnTBLRA << 7)
  1173. #define HC_HTXnTBLAb_Atex (HC_XTA_Atex << 7)
  1174. #define HC_HTXnTBLAb_Atexnext (HC_XTA_Atexnext << 7)
  1175. #define HC_HTXnTBLAc_TOPA (HC_XTA_TOPA << 0)
  1176. #define HC_HTXnTBLAc_InvTOPA (HC_XTA_InvTOPA << 0)
  1177. #define HC_HTXnTBLAc_TOPAp5 (HC_XTA_TOPAp5 << 0)
  1178. #define HC_HTXnTBLAc_Adif (HC_XTA_Adif << 0)
  1179. #define HC_HTXnTBLAc_Fog (HC_XTA_Fog << 0)
  1180. #define HC_HTXnTBLAc_Acur (HC_XTA_Acur << 0)
  1181. #define HC_HTXnTBLAc_HTXnTBLRA (HC_XTA_HTXnTBLRA << 0)
  1182. #define HC_HTXnTBLAc_Atex (HC_XTA_Atex << 0)
  1183. #define HC_HTXnTBLAc_Atexnext (HC_XTA_Atexnext << 0)
  1184. /* HC_SubA_HTXnTBLRAa 0x0089
  1185. */
  1186. #define HC_HTXnTBLRAa_MASK 0x00ff0000
  1187. #define HC_HTXnTBLRAb_MASK 0x0000ff00
  1188. #define HC_HTXnTBLRAc_MASK 0x000000ff
  1189. #define HC_HTXnTBLRAa_SHIFT 16
  1190. #define HC_HTXnTBLRAb_SHIFT 8
  1191. #define HC_HTXnTBLRAc_SHIFT 0
  1192. /* HC_SubA_HTXnTBLRFog 0x008a
  1193. */
  1194. #define HC_HTXnTBLRFog_MASK 0x0000ff00
  1195. #define HC_HTXnTBLRAbias_MASK 0x000000ff
  1196. #define HC_HTXnTBLRFog_SHIFT 8
  1197. #define HC_HTXnTBLRAbias_SHIFT 0
  1198. /* HC_SubA_HTXnLScale 0x0094
  1199. */
  1200. #define HC_HTXnLScale_MASK 0x0007fc00
  1201. #define HC_HTXnLOff_MASK 0x000001ff
  1202. #define HC_HTXnLScale_SHIFT 10
  1203. /* HC_SubA_HTXSMD 0x0000
  1204. */
  1205. #define HC_HTXSMD_MASK 0x00000080
  1206. #define HC_HTXTMD_MASK 0x00000040
  1207. #define HC_HTXNum_MASK 0x00000038
  1208. #define HC_HTXTRMD_MASK 0x00000006
  1209. #define HC_HTXCHCLR_MASK 0x00000001
  1210. #define HC_HTXNum_SHIFT 3
  1211. /* Texture Palette n
  1212. */
  1213. #define HC_SubType_TexPalette0 0x00000000
  1214. #define HC_SubType_TexPalette1 0x00000001
  1215. #define HC_SubType_FogTable 0x00000010
  1216. #define HC_SubType_Stipple 0x00000014
  1217. /* HC_SubA_TexPalette0 0x0000
  1218. */
  1219. #define HC_HTPnA_MASK 0xff000000
  1220. #define HC_HTPnR_MASK 0x00ff0000
  1221. #define HC_HTPnG_MASK 0x0000ff00
  1222. #define HC_HTPnB_MASK 0x000000ff
  1223. /* HC_SubA_FogTable 0x0010
  1224. */
  1225. #define HC_HFPn3_MASK 0xff000000
  1226. #define HC_HFPn2_MASK 0x00ff0000
  1227. #define HC_HFPn1_MASK 0x0000ff00
  1228. #define HC_HFPn_MASK 0x000000ff
  1229. #define HC_HFPn3_SHIFT 24
  1230. #define HC_HFPn2_SHIFT 16
  1231. #define HC_HFPn1_SHIFT 8
  1232. /* Auto Testing & Security
  1233. */
  1234. #define HC_SubA_HenFIFOAT 0x0000
  1235. #define HC_SubA_HFBDrawFirst 0x0004
  1236. #define HC_SubA_HFBBasL 0x0005
  1237. #define HC_SubA_HFBDst 0x0006
  1238. /* HC_SubA_HenFIFOAT 0x0000
  1239. */
  1240. #define HC_HenFIFOAT_MASK 0x00000020
  1241. #define HC_HenGEMILock_MASK 0x00000010
  1242. #define HC_HenFBASwap_MASK 0x00000008
  1243. #define HC_HenOT_MASK 0x00000004
  1244. #define HC_HenCMDQ_MASK 0x00000002
  1245. #define HC_HenTXCTSU_MASK 0x00000001
  1246. /* HC_SubA_HFBDrawFirst 0x0004
  1247. */
  1248. #define HC_HFBDrawFirst_MASK 0x00000800
  1249. #define HC_HFBQueue_MASK 0x00000400
  1250. #define HC_HFBLock_MASK 0x00000200
  1251. #define HC_HEOF_MASK 0x00000100
  1252. #define HC_HFBBasH_MASK 0x000000ff
  1253. /* GEMI Setting
  1254. */
  1255. #define HC_SubA_HTArbRCM 0x0008
  1256. #define HC_SubA_HTArbRZ 0x000a
  1257. #define HC_SubA_HTArbWZ 0x000b
  1258. #define HC_SubA_HTArbRTX 0x000c
  1259. #define HC_SubA_HTArbRCW 0x000d
  1260. #define HC_SubA_HTArbE2 0x000e
  1261. #define HC_SubA_HArbRQCM 0x0010
  1262. #define HC_SubA_HArbWQCM 0x0011
  1263. #define HC_SubA_HGEMITout 0x0020
  1264. #define HC_SubA_HFthRTXD 0x0040
  1265. #define HC_SubA_HFthRTXA 0x0044
  1266. #define HC_SubA_HCMDQstL 0x0050
  1267. #define HC_SubA_HCMDQendL 0x0051
  1268. #define HC_SubA_HCMDQLen 0x0052
  1269. /* HC_SubA_HTArbRCM 0x0008
  1270. */
  1271. #define HC_HTArbRCM_MASK 0x0000ffff
  1272. /* HC_SubA_HTArbRZ 0x000a
  1273. */
  1274. #define HC_HTArbRZ_MASK 0x0000ffff
  1275. /* HC_SubA_HTArbWZ 0x000b
  1276. */
  1277. #define HC_HTArbWZ_MASK 0x0000ffff
  1278. /* HC_SubA_HTArbRTX 0x000c
  1279. */
  1280. #define HC_HTArbRTX_MASK 0x0000ffff
  1281. /* HC_SubA_HTArbRCW 0x000d
  1282. */
  1283. #define HC_HTArbRCW_MASK 0x0000ffff
  1284. /* HC_SubA_HTArbE2 0x000e
  1285. */
  1286. #define HC_HTArbE2_MASK 0x0000ffff
  1287. /* HC_SubA_HArbRQCM 0x0010
  1288. */
  1289. #define HC_HTArbRQCM_MASK 0x0000ffff
  1290. /* HC_SubA_HArbWQCM 0x0011
  1291. */
  1292. #define HC_HArbWQCM_MASK 0x0000ffff
  1293. /* HC_SubA_HGEMITout 0x0020
  1294. */
  1295. #define HC_HGEMITout_MASK 0x000f0000
  1296. #define HC_HNPArbZC_MASK 0x0000ffff
  1297. #define HC_HGEMITout_SHIFT 16
  1298. /* HC_SubA_HFthRTXD 0x0040
  1299. */
  1300. #define HC_HFthRTXD_MASK 0x00ff0000
  1301. #define HC_HFthRZD_MASK 0x0000ff00
  1302. #define HC_HFthWZD_MASK 0x000000ff
  1303. #define HC_HFthRTXD_SHIFT 16
  1304. #define HC_HFthRZD_SHIFT 8
  1305. /* HC_SubA_HFthRTXA 0x0044
  1306. */
  1307. #define HC_HFthRTXA_MASK 0x000000ff
  1308. /******************************************************************************
  1309. ** Define the Halcyon Internal register access constants. For simulator only.
  1310. ******************************************************************************/
  1311. #define HC_SIMA_HAGPBstL 0x0000
  1312. #define HC_SIMA_HAGPBendL 0x0001
  1313. #define HC_SIMA_HAGPCMNT 0x0002
  1314. #define HC_SIMA_HAGPBpL 0x0003
  1315. #define HC_SIMA_HAGPBpH 0x0004
  1316. #define HC_SIMA_HClipTB 0x0005
  1317. #define HC_SIMA_HClipLR 0x0006
  1318. #define HC_SIMA_HFPClipTL 0x0007
  1319. #define HC_SIMA_HFPClipBL 0x0008
  1320. #define HC_SIMA_HFPClipLL 0x0009
  1321. #define HC_SIMA_HFPClipRL 0x000a
  1322. #define HC_SIMA_HFPClipTBH 0x000b
  1323. #define HC_SIMA_HFPClipLRH 0x000c
  1324. #define HC_SIMA_HLP 0x000d
  1325. #define HC_SIMA_HLPRF 0x000e
  1326. #define HC_SIMA_HSolidCL 0x000f
  1327. #define HC_SIMA_HPixGC 0x0010
  1328. #define HC_SIMA_HSPXYOS 0x0011
  1329. #define HC_SIMA_HCmdA 0x0012
  1330. #define HC_SIMA_HCmdB 0x0013
  1331. #define HC_SIMA_HEnable 0x0014
  1332. #define HC_SIMA_HZWBBasL 0x0015
  1333. #define HC_SIMA_HZWBBasH 0x0016
  1334. #define HC_SIMA_HZWBType 0x0017
  1335. #define HC_SIMA_HZBiasL 0x0018
  1336. #define HC_SIMA_HZWBend 0x0019
  1337. #define HC_SIMA_HZWTMD 0x001a
  1338. #define HC_SIMA_HZWCDL 0x001b
  1339. #define HC_SIMA_HZWCTAGnum 0x001c
  1340. #define HC_SIMA_HZCYNum 0x001d
  1341. #define HC_SIMA_HZWCFire 0x001e
  1342. /* #define HC_SIMA_HSBBasL 0x001d */
  1343. /* #define HC_SIMA_HSBBasH 0x001e */
  1344. /* #define HC_SIMA_HSBFM 0x001f */
  1345. #define HC_SIMA_HSTREF 0x0020
  1346. #define HC_SIMA_HSTMD 0x0021
  1347. #define HC_SIMA_HABBasL 0x0022
  1348. #define HC_SIMA_HABBasH 0x0023
  1349. #define HC_SIMA_HABFM 0x0024
  1350. #define HC_SIMA_HATMD 0x0025
  1351. #define HC_SIMA_HABLCsat 0x0026
  1352. #define HC_SIMA_HABLCop 0x0027
  1353. #define HC_SIMA_HABLAsat 0x0028
  1354. #define HC_SIMA_HABLAop 0x0029
  1355. #define HC_SIMA_HABLRCa 0x002a
  1356. #define HC_SIMA_HABLRFCa 0x002b
  1357. #define HC_SIMA_HABLRCbias 0x002c
  1358. #define HC_SIMA_HABLRCb 0x002d
  1359. #define HC_SIMA_HABLRFCb 0x002e
  1360. #define HC_SIMA_HABLRAa 0x002f
  1361. #define HC_SIMA_HABLRAb 0x0030
  1362. #define HC_SIMA_HDBBasL 0x0031
  1363. #define HC_SIMA_HDBBasH 0x0032
  1364. #define HC_SIMA_HDBFM 0x0033
  1365. #define HC_SIMA_HFBBMSKL 0x0034
  1366. #define HC_SIMA_HROP 0x0035
  1367. #define HC_SIMA_HFogLF 0x0036
  1368. #define HC_SIMA_HFogCL 0x0037
  1369. #define HC_SIMA_HFogCH 0x0038
  1370. #define HC_SIMA_HFogStL 0x0039
  1371. #define HC_SIMA_HFogStH 0x003a
  1372. #define HC_SIMA_HFogOOdMF 0x003b
  1373. #define HC_SIMA_HFogOOdEF 0x003c
  1374. #define HC_SIMA_HFogEndL 0x003d
  1375. #define HC_SIMA_HFogDenst 0x003e
  1376. /*---- start of texture 0 setting ----
  1377. */
  1378. #define HC_SIMA_HTX0L0BasL 0x0040
  1379. #define HC_SIMA_HTX0L1BasL 0x0041
  1380. #define HC_SIMA_HTX0L2BasL 0x0042
  1381. #define HC_SIMA_HTX0L3BasL 0x0043
  1382. #define HC_SIMA_HTX0L4BasL 0x0044
  1383. #define HC_SIMA_HTX0L5BasL 0x0045
  1384. #define HC_SIMA_HTX0L6BasL 0x0046
  1385. #define HC_SIMA_HTX0L7BasL 0x0047
  1386. #define HC_SIMA_HTX0L8BasL 0x0048
  1387. #define HC_SIMA_HTX0L9BasL 0x0049
  1388. #define HC_SIMA_HTX0LaBasL 0x004a
  1389. #define HC_SIMA_HTX0LbBasL 0x004b
  1390. #define HC_SIMA_HTX0LcBasL 0x004c
  1391. #define HC_SIMA_HTX0LdBasL 0x004d
  1392. #define HC_SIMA_HTX0LeBasL 0x004e
  1393. #define HC_SIMA_HTX0LfBasL 0x004f
  1394. #define HC_SIMA_HTX0L10BasL 0x0050
  1395. #define HC_SIMA_HTX0L11BasL 0x0051
  1396. #define HC_SIMA_HTX0L012BasH 0x0052
  1397. #define HC_SIMA_HTX0L345BasH 0x0053
  1398. #define HC_SIMA_HTX0L678BasH 0x0054
  1399. #define HC_SIMA_HTX0L9abBasH 0x0055
  1400. #define HC_SIMA_HTX0LcdeBasH 0x0056
  1401. #define HC_SIMA_HTX0Lf1011BasH 0x0057
  1402. #define HC_SIMA_HTX0L0Pit 0x0058
  1403. #define HC_SIMA_HTX0L1Pit 0x0059
  1404. #define HC_SIMA_HTX0L2Pit 0x005a
  1405. #define HC_SIMA_HTX0L3Pit 0x005b
  1406. #define HC_SIMA_HTX0L4Pit 0x005c
  1407. #define HC_SIMA_HTX0L5Pit 0x005d
  1408. #define HC_SIMA_HTX0L6Pit 0x005e
  1409. #define HC_SIMA_HTX0L7Pit 0x005f
  1410. #define HC_SIMA_HTX0L8Pit 0x0060
  1411. #define HC_SIMA_HTX0L9Pit 0x0061
  1412. #define HC_SIMA_HTX0LaPit 0x0062
  1413. #define HC_SIMA_HTX0LbPit 0x0063
  1414. #define HC_SIMA_HTX0LcPit 0x0064
  1415. #define HC_SIMA_HTX0LdPit 0x0065
  1416. #define HC_SIMA_HTX0LePit 0x0066
  1417. #define HC_SIMA_HTX0LfPit 0x0067
  1418. #define HC_SIMA_HTX0L10Pit 0x0068
  1419. #define HC_SIMA_HTX0L11Pit 0x0069
  1420. #define HC_SIMA_HTX0L0_5WE 0x006a
  1421. #define HC_SIMA_HTX0L6_bWE 0x006b
  1422. #define HC_SIMA_HTX0Lc_11WE 0x006c
  1423. #define HC_SIMA_HTX0L0_5HE 0x006d
  1424. #define HC_SIMA_HTX0L6_bHE 0x006e
  1425. #define HC_SIMA_HTX0Lc_11HE 0x006f
  1426. #define HC_SIMA_HTX0L0OS 0x0070
  1427. #define HC_SIMA_HTX0TB 0x0071
  1428. #define HC_SIMA_HTX0MPMD 0x0072
  1429. #define HC_SIMA_HTX0CLODu 0x0073
  1430. #define HC_SIMA_HTX0FM 0x0074
  1431. #define HC_SIMA_HTX0TRCH 0x0075
  1432. #define HC_SIMA_HTX0TRCL 0x0076
  1433. #define HC_SIMA_HTX0TBC 0x0077
  1434. #define HC_SIMA_HTX0TRAH 0x0078
  1435. #define HC_SIMA_HTX0TBLCsat 0x0079
  1436. #define HC_SIMA_HTX0TBLCop 0x007a
  1437. #define HC_SIMA_HTX0TBLMPfog 0x007b
  1438. #define HC_SIMA_HTX0TBLAsat 0x007c
  1439. #define HC_SIMA_HTX0TBLRCa 0x007d
  1440. #define HC_SIMA_HTX0TBLRCb 0x007e
  1441. #define HC_SIMA_HTX0TBLRCc 0x007f
  1442. #define HC_SIMA_HTX0TBLRCbias 0x0080
  1443. #define HC_SIMA_HTX0TBLRAa 0x0081
  1444. #define HC_SIMA_HTX0TBLRFog 0x0082
  1445. #define HC_SIMA_HTX0BumpM00 0x0083
  1446. #define HC_SIMA_HTX0BumpM01 0x0084
  1447. #define HC_SIMA_HTX0BumpM10 0x0085
  1448. #define HC_SIMA_HTX0BumpM11 0x0086
  1449. #define HC_SIMA_HTX0LScale 0x0087
  1450. /*---- end of texture 0 setting ---- 0x008f
  1451. */
  1452. #define HC_SIMA_TX0TX1_OFF 0x0050
  1453. /*---- start of texture 1 setting ----
  1454. */
  1455. #define HC_SIMA_HTX1L0BasL (HC_SIMA_HTX0L0BasL + HC_SIMA_TX0TX1_OFF)
  1456. #define HC_SIMA_HTX1L1BasL (HC_SIMA_HTX0L1BasL + HC_SIMA_TX0TX1_OFF)
  1457. #define HC_SIMA_HTX1L2BasL (HC_SIMA_HTX0L2BasL + HC_SIMA_TX0TX1_OFF)
  1458. #define HC_SIMA_HTX1L3BasL (HC_SIMA_HTX0L3BasL + HC_SIMA_TX0TX1_OFF)
  1459. #define HC_SIMA_HTX1L4BasL (HC_SIMA_HTX0L4BasL + HC_SIMA_TX0TX1_OFF)
  1460. #define HC_SIMA_HTX1L5BasL (HC_SIMA_HTX0L5BasL + HC_SIMA_TX0TX1_OFF)
  1461. #define HC_SIMA_HTX1L6BasL (HC_SIMA_HTX0L6BasL + HC_SIMA_TX0TX1_OFF)
  1462. #define HC_SIMA_HTX1L7BasL (HC_SIMA_HTX0L7BasL + HC_SIMA_TX0TX1_OFF)
  1463. #define HC_SIMA_HTX1L8BasL (HC_SIMA_HTX0L8BasL + HC_SIMA_TX0TX1_OFF)
  1464. #define HC_SIMA_HTX1L9BasL (HC_SIMA_HTX0L9BasL + HC_SIMA_TX0TX1_OFF)
  1465. #define HC_SIMA_HTX1LaBasL (HC_SIMA_HTX0LaBasL + HC_SIMA_TX0TX1_OFF)
  1466. #define HC_SIMA_HTX1LbBasL (HC_SIMA_HTX0LbBasL + HC_SIMA_TX0TX1_OFF)
  1467. #define HC_SIMA_HTX1LcBasL (HC_SIMA_HTX0LcBasL + HC_SIMA_TX0TX1_OFF)
  1468. #define HC_SIMA_HTX1LdBasL (HC_SIMA_HTX0LdBasL + HC_SIMA_TX0TX1_OFF)
  1469. #define HC_SIMA_HTX1LeBasL (HC_SIMA_HTX0LeBasL + HC_SIMA_TX0TX1_OFF)
  1470. #define HC_SIMA_HTX1LfBasL (HC_SIMA_HTX0LfBasL + HC_SIMA_TX0TX1_OFF)
  1471. #define HC_SIMA_HTX1L10BasL (HC_SIMA_HTX0L10BasL + HC_SIMA_TX0TX1_OFF)
  1472. #define HC_SIMA_HTX1L11BasL (HC_SIMA_HTX0L11BasL + HC_SIMA_TX0TX1_OFF)
  1473. #define HC_SIMA_HTX1L012BasH (HC_SIMA_HTX0L012BasH + HC_SIMA_TX0TX1_OFF)
  1474. #define HC_SIMA_HTX1L345BasH (HC_SIMA_HTX0L345BasH + HC_SIMA_TX0TX1_OFF)
  1475. #define HC_SIMA_HTX1L678BasH (HC_SIMA_HTX0L678BasH + HC_SIMA_TX0TX1_OFF)
  1476. #define HC_SIMA_HTX1L9abBasH (HC_SIMA_HTX0L9abBasH + HC_SIMA_TX0TX1_OFF)
  1477. #define HC_SIMA_HTX1LcdeBasH (HC_SIMA_HTX0LcdeBasH + HC_SIMA_TX0TX1_OFF)
  1478. #define HC_SIMA_HTX1Lf1011BasH (HC_SIMA_HTX0Lf1011BasH + HC_SIMA_TX0TX1_OFF)
  1479. #define HC_SIMA_HTX1L0Pit (HC_SIMA_HTX0L0Pit + HC_SIMA_TX0TX1_OFF)
  1480. #define HC_SIMA_HTX1L1Pit (HC_SIMA_HTX0L1Pit + HC_SIMA_TX0TX1_OFF)
  1481. #define HC_SIMA_HTX1L2Pit (HC_SIMA_HTX0L2Pit + HC_SIMA_TX0TX1_OFF)
  1482. #define HC_SIMA_HTX1L3Pit (HC_SIMA_HTX0L3Pit + HC_SIMA_TX0TX1_OFF)
  1483. #define HC_SIMA_HTX1L4Pit (HC_SIMA_HTX0L4Pit + HC_SIMA_TX0TX1_OFF)
  1484. #define HC_SIMA_HTX1L5Pit (HC_SIMA_HTX0L5Pit + HC_SIMA_TX0TX1_OFF)
  1485. #define HC_SIMA_HTX1L6Pit (HC_SIMA_HTX0L6Pit + HC_SIMA_TX0TX1_OFF)
  1486. #define HC_SIMA_HTX1L7Pit (HC_SIMA_HTX0L7Pit + HC_SIMA_TX0TX1_OFF)
  1487. #define HC_SIMA_HTX1L8Pit (HC_SIMA_HTX0L8Pit + HC_SIMA_TX0TX1_OFF)
  1488. #define HC_SIMA_HTX1L9Pit (HC_SIMA_HTX0L9Pit + HC_SIMA_TX0TX1_OFF)
  1489. #define HC_SIMA_HTX1LaPit (HC_SIMA_HTX0LaPit + HC_SIMA_TX0TX1_OFF)
  1490. #define HC_SIMA_HTX1LbPit (HC_SIMA_HTX0LbPit + HC_SIMA_TX0TX1_OFF)
  1491. #define HC_SIMA_HTX1LcPit (HC_SIMA_HTX0LcPit + HC_SIMA_TX0TX1_OFF)
  1492. #define HC_SIMA_HTX1LdPit (HC_SIMA_HTX0LdPit + HC_SIMA_TX0TX1_OFF)
  1493. #define HC_SIMA_HTX1LePit (HC_SIMA_HTX0LePit + HC_SIMA_TX0TX1_OFF)
  1494. #define HC_SIMA_HTX1LfPit (HC_SIMA_HTX0LfPit + HC_SIMA_TX0TX1_OFF)
  1495. #define HC_SIMA_HTX1L10Pit (HC_SIMA_HTX0L10Pit + HC_SIMA_TX0TX1_OFF)
  1496. #define HC_SIMA_HTX1L11Pit (HC_SIMA_HTX0L11Pit + HC_SIMA_TX0TX1_OFF)
  1497. #define HC_SIMA_HTX1L0_5WE (HC_SIMA_HTX0L0_5WE + HC_SIMA_TX0TX1_OFF)
  1498. #define HC_SIMA_HTX1L6_bWE (HC_SIMA_HTX0L6_bWE + HC_SIMA_TX0TX1_OFF)
  1499. #define HC_SIMA_HTX1Lc_11WE (HC_SIMA_HTX0Lc_11WE + HC_SIMA_TX0TX1_OFF)
  1500. #define HC_SIMA_HTX1L0_5HE (HC_SIMA_HTX0L0_5HE + HC_SIMA_TX0TX1_OFF)
  1501. #define HC_SIMA_HTX1L6_bHE (HC_SIMA_HTX0L6_bHE + HC_SIMA_TX0TX1_OFF)
  1502. #define HC_SIMA_HTX1Lc_11HE (HC_SIMA_HTX0Lc_11HE + HC_SIMA_TX0TX1_OFF)
  1503. #define HC_SIMA_HTX1L0OS (HC_SIMA_HTX0L0OS + HC_SIMA_TX0TX1_OFF)
  1504. #define HC_SIMA_HTX1TB (HC_SIMA_HTX0TB + HC_SIMA_TX0TX1_OFF)
  1505. #define HC_SIMA_HTX1MPMD (HC_SIMA_HTX0MPMD + HC_SIMA_TX0TX1_OFF)
  1506. #define HC_SIMA_HTX1CLODu (HC_SIMA_HTX0CLODu + HC_SIMA_TX0TX1_OFF)
  1507. #define HC_SIMA_HTX1FM (HC_SIMA_HTX0FM + HC_SIMA_TX0TX1_OFF)
  1508. #define HC_SIMA_HTX1TRCH (HC_SIMA_HTX0TRCH + HC_SIMA_TX0TX1_OFF)
  1509. #define HC_SIMA_HTX1TRCL (HC_SIMA_HTX0TRCL + HC_SIMA_TX0TX1_OFF)
  1510. #define HC_SIMA_HTX1TBC (HC_SIMA_HTX0TBC + HC_SIMA_TX0TX1_OFF)
  1511. #define HC_SIMA_HTX1TRAH (HC_SIMA_HTX0TRAH + HC_SIMA_TX0TX1_OFF)
  1512. #define HC_SIMA_HTX1LTC (HC_SIMA_HTX0LTC + HC_SIMA_TX0TX1_OFF)
  1513. #define HC_SIMA_HTX1LTA (HC_SIMA_HTX0LTA + HC_SIMA_TX0TX1_OFF)
  1514. #define HC_SIMA_HTX1TBLCsat (HC_SIMA_HTX0TBLCsat + HC_SIMA_TX0TX1_OFF)
  1515. #define HC_SIMA_HTX1TBLCop (HC_SIMA_HTX0TBLCop + HC_SIMA_TX0TX1_OFF)
  1516. #define HC_SIMA_HTX1TBLMPfog (HC_SIMA_HTX0TBLMPfog + HC_SIMA_TX0TX1_OFF)
  1517. #define HC_SIMA_HTX1TBLAsat (HC_SIMA_HTX0TBLAsat + HC_SIMA_TX0TX1_OFF)
  1518. #define HC_SIMA_HTX1TBLRCa (HC_SIMA_HTX0TBLRCa + HC_SIMA_TX0TX1_OFF)
  1519. #define HC_SIMA_HTX1TBLRCb (HC_SIMA_HTX0TBLRCb + HC_SIMA_TX0TX1_OFF)
  1520. #define HC_SIMA_HTX1TBLRCc (HC_SIMA_HTX0TBLRCc + HC_SIMA_TX0TX1_OFF)
  1521. #define HC_SIMA_HTX1TBLRCbias (HC_SIMA_HTX0TBLRCbias + HC_SIMA_TX0TX1_OFF)
  1522. #define HC_SIMA_HTX1TBLRAa (HC_SIMA_HTX0TBLRAa + HC_SIMA_TX0TX1_OFF)
  1523. #define HC_SIMA_HTX1TBLRFog (HC_SIMA_HTX0TBLRFog + HC_SIMA_TX0TX1_OFF)
  1524. #define HC_SIMA_HTX1BumpM00 (HC_SIMA_HTX0BumpM00 + HC_SIMA_TX0TX1_OFF)
  1525. #define HC_SIMA_HTX1BumpM01 (HC_SIMA_HTX0BumpM01 + HC_SIMA_TX0TX1_OFF)
  1526. #define HC_SIMA_HTX1BumpM10 (HC_SIMA_HTX0BumpM10 + HC_SIMA_TX0TX1_OFF)
  1527. #define HC_SIMA_HTX1BumpM11 (HC_SIMA_HTX0BumpM11 + HC_SIMA_TX0TX1_OFF)
  1528. #define HC_SIMA_HTX1LScale (HC_SIMA_HTX0LScale + HC_SIMA_TX0TX1_OFF)
  1529. /*---- end of texture 1 setting ---- 0xaf
  1530. */
  1531. #define HC_SIMA_HTXSMD 0x00b0
  1532. #define HC_SIMA_HenFIFOAT 0x00b1
  1533. #define HC_SIMA_HFBDrawFirst 0x00b2
  1534. #define HC_SIMA_HFBBasL 0x00b3
  1535. #define HC_SIMA_HTArbRCM 0x00b4
  1536. #define HC_SIMA_HTArbRZ 0x00b5
  1537. #define HC_SIMA_HTArbWZ 0x00b6
  1538. #define HC_SIMA_HTArbRTX 0x00b7
  1539. #define HC_SIMA_HTArbRCW 0x00b8
  1540. #define HC_SIMA_HTArbE2 0x00b9
  1541. #define HC_SIMA_HGEMITout 0x00ba
  1542. #define HC_SIMA_HFthRTXD 0x00bb
  1543. #define HC_SIMA_HFthRTXA 0x00bc
  1544. /* Define the texture palette 0
  1545. */
  1546. #define HC_SIMA_HTP0 0x0100
  1547. #define HC_SIMA_HTP1 0x0200
  1548. #define HC_SIMA_FOGTABLE 0x0300
  1549. #define HC_SIMA_STIPPLE 0x0400
  1550. #define HC_SIMA_HE3Fire 0x0440
  1551. #define HC_SIMA_TRANS_SET 0x0441
  1552. #define HC_SIMA_HREngSt 0x0442
  1553. #define HC_SIMA_HRFIFOempty 0x0443
  1554. #define HC_SIMA_HRFIFOfull 0x0444
  1555. #define HC_SIMA_HRErr 0x0445
  1556. #define HC_SIMA_FIFOstatus 0x0446
  1557. /******************************************************************************
  1558. ** Define the AGP command header.
  1559. ******************************************************************************/
  1560. #define HC_ACMD_MASK 0xfe000000
  1561. #define HC_ACMD_SUB_MASK 0x0c000000
  1562. #define HC_ACMD_HCmdA 0xee000000
  1563. #define HC_ACMD_HCmdB 0xec000000
  1564. #define HC_ACMD_HCmdC 0xea000000
  1565. #define HC_ACMD_H1 0xf0000000
  1566. #define HC_ACMD_H2 0xf2000000
  1567. #define HC_ACMD_H3 0xf4000000
  1568. #define HC_ACMD_H4 0xf6000000
  1569. #define HC_ACMD_H1IO_MASK 0x000001ff
  1570. #define HC_ACMD_H2IO1_MASK 0x001ff000
  1571. #define HC_ACMD_H2IO2_MASK 0x000001ff
  1572. #define HC_ACMD_H2IO1_SHIFT 12
  1573. #define HC_ACMD_H2IO2_SHIFT 0
  1574. #define HC_ACMD_H3IO_MASK 0x000001ff
  1575. #define HC_ACMD_H3COUNT_MASK 0x01fff000
  1576. #define HC_ACMD_H3COUNT_SHIFT 12
  1577. #define HC_ACMD_H4ID_MASK 0x000001ff
  1578. #define HC_ACMD_H4COUNT_MASK 0x01fffe00
  1579. #define HC_ACMD_H4COUNT_SHIFT 9
  1580. /********************************************************************************
  1581. ** Define Header
  1582. ********************************************************************************/
  1583. #define HC_HEADER2 0xF210F110
  1584. /********************************************************************************
  1585. ** Define Dummy Value
  1586. ********************************************************************************/
  1587. #define HC_DUMMY 0xCCCCCCCC
  1588. /********************************************************************************
  1589. ** Define for DMA use
  1590. ********************************************************************************/
  1591. #define HALCYON_HEADER2 0XF210F110
  1592. #define HALCYON_FIRECMD 0XEE100000
  1593. #define HALCYON_FIREMASK 0XFFF00000
  1594. #define HALCYON_CMDB 0XEC000000
  1595. #define HALCYON_CMDBMASK 0XFFFE0000
  1596. #define HALCYON_SUB_ADDR0 0X00000000
  1597. #define HALCYON_HEADER1MASK 0XFFFFFC00
  1598. #define HALCYON_HEADER1 0XF0000000
  1599. #define HC_SubA_HAGPBstL 0x0060
  1600. #define HC_SubA_HAGPBendL 0x0061
  1601. #define HC_SubA_HAGPCMNT 0x0062
  1602. #define HC_SubA_HAGPBpL 0x0063
  1603. #define HC_SubA_HAGPBpH 0x0064
  1604. #define HC_HAGPCMNT_MASK 0x00800000
  1605. #define HC_HCmdErrClr_MASK 0x00400000
  1606. #define HC_HAGPBendH_MASK 0x0000ff00
  1607. #define HC_HAGPBstH_MASK 0x000000ff
  1608. #define HC_HAGPBendH_SHIFT 8
  1609. #define HC_HAGPBstH_SHIFT 0
  1610. #define HC_HAGPBpL_MASK 0x00fffffc
  1611. #define HC_HAGPBpID_MASK 0x00000003
  1612. #define HC_HAGPBpID_PAUSE 0x00000000
  1613. #define HC_HAGPBpID_JUMP 0x00000001
  1614. #define HC_HAGPBpID_STOP 0x00000002
  1615. #define HC_HAGPBpH_MASK 0x00ffffff
  1616. #define VIA_VIDEO_HEADER5 0xFE040000
  1617. #define VIA_VIDEO_HEADER6 0xFE050000
  1618. #define VIA_VIDEO_HEADER7 0xFE060000
  1619. #define VIA_VIDEOMASK 0xFFFF0000
  1620. #endif