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