Home | History | Annotate | Download | only in nv30
      1 #ifndef _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV30_40_3D_XML
      2 #define _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV30_40_3D_XML
      3 
      4 /* Autogenerated file, DO NOT EDIT manually!
      5 
      6 This file was generated by the rules-ng-ng headergen tool in this git repository:
      7 http://0x04.net/cgit/index.cgi/rules-ng-ng
      8 git clone git://0x04.net/rules-ng-ng
      9 
     10 The rules-ng-ng source files this header was generated from are:
     11 - /home/skeggsb/git/envytools/rnndb/nv30-40_3d.xml (  32450 bytes, from 2012-02-10 02:41:48)
     12 - /home/skeggsb/git/envytools/rnndb/copyright.xml  (   6452 bytes, from 2011-06-30 00:27:55)
     13 - /home/skeggsb/git/envytools/rnndb/nv_3ddefs.xml  (  16394 bytes, from 2011-06-30 00:27:55)
     14 - /home/skeggsb/git/envytools/rnndb/nv_defs.xml    (   4437 bytes, from 2011-06-30 00:27:55)
     15 - /home/skeggsb/git/envytools/rnndb/nv_object.xml  (  12672 bytes, from 2011-07-13 22:28:24)
     16 - /home/skeggsb/git/envytools/rnndb/nvchipsets.xml (   3617 bytes, from 2011-07-17 23:19:55)
     17 - /home/skeggsb/git/envytools/rnndb/nv50_defs.xml  (   5468 bytes, from 2011-07-08 05:22:51)
     18 
     19 Copyright (C) 2006-2012 by the following authors:
     20 - Artur Huillet <arthur.huillet (at) free.fr> (ahuillet)
     21 - Ben Skeggs (darktama, darktama_)
     22 - B. R. <koala_br (at) users.sourceforge.net> (koala_br)
     23 - Carlos Martin <carlosmn (at) users.sf.net> (carlosmn)
     24 - Christoph Bumiller <e0425955 (at) student.tuwien.ac.at> (calim, chrisbmr)
     25 - Dawid Gajownik <gajownik (at) users.sf.net> (gajownik)
     26 - Dmitry Baryshkov
     27 - Dmitry Eremin-Solenikov <lumag (at) users.sf.net> (lumag)
     28 - EdB <edb_ (at) users.sf.net> (edb_)
     29 - Erik Waling <erikwailing (at) users.sf.net> (erikwaling)
     30 - Francisco Jerez <currojerez (at) riseup.net> (curro)
     31 - imirkin <imirkin (at) users.sf.net> (imirkin)
     32 - jb17bsome <jb17bsome (at) bellsouth.net> (jb17bsome)
     33 - Jeremy Kolb <kjeremy (at) users.sf.net> (kjeremy)
     34 - Laurent Carlier <lordheavym (at) gmail.com> (lordheavy)
     35 - Luca Barbieri <luca (at) luca-barbieri.com> (lb, lb1)
     36 - Maarten Maathuis <madman2003 (at) gmail.com> (stillunknown)
     37 - Marcin Kocielnicki <koriakin (at) 0x04.net> (mwk, koriakin)
     38 - Mark Carey <mark.carey (at) gmail.com> (careym)
     39 - Matthieu Castet <matthieu.castet (at) parrot.com> (mat-c)
     40 - nvidiaman <nvidiaman (at) users.sf.net> (nvidiaman)
     41 - Patrice Mandin <patmandin (at) gmail.com> (pmandin, pmdata)
     42 - Pekka Paalanen <pq (at) iki.fi> (pq, ppaalanen)
     43 - Peter Popov <ironpeter (at) users.sf.net> (ironpeter)
     44 - Richard Hughes <hughsient (at) users.sf.net> (hughsient)
     45 - Rudi Cilibrasi <cilibrar (at) users.sf.net> (cilibrar)
     46 - Serge Martin
     47 - Simon Raffeiner
     48 - Stephane Loeuillet <leroutier (at) users.sf.net> (leroutier)
     49 - Stephane Marchesin <stephane.marchesin (at) gmail.com> (marcheu)
     50 - sturmflut <sturmflut (at) users.sf.net> (sturmflut)
     51 - Sylvain Munaut <tnt (at) 246tNt.com>
     52 - Victor Stinner <victor.stinner (at) haypocalc.com> (haypo)
     53 - Wladmir van der Laan <laanwj (at) gmail.com> (miathan6)
     54 - Younes Manton <younes.m (at) gmail.com> (ymanton)
     55 
     56 Permission is hereby granted, free of charge, to any person obtaining
     57 a copy of this software and associated documentation files (the
     58 "Software"), to deal in the Software without restriction, including
     59 without limitation the rights to use, copy, modify, merge, publish,
     60 distribute, sublicense, and/or sell copies of the Software, and to
     61 permit persons to whom the Software is furnished to do so, subject to
     62 the following conditions:
     63 
     64 The above copyright notice and this permission notice (including the
     65 next paragraph) shall be included in all copies or substantial
     66 portions of the Software.
     67 
     68 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
     69 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     70 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
     71 IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
     72 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
     73 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
     74 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     75 */
     76 
     77 
     78 
     79 #define NV30_3D_FLIP_SET_READ					0x00000120
     80 
     81 #define NV30_3D_FLIP_SET_WRITE					0x00000124
     82 
     83 #define NV30_3D_FLIP_MAX					0x00000128
     84 
     85 #define NV30_3D_FLIP_INCR_WRITE					0x0000012c
     86 
     87 #define NV30_3D_FLIP_WAIT					0x00000130
     88 
     89 #define NV30_3D_DMA_NOTIFY					0x00000180
     90 
     91 #define NV30_3D_DMA_TEXTURE0					0x00000184
     92 
     93 #define NV30_3D_DMA_TEXTURE1					0x00000188
     94 
     95 #define NV30_3D_DMA_COLOR1					0x0000018c
     96 
     97 #define NV30_3D_DMA_UNK190					0x00000190
     98 
     99 #define NV30_3D_DMA_COLOR0					0x00000194
    100 
    101 #define NV30_3D_DMA_ZETA					0x00000198
    102 
    103 #define NV30_3D_DMA_VTXBUF0					0x0000019c
    104 
    105 #define NV30_3D_DMA_VTXBUF1					0x000001a0
    106 
    107 #define NV30_3D_DMA_FENCE					0x000001a4
    108 
    109 #define NV30_3D_DMA_QUERY					0x000001a8
    110 
    111 #define NV30_3D_DMA_UNK1AC					0x000001ac
    112 
    113 #define NV30_3D_DMA_UNK1B0					0x000001b0
    114 
    115 #define NV40_3D_DMA_COLOR2					0x000001b4
    116 
    117 #define NV40_3D_DMA_COLOR3					0x000001b8
    118 
    119 #define NV30_3D_RT_HORIZ					0x00000200
    120 #define NV30_3D_RT_HORIZ_X__MASK				0x0000ffff
    121 #define NV30_3D_RT_HORIZ_X__SHIFT				0
    122 #define NV30_3D_RT_HORIZ_W__MASK				0xffff0000
    123 #define NV30_3D_RT_HORIZ_W__SHIFT				16
    124 
    125 #define NV30_3D_RT_VERT						0x00000204
    126 #define NV30_3D_RT_VERT_Y__MASK					0x0000ffff
    127 #define NV30_3D_RT_VERT_Y__SHIFT				0
    128 #define NV30_3D_RT_VERT_H__MASK					0xffff0000
    129 #define NV30_3D_RT_VERT_H__SHIFT				16
    130 
    131 #define NV30_3D_RT_FORMAT					0x00000208
    132 #define NV30_3D_RT_FORMAT_COLOR__MASK				0x0000001f
    133 #define NV30_3D_RT_FORMAT_COLOR__SHIFT				0
    134 #define NV30_3D_RT_FORMAT_COLOR_R5G6B5				0x00000003
    135 #define NV30_3D_RT_FORMAT_COLOR_X8R8G8B8			0x00000005
    136 #define NV30_3D_RT_FORMAT_COLOR_A8R8G8B8			0x00000008
    137 #define NV30_3D_RT_FORMAT_COLOR_B8				0x00000009
    138 #define NV30_3D_RT_FORMAT_COLOR_A16B16G16R16_FLOAT		0x0000000b
    139 #define NV30_3D_RT_FORMAT_COLOR_A32B32G32R32_FLOAT		0x0000000c
    140 #define NV30_3D_RT_FORMAT_COLOR_R32_FLOAT			0x0000000d
    141 #define NV30_3D_RT_FORMAT_COLOR_UNK0D				0x0000000d
    142 #define NV30_3D_RT_FORMAT_COLOR_X8B8G8R8			0x0000000f
    143 #define NV30_3D_RT_FORMAT_COLOR_A8B8G8R8			0x00000010
    144 #define NV30_3D_RT_FORMAT_ZETA__MASK				0x000000e0
    145 #define NV30_3D_RT_FORMAT_ZETA__SHIFT				5
    146 #define NV30_3D_RT_FORMAT_ZETA_Z16				0x00000020
    147 #define NV30_3D_RT_FORMAT_ZETA_Z24S8				0x00000040
    148 #define NV30_3D_RT_FORMAT_TYPE__MASK				0x00000f00
    149 #define NV30_3D_RT_FORMAT_TYPE__SHIFT				8
    150 #define NV30_3D_RT_FORMAT_TYPE_LINEAR				0x00000100
    151 #define NV30_3D_RT_FORMAT_TYPE_SWIZZLED				0x00000200
    152 #define NV30_3D_RT_FORMAT_LOG2_WIDTH__MASK			0x00ff0000
    153 #define NV30_3D_RT_FORMAT_LOG2_WIDTH__SHIFT			16
    154 #define NV30_3D_RT_FORMAT_LOG2_HEIGHT__MASK			0xff000000
    155 #define NV30_3D_RT_FORMAT_LOG2_HEIGHT__SHIFT			24
    156 
    157 #define NV30_3D_COLOR0_PITCH					0x0000020c
    158 #define NV30_3D_COLOR0_PITCH_COLOR0__MASK			0x0000ffff
    159 #define NV30_3D_COLOR0_PITCH_COLOR0__SHIFT			0
    160 #define NV30_3D_COLOR0_PITCH_ZETA__MASK				0xffff0000
    161 #define NV30_3D_COLOR0_PITCH_ZETA__SHIFT			16
    162 
    163 #define NV40_3D_COLOR0_PITCH					0x0000020c
    164 
    165 #define NV30_3D_COLOR0_OFFSET					0x00000210
    166 
    167 #define NV30_3D_ZETA_OFFSET					0x00000214
    168 
    169 #define NV30_3D_COLOR1_OFFSET					0x00000218
    170 
    171 #define NV30_3D_COLOR1_PITCH					0x0000021c
    172 
    173 #define NV30_3D_RT_ENABLE					0x00000220
    174 #define NV30_3D_RT_ENABLE_COLOR0				0x00000001
    175 #define NV30_3D_RT_ENABLE_COLOR1				0x00000002
    176 #define NV40_3D_RT_ENABLE_COLOR2				0x00000004
    177 #define NV40_3D_RT_ENABLE_COLOR3				0x00000008
    178 #define NV30_3D_RT_ENABLE_MRT					0x00000010
    179 
    180 #define NV40_3D_ZETA_PITCH					0x0000022c
    181 
    182 #define NV30_3D_HIERZ_PITCH					0x0000022c
    183 
    184 #define NV30_3D_HIERZ_OFFSET					0x00000230
    185 
    186 #define NV30_3D_TEX_UNITS_ENABLE				0x0000023c
    187 #define NV30_3D_TEX_UNITS_ENABLE_TX0				0x00000001
    188 #define NV30_3D_TEX_UNITS_ENABLE_TX1				0x00000002
    189 #define NV30_3D_TEX_UNITS_ENABLE_TX2				0x00000004
    190 #define NV30_3D_TEX_UNITS_ENABLE_TX3				0x00000008
    191 #define NV30_3D_TEX_UNITS_ENABLE_TX4				0x00000010
    192 #define NV30_3D_TEX_UNITS_ENABLE_TX5				0x00000020
    193 #define NV30_3D_TEX_UNITS_ENABLE_TX6				0x00000040
    194 #define NV30_3D_TEX_UNITS_ENABLE_TX7				0x00000080
    195 
    196 #define NV30_3D_TEX_MATRIX_ENABLE(i0)			       (0x00000240 + 0x4*(i0))
    197 #define NV30_3D_TEX_MATRIX_ENABLE__ESIZE			0x00000004
    198 #define NV30_3D_TEX_MATRIX_ENABLE__LEN				0x00000008
    199 
    200 #define NV40_3D_COLOR2_PITCH					0x00000280
    201 
    202 #define NV40_3D_COLOR3_PITCH					0x00000284
    203 
    204 #define NV40_3D_COLOR2_OFFSET					0x00000288
    205 
    206 #define NV40_3D_COLOR3_OFFSET					0x0000028c
    207 
    208 #define NV30_3D_VIEWPORT_TX_ORIGIN				0x000002b8
    209 #define NV30_3D_VIEWPORT_TX_ORIGIN_X__MASK			0x0000ffff
    210 #define NV30_3D_VIEWPORT_TX_ORIGIN_X__SHIFT			0
    211 #define NV30_3D_VIEWPORT_TX_ORIGIN_Y__MASK			0xffff0000
    212 #define NV30_3D_VIEWPORT_TX_ORIGIN_Y__SHIFT			16
    213 
    214 #define NV30_3D_VIEWPORT_CLIP_MODE				0x000002bc
    215 
    216 #define NV30_3D_VIEWPORT_CLIP_HORIZ(i0)			       (0x000002c0 + 0x8*(i0))
    217 #define NV30_3D_VIEWPORT_CLIP_HORIZ__ESIZE			0x00000008
    218 #define NV30_3D_VIEWPORT_CLIP_HORIZ__LEN			0x00000008
    219 #define NV30_3D_VIEWPORT_CLIP_HORIZ_L__MASK			0x0000ffff
    220 #define NV30_3D_VIEWPORT_CLIP_HORIZ_L__SHIFT			0
    221 #define NV30_3D_VIEWPORT_CLIP_HORIZ_R__MASK			0xffff0000
    222 #define NV30_3D_VIEWPORT_CLIP_HORIZ_R__SHIFT			16
    223 
    224 #define NV30_3D_VIEWPORT_CLIP_VERT(i0)			       (0x000002c4 + 0x8*(i0))
    225 #define NV30_3D_VIEWPORT_CLIP_VERT__ESIZE			0x00000008
    226 #define NV30_3D_VIEWPORT_CLIP_VERT__LEN				0x00000008
    227 #define NV30_3D_VIEWPORT_CLIP_VERT_T__MASK			0x0000ffff
    228 #define NV30_3D_VIEWPORT_CLIP_VERT_T__SHIFT			0
    229 #define NV30_3D_VIEWPORT_CLIP_VERT_D__MASK			0xffff0000
    230 #define NV30_3D_VIEWPORT_CLIP_VERT_D__SHIFT			16
    231 
    232 #define NV30_3D_DITHER_ENABLE					0x00000300
    233 
    234 #define NV30_3D_ALPHA_FUNC_ENABLE				0x00000304
    235 
    236 #define NV30_3D_ALPHA_FUNC_FUNC					0x00000308
    237 #define NV30_3D_ALPHA_FUNC_FUNC_NEVER				0x00000200
    238 #define NV30_3D_ALPHA_FUNC_FUNC_LESS				0x00000201
    239 #define NV30_3D_ALPHA_FUNC_FUNC_EQUAL				0x00000202
    240 #define NV30_3D_ALPHA_FUNC_FUNC_LEQUAL				0x00000203
    241 #define NV30_3D_ALPHA_FUNC_FUNC_GREATER				0x00000204
    242 #define NV30_3D_ALPHA_FUNC_FUNC_NOTEQUAL			0x00000205
    243 #define NV30_3D_ALPHA_FUNC_FUNC_GEQUAL				0x00000206
    244 #define NV30_3D_ALPHA_FUNC_FUNC_ALWAYS				0x00000207
    245 
    246 #define NV30_3D_ALPHA_FUNC_REF					0x0000030c
    247 
    248 #define NV30_3D_BLEND_FUNC_ENABLE				0x00000310
    249 
    250 #define NV30_3D_BLEND_FUNC_SRC					0x00000314
    251 #define NV30_3D_BLEND_FUNC_SRC_RGB__MASK			0x0000ffff
    252 #define NV30_3D_BLEND_FUNC_SRC_RGB__SHIFT			0
    253 #define NV30_3D_BLEND_FUNC_SRC_RGB_ZERO				0x00000000
    254 #define NV30_3D_BLEND_FUNC_SRC_RGB_ONE				0x00000001
    255 #define NV30_3D_BLEND_FUNC_SRC_RGB_SRC_COLOR			0x00000300
    256 #define NV30_3D_BLEND_FUNC_SRC_RGB_ONE_MINUS_SRC_COLOR		0x00000301
    257 #define NV30_3D_BLEND_FUNC_SRC_RGB_SRC_ALPHA			0x00000302
    258 #define NV30_3D_BLEND_FUNC_SRC_RGB_ONE_MINUS_SRC_ALPHA		0x00000303
    259 #define NV30_3D_BLEND_FUNC_SRC_RGB_DST_ALPHA			0x00000304
    260 #define NV30_3D_BLEND_FUNC_SRC_RGB_ONE_MINUS_DST_ALPHA		0x00000305
    261 #define NV30_3D_BLEND_FUNC_SRC_RGB_DST_COLOR			0x00000306
    262 #define NV30_3D_BLEND_FUNC_SRC_RGB_ONE_MINUS_DST_COLOR		0x00000307
    263 #define NV30_3D_BLEND_FUNC_SRC_RGB_SRC_ALPHA_SATURATE		0x00000308
    264 #define NV30_3D_BLEND_FUNC_SRC_RGB_CONSTANT_COLOR		0x00008001
    265 #define NV30_3D_BLEND_FUNC_SRC_RGB_ONE_MINUS_CONSTANT_COLOR	0x00008002
    266 #define NV30_3D_BLEND_FUNC_SRC_RGB_CONSTANT_ALPHA		0x00008003
    267 #define NV30_3D_BLEND_FUNC_SRC_RGB_ONE_MINUS_CONSTANT_ALPHA	0x00008004
    268 #define NV30_3D_BLEND_FUNC_SRC_ALPHA__MASK			0xffff0000
    269 #define NV30_3D_BLEND_FUNC_SRC_ALPHA__SHIFT			16
    270 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_ZERO			0x00000000
    271 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_ONE			0x00010000
    272 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_SRC_COLOR			0x03000000
    273 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_ONE_MINUS_SRC_COLOR	0x03010000
    274 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_SRC_ALPHA			0x03020000
    275 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_ONE_MINUS_SRC_ALPHA	0x03030000
    276 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_DST_ALPHA			0x03040000
    277 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_ONE_MINUS_DST_ALPHA	0x03050000
    278 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_DST_COLOR			0x03060000
    279 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_ONE_MINUS_DST_COLOR	0x03070000
    280 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_SRC_ALPHA_SATURATE		0x03080000
    281 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_CONSTANT_COLOR		0x80010000
    282 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_ONE_MINUS_CONSTANT_COLOR	0x80020000
    283 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_CONSTANT_ALPHA		0x80030000
    284 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_ONE_MINUS_CONSTANT_ALPHA	0x80040000
    285 
    286 #define NV30_3D_BLEND_FUNC_DST					0x00000318
    287 #define NV30_3D_BLEND_FUNC_DST_RGB__MASK			0x0000ffff
    288 #define NV30_3D_BLEND_FUNC_DST_RGB__SHIFT			0
    289 #define NV30_3D_BLEND_FUNC_DST_RGB_ZERO				0x00000000
    290 #define NV30_3D_BLEND_FUNC_DST_RGB_ONE				0x00000001
    291 #define NV30_3D_BLEND_FUNC_DST_RGB_SRC_COLOR			0x00000300
    292 #define NV30_3D_BLEND_FUNC_DST_RGB_ONE_MINUS_SRC_COLOR		0x00000301
    293 #define NV30_3D_BLEND_FUNC_DST_RGB_SRC_ALPHA			0x00000302
    294 #define NV30_3D_BLEND_FUNC_DST_RGB_ONE_MINUS_SRC_ALPHA		0x00000303
    295 #define NV30_3D_BLEND_FUNC_DST_RGB_DST_ALPHA			0x00000304
    296 #define NV30_3D_BLEND_FUNC_DST_RGB_ONE_MINUS_DST_ALPHA		0x00000305
    297 #define NV30_3D_BLEND_FUNC_DST_RGB_DST_COLOR			0x00000306
    298 #define NV30_3D_BLEND_FUNC_DST_RGB_ONE_MINUS_DST_COLOR		0x00000307
    299 #define NV30_3D_BLEND_FUNC_DST_RGB_SRC_ALPHA_SATURATE		0x00000308
    300 #define NV30_3D_BLEND_FUNC_DST_RGB_CONSTANT_COLOR		0x00008001
    301 #define NV30_3D_BLEND_FUNC_DST_RGB_ONE_MINUS_CONSTANT_COLOR	0x00008002
    302 #define NV30_3D_BLEND_FUNC_DST_RGB_CONSTANT_ALPHA		0x00008003
    303 #define NV30_3D_BLEND_FUNC_DST_RGB_ONE_MINUS_CONSTANT_ALPHA	0x00008004
    304 #define NV30_3D_BLEND_FUNC_DST_ALPHA__MASK			0xffff0000
    305 #define NV30_3D_BLEND_FUNC_DST_ALPHA__SHIFT			16
    306 #define NV30_3D_BLEND_FUNC_DST_ALPHA_ZERO			0x00000000
    307 #define NV30_3D_BLEND_FUNC_DST_ALPHA_ONE			0x00010000
    308 #define NV30_3D_BLEND_FUNC_DST_ALPHA_SRC_COLOR			0x03000000
    309 #define NV30_3D_BLEND_FUNC_DST_ALPHA_ONE_MINUS_SRC_COLOR	0x03010000
    310 #define NV30_3D_BLEND_FUNC_DST_ALPHA_SRC_ALPHA			0x03020000
    311 #define NV30_3D_BLEND_FUNC_DST_ALPHA_ONE_MINUS_SRC_ALPHA	0x03030000
    312 #define NV30_3D_BLEND_FUNC_DST_ALPHA_DST_ALPHA			0x03040000
    313 #define NV30_3D_BLEND_FUNC_DST_ALPHA_ONE_MINUS_DST_ALPHA	0x03050000
    314 #define NV30_3D_BLEND_FUNC_DST_ALPHA_DST_COLOR			0x03060000
    315 #define NV30_3D_BLEND_FUNC_DST_ALPHA_ONE_MINUS_DST_COLOR	0x03070000
    316 #define NV30_3D_BLEND_FUNC_DST_ALPHA_SRC_ALPHA_SATURATE		0x03080000
    317 #define NV30_3D_BLEND_FUNC_DST_ALPHA_CONSTANT_COLOR		0x80010000
    318 #define NV30_3D_BLEND_FUNC_DST_ALPHA_ONE_MINUS_CONSTANT_COLOR	0x80020000
    319 #define NV30_3D_BLEND_FUNC_DST_ALPHA_CONSTANT_ALPHA		0x80030000
    320 #define NV30_3D_BLEND_FUNC_DST_ALPHA_ONE_MINUS_CONSTANT_ALPHA	0x80040000
    321 
    322 #define NV30_3D_BLEND_COLOR					0x0000031c
    323 #define NV30_3D_BLEND_COLOR_B__MASK				0x000000ff
    324 #define NV30_3D_BLEND_COLOR_B__SHIFT				0
    325 #define NV30_3D_BLEND_COLOR_G__MASK				0x0000ff00
    326 #define NV30_3D_BLEND_COLOR_G__SHIFT				8
    327 #define NV30_3D_BLEND_COLOR_R__MASK				0x00ff0000
    328 #define NV30_3D_BLEND_COLOR_R__SHIFT				16
    329 #define NV30_3D_BLEND_COLOR_A__MASK				0xff000000
    330 #define NV30_3D_BLEND_COLOR_A__SHIFT				24
    331 
    332 #define NV30_3D_BLEND_EQUATION					0x00000320
    333 #define NV30_3D_BLEND_EQUATION_FUNC_ADD				0x00008006
    334 #define NV30_3D_BLEND_EQUATION_MIN				0x00008007
    335 #define NV30_3D_BLEND_EQUATION_MAX				0x00008008
    336 #define NV30_3D_BLEND_EQUATION_FUNC_SUBTRACT			0x0000800a
    337 #define NV30_3D_BLEND_EQUATION_FUNC_REVERSE_SUBTRACT		0x0000800b
    338 
    339 #define NV40_3D_BLEND_EQUATION					0x00000320
    340 #define NV40_3D_BLEND_EQUATION_RGB__MASK			0x0000ffff
    341 #define NV40_3D_BLEND_EQUATION_RGB__SHIFT			0
    342 #define NV40_3D_BLEND_EQUATION_RGB_FUNC_ADD			0x00008006
    343 #define NV40_3D_BLEND_EQUATION_RGB_MIN				0x00008007
    344 #define NV40_3D_BLEND_EQUATION_RGB_MAX				0x00008008
    345 #define NV40_3D_BLEND_EQUATION_RGB_FUNC_SUBTRACT		0x0000800a
    346 #define NV40_3D_BLEND_EQUATION_RGB_FUNC_REVERSE_SUBTRACT	0x0000800b
    347 #define NV40_3D_BLEND_EQUATION_ALPHA__MASK			0xffff0000
    348 #define NV40_3D_BLEND_EQUATION_ALPHA__SHIFT			16
    349 #define NV40_3D_BLEND_EQUATION_ALPHA_FUNC_ADD			0x80060000
    350 #define NV40_3D_BLEND_EQUATION_ALPHA_MIN			0x80070000
    351 #define NV40_3D_BLEND_EQUATION_ALPHA_MAX			0x80080000
    352 #define NV40_3D_BLEND_EQUATION_ALPHA_FUNC_SUBTRACT		0x800a0000
    353 #define NV40_3D_BLEND_EQUATION_ALPHA_FUNC_REVERSE_SUBTRACT	0x800b0000
    354 
    355 #define NV30_3D_COLOR_MASK					0x00000324
    356 #define NV30_3D_COLOR_MASK_B					0x000000ff
    357 #define NV30_3D_COLOR_MASK_G					0x0000ff00
    358 #define NV30_3D_COLOR_MASK_R					0x00ff0000
    359 #define NV30_3D_COLOR_MASK_A					0xff000000
    360 
    361 #define NV30_3D_STENCIL(i0)				       (0x00000328 + 0x20*(i0))
    362 #define NV30_3D_STENCIL__ESIZE					0x00000020
    363 #define NV30_3D_STENCIL__LEN					0x00000002
    364 
    365 #define NV30_3D_STENCIL_ENABLE(i0)			       (0x00000328 + 0x20*(i0))
    366 
    367 #define NV30_3D_STENCIL_MASK(i0)			       (0x0000032c + 0x20*(i0))
    368 
    369 #define NV30_3D_STENCIL_FUNC_FUNC(i0)			       (0x00000330 + 0x20*(i0))
    370 #define NV30_3D_STENCIL_FUNC_FUNC_NEVER				0x00000200
    371 #define NV30_3D_STENCIL_FUNC_FUNC_LESS				0x00000201
    372 #define NV30_3D_STENCIL_FUNC_FUNC_EQUAL				0x00000202
    373 #define NV30_3D_STENCIL_FUNC_FUNC_LEQUAL			0x00000203
    374 #define NV30_3D_STENCIL_FUNC_FUNC_GREATER			0x00000204
    375 #define NV30_3D_STENCIL_FUNC_FUNC_NOTEQUAL			0x00000205
    376 #define NV30_3D_STENCIL_FUNC_FUNC_GEQUAL			0x00000206
    377 #define NV30_3D_STENCIL_FUNC_FUNC_ALWAYS			0x00000207
    378 
    379 #define NV30_3D_STENCIL_FUNC_REF(i0)			       (0x00000334 + 0x20*(i0))
    380 
    381 #define NV30_3D_STENCIL_FUNC_MASK(i0)			       (0x00000338 + 0x20*(i0))
    382 
    383 #define NV30_3D_STENCIL_OP_FAIL(i0)			       (0x0000033c + 0x20*(i0))
    384 #define NV30_3D_STENCIL_OP_FAIL_ZERO				0x00000000
    385 #define NV30_3D_STENCIL_OP_FAIL_INVERT				0x0000150a
    386 #define NV30_3D_STENCIL_OP_FAIL_KEEP				0x00001e00
    387 #define NV30_3D_STENCIL_OP_FAIL_REPLACE				0x00001e01
    388 #define NV30_3D_STENCIL_OP_FAIL_INCR				0x00001e02
    389 #define NV30_3D_STENCIL_OP_FAIL_DECR				0x00001e03
    390 #define NV30_3D_STENCIL_OP_FAIL_INCR_WRAP			0x00008507
    391 #define NV30_3D_STENCIL_OP_FAIL_DECR_WRAP			0x00008508
    392 
    393 #define NV30_3D_STENCIL_OP_ZFAIL(i0)			       (0x00000340 + 0x20*(i0))
    394 #define NV30_3D_STENCIL_OP_ZFAIL_ZERO				0x00000000
    395 #define NV30_3D_STENCIL_OP_ZFAIL_INVERT				0x0000150a
    396 #define NV30_3D_STENCIL_OP_ZFAIL_KEEP				0x00001e00
    397 #define NV30_3D_STENCIL_OP_ZFAIL_REPLACE			0x00001e01
    398 #define NV30_3D_STENCIL_OP_ZFAIL_INCR				0x00001e02
    399 #define NV30_3D_STENCIL_OP_ZFAIL_DECR				0x00001e03
    400 #define NV30_3D_STENCIL_OP_ZFAIL_INCR_WRAP			0x00008507
    401 #define NV30_3D_STENCIL_OP_ZFAIL_DECR_WRAP			0x00008508
    402 
    403 #define NV30_3D_STENCIL_OP_ZPASS(i0)			       (0x00000344 + 0x20*(i0))
    404 #define NV30_3D_STENCIL_OP_ZPASS_ZERO				0x00000000
    405 #define NV30_3D_STENCIL_OP_ZPASS_INVERT				0x0000150a
    406 #define NV30_3D_STENCIL_OP_ZPASS_KEEP				0x00001e00
    407 #define NV30_3D_STENCIL_OP_ZPASS_REPLACE			0x00001e01
    408 #define NV30_3D_STENCIL_OP_ZPASS_INCR				0x00001e02
    409 #define NV30_3D_STENCIL_OP_ZPASS_DECR				0x00001e03
    410 #define NV30_3D_STENCIL_OP_ZPASS_INCR_WRAP			0x00008507
    411 #define NV30_3D_STENCIL_OP_ZPASS_DECR_WRAP			0x00008508
    412 
    413 #define NV30_3D_SHADE_MODEL					0x00000368
    414 #define NV30_3D_SHADE_MODEL_FLAT				0x00001d00
    415 #define NV30_3D_SHADE_MODEL_SMOOTH				0x00001d01
    416 
    417 #define NV30_3D_FOG_ENABLE					0x0000036c
    418 
    419 #define NV30_3D_FOG_COLOR					0x00000370
    420 #define NV30_3D_FOG_COLOR_R__MASK				0x000000ff
    421 #define NV30_3D_FOG_COLOR_R__SHIFT				0
    422 #define NV30_3D_FOG_COLOR_G__MASK				0x0000ff00
    423 #define NV30_3D_FOG_COLOR_G__SHIFT				8
    424 #define NV30_3D_FOG_COLOR_B__MASK				0x00ff0000
    425 #define NV30_3D_FOG_COLOR_B__SHIFT				16
    426 #define NV30_3D_FOG_COLOR_A__MASK				0xff000000
    427 #define NV30_3D_FOG_COLOR_A__SHIFT				24
    428 
    429 #define NV40_3D_MRT_COLOR_MASK					0x00000370
    430 #define NV40_3D_MRT_COLOR_MASK_BUFFER1_A			0x00000010
    431 #define NV40_3D_MRT_COLOR_MASK_BUFFER1_R			0x00000020
    432 #define NV40_3D_MRT_COLOR_MASK_BUFFER1_G			0x00000040
    433 #define NV40_3D_MRT_COLOR_MASK_BUFFER1_B			0x00000080
    434 #define NV40_3D_MRT_COLOR_MASK_BUFFER2_A			0x00000100
    435 #define NV40_3D_MRT_COLOR_MASK_BUFFER2_R			0x00000200
    436 #define NV40_3D_MRT_COLOR_MASK_BUFFER2_G			0x00000400
    437 #define NV40_3D_MRT_COLOR_MASK_BUFFER2_B			0x00000800
    438 #define NV40_3D_MRT_COLOR_MASK_BUFFER3_A			0x00001000
    439 #define NV40_3D_MRT_COLOR_MASK_BUFFER3_R			0x00002000
    440 #define NV40_3D_MRT_COLOR_MASK_BUFFER3_G			0x00004000
    441 #define NV40_3D_MRT_COLOR_MASK_BUFFER3_B			0x00008000
    442 
    443 #define NV30_3D_COLOR_LOGIC_OP_ENABLE				0x00000374
    444 
    445 #define NV30_3D_COLOR_LOGIC_OP_OP				0x00000378
    446 #define NV30_3D_COLOR_LOGIC_OP_OP_CLEAR				0x00001500
    447 #define NV30_3D_COLOR_LOGIC_OP_OP_AND				0x00001501
    448 #define NV30_3D_COLOR_LOGIC_OP_OP_AND_REVERSE			0x00001502
    449 #define NV30_3D_COLOR_LOGIC_OP_OP_COPY				0x00001503
    450 #define NV30_3D_COLOR_LOGIC_OP_OP_AND_INVERTED			0x00001504
    451 #define NV30_3D_COLOR_LOGIC_OP_OP_NOOP				0x00001505
    452 #define NV30_3D_COLOR_LOGIC_OP_OP_XOR				0x00001506
    453 #define NV30_3D_COLOR_LOGIC_OP_OP_OR				0x00001507
    454 #define NV30_3D_COLOR_LOGIC_OP_OP_NOR				0x00001508
    455 #define NV30_3D_COLOR_LOGIC_OP_OP_EQUIV				0x00001509
    456 #define NV30_3D_COLOR_LOGIC_OP_OP_INVERT			0x0000150a
    457 #define NV30_3D_COLOR_LOGIC_OP_OP_OR_REVERSE			0x0000150b
    458 #define NV30_3D_COLOR_LOGIC_OP_OP_COPY_INVERTED			0x0000150c
    459 #define NV30_3D_COLOR_LOGIC_OP_OP_OR_INVERTED			0x0000150d
    460 #define NV30_3D_COLOR_LOGIC_OP_OP_NAND				0x0000150e
    461 #define NV30_3D_COLOR_LOGIC_OP_OP_SET				0x0000150f
    462 
    463 #define NV30_3D_NORMALIZE_ENABLE				0x0000037c
    464 
    465 #define NV35_3D_DEPTH_BOUNDS_TEST_ENABLE			0x00000380
    466 
    467 #define NV35_3D_DEPTH_BOUNDS_TEST_ZMIN				0x00000384
    468 
    469 #define NV35_3D_DEPTH_BOUNDS_TEST_ZMAX				0x00000388
    470 
    471 #define NV30_3D_COLOR_MATERIAL					0x00000390
    472 #define NV30_3D_COLOR_MATERIAL_FRONT_EMISSION_ENABLE		0x00000001
    473 #define NV30_3D_COLOR_MATERIAL_FRONT_AMBIENT_ENABLE		0x00000004
    474 #define NV30_3D_COLOR_MATERIAL_FRONT_DIFFUSE_ENABLE		0x00000010
    475 #define NV30_3D_COLOR_MATERIAL_FRONT_SPECULAR_ENABLE		0x00000040
    476 #define NV30_3D_COLOR_MATERIAL_BACK_EMISSION_ENABLE		0x00000100
    477 #define NV30_3D_COLOR_MATERIAL_BACK_AMBIENT_ENABLE		0x00000400
    478 #define NV30_3D_COLOR_MATERIAL_BACK_DIFFUSE_ENABLE		0x00001000
    479 #define NV30_3D_COLOR_MATERIAL_BACK_SPECULAR_ENABLE		0x00004000
    480 
    481 #define NV30_3D_DEPTH_RANGE_NEAR				0x00000394
    482 
    483 #define NV30_3D_DEPTH_RANGE_FAR					0x00000398
    484 
    485 #define NV30_3D_COLOR_MATERIAL_FRONT				0x000003a0
    486 
    487 
    488 #define NV30_3D_COLOR_MATERIAL_FRONT_R				0x000003a0
    489 
    490 #define NV30_3D_COLOR_MATERIAL_FRONT_G				0x000003a4
    491 
    492 #define NV30_3D_COLOR_MATERIAL_FRONT_B				0x000003a8
    493 
    494 #define NV30_3D_COLOR_MATERIAL_FRONT_A				0x000003ac
    495 
    496 #define NV40_3D_MIPMAP_ROUNDING					0x000003b0
    497 #define NV40_3D_MIPMAP_ROUNDING_MODE__MASK			0x00100000
    498 #define NV40_3D_MIPMAP_ROUNDING_MODE__SHIFT			20
    499 #define NV40_3D_MIPMAP_ROUNDING_MODE_UP				0x00000000
    500 #define NV40_3D_MIPMAP_ROUNDING_MODE_DOWN			0x00100000
    501 
    502 #define NV30_3D_LINE_WIDTH					0x000003b8
    503 
    504 #define NV30_3D_LINE_SMOOTH_ENABLE				0x000003bc
    505 
    506 
    507 
    508 #define NV30_3D_TEX_GEN_MODE(i0, i1)			       (0x00000400 + 0x10*(i0) + 0x4*(i1))
    509 #define NV30_3D_TEX_GEN_MODE__ESIZE				0x00000004
    510 #define NV30_3D_TEX_GEN_MODE__LEN				0x00000004
    511 #define NV30_3D_TEX_GEN_MODE_FALSE				0x00000000
    512 #define NV30_3D_TEX_GEN_MODE_EYE_LINEAR				0x00002400
    513 #define NV30_3D_TEX_GEN_MODE_OBJECT_LINEAR			0x00002401
    514 #define NV30_3D_TEX_GEN_MODE_SPHERE_MAP				0x00002402
    515 #define NV30_3D_TEX_GEN_MODE_NORMAL_MAP				0x00008511
    516 #define NV30_3D_TEX_GEN_MODE_REFLECTION_MAP			0x00008512
    517 
    518 #define NV30_3D_MODELVIEW_MATRIX(i0)			       (0x00000480 + 0x4*(i0))
    519 #define NV30_3D_MODELVIEW_MATRIX__ESIZE				0x00000004
    520 #define NV30_3D_MODELVIEW_MATRIX__LEN				0x00000010
    521 
    522 #define NV30_3D_INVERSE_MODELVIEW_MATRIX(i0)		       (0x00000580 + 0x4*(i0))
    523 #define NV30_3D_INVERSE_MODELVIEW_MATRIX__ESIZE			0x00000004
    524 #define NV30_3D_INVERSE_MODELVIEW_MATRIX__LEN			0x0000000c
    525 
    526 #define NV30_3D_PROJECTION_MATRIX(i0)			       (0x00000680 + 0x4*(i0))
    527 #define NV30_3D_PROJECTION_MATRIX__ESIZE			0x00000004
    528 #define NV30_3D_PROJECTION_MATRIX__LEN				0x00000010
    529 
    530 
    531 #define NV30_3D_TEX_MATRIX(i0, i1)			       (0x000006c0 + 0x40*(i0) + 0x4*(i1))
    532 #define NV30_3D_TEX_MATRIX__ESIZE				0x00000004
    533 #define NV30_3D_TEX_MATRIX__LEN					0x00000010
    534 
    535 #define NV30_3D_SCISSOR_HORIZ					0x000008c0
    536 #define NV30_3D_SCISSOR_HORIZ_X__MASK				0x0000ffff
    537 #define NV30_3D_SCISSOR_HORIZ_X__SHIFT				0
    538 #define NV30_3D_SCISSOR_HORIZ_W__MASK				0xffff0000
    539 #define NV30_3D_SCISSOR_HORIZ_W__SHIFT				16
    540 
    541 #define NV30_3D_SCISSOR_VERT					0x000008c4
    542 #define NV30_3D_SCISSOR_VERT_Y__MASK				0x0000ffff
    543 #define NV30_3D_SCISSOR_VERT_Y__SHIFT				0
    544 #define NV30_3D_SCISSOR_VERT_H__MASK				0xffff0000
    545 #define NV30_3D_SCISSOR_VERT_H__SHIFT				16
    546 
    547 #define NV30_3D_FOG_COORD_DIST					0x000008c8
    548 
    549 #define NV30_3D_FOG_MODE					0x000008cc
    550 
    551 #define NV30_3D_FOG_EQUATION_CONSTANT				0x000008d0
    552 
    553 #define NV30_3D_FOG_EQUATION_LINEAR				0x000008d4
    554 
    555 #define NV30_3D_FOG_EQUATION_QUADRATIC				0x000008d8
    556 
    557 #define NV30_3D_FP_ACTIVE_PROGRAM				0x000008e4
    558 #define NV30_3D_FP_ACTIVE_PROGRAM_DMA0				0x00000001
    559 #define NV30_3D_FP_ACTIVE_PROGRAM_DMA1				0x00000002
    560 #define NV30_3D_FP_ACTIVE_PROGRAM_OFFSET__MASK			0xfffffffc
    561 #define NV30_3D_FP_ACTIVE_PROGRAM_OFFSET__SHIFT			2
    562 
    563 
    564 #define NV30_3D_RC_COLOR0					0x000008ec
    565 #define NV30_3D_RC_COLOR0_B__MASK				0x000000ff
    566 #define NV30_3D_RC_COLOR0_B__SHIFT				0
    567 #define NV30_3D_RC_COLOR0_G__MASK				0x0000ff00
    568 #define NV30_3D_RC_COLOR0_G__SHIFT				8
    569 #define NV30_3D_RC_COLOR0_R__MASK				0x00ff0000
    570 #define NV30_3D_RC_COLOR0_R__SHIFT				16
    571 #define NV30_3D_RC_COLOR0_A__MASK				0xff000000
    572 #define NV30_3D_RC_COLOR0_A__SHIFT				24
    573 
    574 #define NV30_3D_RC_COLOR1					0x000008f0
    575 #define NV30_3D_RC_COLOR1_B__MASK				0x000000ff
    576 #define NV30_3D_RC_COLOR1_B__SHIFT				0
    577 #define NV30_3D_RC_COLOR1_G__MASK				0x0000ff00
    578 #define NV30_3D_RC_COLOR1_G__SHIFT				8
    579 #define NV30_3D_RC_COLOR1_R__MASK				0x00ff0000
    580 #define NV30_3D_RC_COLOR1_R__SHIFT				16
    581 #define NV30_3D_RC_COLOR1_A__MASK				0xff000000
    582 #define NV30_3D_RC_COLOR1_A__SHIFT				24
    583 
    584 #define NV30_3D_RC_FINAL0					0x000008f4
    585 #define NV30_3D_RC_FINAL0_D_INPUT__MASK				0x0000000f
    586 #define NV30_3D_RC_FINAL0_D_INPUT__SHIFT			0
    587 #define NV30_3D_RC_FINAL0_D_INPUT_ZERO				0x00000000
    588 #define NV30_3D_RC_FINAL0_D_INPUT_CONSTANT_COLOR0		0x00000001
    589 #define NV30_3D_RC_FINAL0_D_INPUT_CONSTANT_COLOR1		0x00000002
    590 #define NV30_3D_RC_FINAL0_D_INPUT_FOG				0x00000003
    591 #define NV30_3D_RC_FINAL0_D_INPUT_PRIMARY_COLOR			0x00000004
    592 #define NV30_3D_RC_FINAL0_D_INPUT_SECONDARY_COLOR		0x00000005
    593 #define NV30_3D_RC_FINAL0_D_INPUT_TEXTURE0			0x00000008
    594 #define NV30_3D_RC_FINAL0_D_INPUT_TEXTURE1			0x00000009
    595 #define NV30_3D_RC_FINAL0_D_INPUT_TEXTURE2			0x0000000a
    596 #define NV30_3D_RC_FINAL0_D_INPUT_TEXTURE3			0x0000000b
    597 #define NV30_3D_RC_FINAL0_D_INPUT_SPARE0			0x0000000c
    598 #define NV30_3D_RC_FINAL0_D_INPUT_SPARE1			0x0000000d
    599 #define NV30_3D_RC_FINAL0_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR	0x0000000e
    600 #define NV30_3D_RC_FINAL0_D_INPUT_E_TIMES_F			0x0000000f
    601 #define NV30_3D_RC_FINAL0_D_COMPONENT_USAGE__MASK		0x00000010
    602 #define NV30_3D_RC_FINAL0_D_COMPONENT_USAGE__SHIFT		4
    603 #define NV30_3D_RC_FINAL0_D_COMPONENT_USAGE_RGB			0x00000000
    604 #define NV30_3D_RC_FINAL0_D_COMPONENT_USAGE_ALPHA		0x00000010
    605 #define NV30_3D_RC_FINAL0_D_MAPPING__MASK			0x000000e0
    606 #define NV30_3D_RC_FINAL0_D_MAPPING__SHIFT			5
    607 #define NV30_3D_RC_FINAL0_D_MAPPING_UNSIGNED_IDENTITY		0x00000000
    608 #define NV30_3D_RC_FINAL0_D_MAPPING_UNSIGNED_INVERT		0x00000020
    609 #define NV30_3D_RC_FINAL0_D_MAPPING_EXPAND_NORMAL		0x00000040
    610 #define NV30_3D_RC_FINAL0_D_MAPPING_EXPAND_NEGATE		0x00000060
    611 #define NV30_3D_RC_FINAL0_D_MAPPING_HALF_BIAS_NORMAL		0x00000080
    612 #define NV30_3D_RC_FINAL0_D_MAPPING_HALF_BIAS_NEGATE		0x000000a0
    613 #define NV30_3D_RC_FINAL0_D_MAPPING_SIGNED_IDENTITY		0x000000c0
    614 #define NV30_3D_RC_FINAL0_D_MAPPING_SIGNED_NEGATE		0x000000e0
    615 #define NV30_3D_RC_FINAL0_C_INPUT__MASK				0x00000f00
    616 #define NV30_3D_RC_FINAL0_C_INPUT__SHIFT			8
    617 #define NV30_3D_RC_FINAL0_C_INPUT_ZERO				0x00000000
    618 #define NV30_3D_RC_FINAL0_C_INPUT_CONSTANT_COLOR0		0x00000100
    619 #define NV30_3D_RC_FINAL0_C_INPUT_CONSTANT_COLOR1		0x00000200
    620 #define NV30_3D_RC_FINAL0_C_INPUT_FOG				0x00000300
    621 #define NV30_3D_RC_FINAL0_C_INPUT_PRIMARY_COLOR			0x00000400
    622 #define NV30_3D_RC_FINAL0_C_INPUT_SECONDARY_COLOR		0x00000500
    623 #define NV30_3D_RC_FINAL0_C_INPUT_TEXTURE0			0x00000800
    624 #define NV30_3D_RC_FINAL0_C_INPUT_TEXTURE1			0x00000900
    625 #define NV30_3D_RC_FINAL0_C_INPUT_TEXTURE2			0x00000a00
    626 #define NV30_3D_RC_FINAL0_C_INPUT_TEXTURE3			0x00000b00
    627 #define NV30_3D_RC_FINAL0_C_INPUT_SPARE0			0x00000c00
    628 #define NV30_3D_RC_FINAL0_C_INPUT_SPARE1			0x00000d00
    629 #define NV30_3D_RC_FINAL0_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR	0x00000e00
    630 #define NV30_3D_RC_FINAL0_C_INPUT_E_TIMES_F			0x00000f00
    631 #define NV30_3D_RC_FINAL0_C_COMPONENT_USAGE__MASK		0x00001000
    632 #define NV30_3D_RC_FINAL0_C_COMPONENT_USAGE__SHIFT		12
    633 #define NV30_3D_RC_FINAL0_C_COMPONENT_USAGE_RGB			0x00000000
    634 #define NV30_3D_RC_FINAL0_C_COMPONENT_USAGE_ALPHA		0x00001000
    635 #define NV30_3D_RC_FINAL0_C_MAPPING__MASK			0x0000e000
    636 #define NV30_3D_RC_FINAL0_C_MAPPING__SHIFT			13
    637 #define NV30_3D_RC_FINAL0_C_MAPPING_UNSIGNED_IDENTITY		0x00000000
    638 #define NV30_3D_RC_FINAL0_C_MAPPING_UNSIGNED_INVERT		0x00002000
    639 #define NV30_3D_RC_FINAL0_C_MAPPING_EXPAND_NORMAL		0x00004000
    640 #define NV30_3D_RC_FINAL0_C_MAPPING_EXPAND_NEGATE		0x00006000
    641 #define NV30_3D_RC_FINAL0_C_MAPPING_HALF_BIAS_NORMAL		0x00008000
    642 #define NV30_3D_RC_FINAL0_C_MAPPING_HALF_BIAS_NEGATE		0x0000a000
    643 #define NV30_3D_RC_FINAL0_C_MAPPING_SIGNED_IDENTITY		0x0000c000
    644 #define NV30_3D_RC_FINAL0_C_MAPPING_SIGNED_NEGATE		0x0000e000
    645 #define NV30_3D_RC_FINAL0_B_INPUT__MASK				0x000f0000
    646 #define NV30_3D_RC_FINAL0_B_INPUT__SHIFT			16
    647 #define NV30_3D_RC_FINAL0_B_INPUT_ZERO				0x00000000
    648 #define NV30_3D_RC_FINAL0_B_INPUT_CONSTANT_COLOR0		0x00010000
    649 #define NV30_3D_RC_FINAL0_B_INPUT_CONSTANT_COLOR1		0x00020000
    650 #define NV30_3D_RC_FINAL0_B_INPUT_FOG				0x00030000
    651 #define NV30_3D_RC_FINAL0_B_INPUT_PRIMARY_COLOR			0x00040000
    652 #define NV30_3D_RC_FINAL0_B_INPUT_SECONDARY_COLOR		0x00050000
    653 #define NV30_3D_RC_FINAL0_B_INPUT_TEXTURE0			0x00080000
    654 #define NV30_3D_RC_FINAL0_B_INPUT_TEXTURE1			0x00090000
    655 #define NV30_3D_RC_FINAL0_B_INPUT_TEXTURE2			0x000a0000
    656 #define NV30_3D_RC_FINAL0_B_INPUT_TEXTURE3			0x000b0000
    657 #define NV30_3D_RC_FINAL0_B_INPUT_SPARE0			0x000c0000
    658 #define NV30_3D_RC_FINAL0_B_INPUT_SPARE1			0x000d0000
    659 #define NV30_3D_RC_FINAL0_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR	0x000e0000
    660 #define NV30_3D_RC_FINAL0_B_INPUT_E_TIMES_F			0x000f0000
    661 #define NV30_3D_RC_FINAL0_B_COMPONENT_USAGE__MASK		0x00100000
    662 #define NV30_3D_RC_FINAL0_B_COMPONENT_USAGE__SHIFT		20
    663 #define NV30_3D_RC_FINAL0_B_COMPONENT_USAGE_RGB			0x00000000
    664 #define NV30_3D_RC_FINAL0_B_COMPONENT_USAGE_ALPHA		0x00100000
    665 #define NV30_3D_RC_FINAL0_B_MAPPING__MASK			0x00e00000
    666 #define NV30_3D_RC_FINAL0_B_MAPPING__SHIFT			21
    667 #define NV30_3D_RC_FINAL0_B_MAPPING_UNSIGNED_IDENTITY		0x00000000
    668 #define NV30_3D_RC_FINAL0_B_MAPPING_UNSIGNED_INVERT		0x00200000
    669 #define NV30_3D_RC_FINAL0_B_MAPPING_EXPAND_NORMAL		0x00400000
    670 #define NV30_3D_RC_FINAL0_B_MAPPING_EXPAND_NEGATE		0x00600000
    671 #define NV30_3D_RC_FINAL0_B_MAPPING_HALF_BIAS_NORMAL		0x00800000
    672 #define NV30_3D_RC_FINAL0_B_MAPPING_HALF_BIAS_NEGATE		0x00a00000
    673 #define NV30_3D_RC_FINAL0_B_MAPPING_SIGNED_IDENTITY		0x00c00000
    674 #define NV30_3D_RC_FINAL0_B_MAPPING_SIGNED_NEGATE		0x00e00000
    675 #define NV30_3D_RC_FINAL0_A_INPUT__MASK				0x0f000000
    676 #define NV30_3D_RC_FINAL0_A_INPUT__SHIFT			24
    677 #define NV30_3D_RC_FINAL0_A_INPUT_ZERO				0x00000000
    678 #define NV30_3D_RC_FINAL0_A_INPUT_CONSTANT_COLOR0		0x01000000
    679 #define NV30_3D_RC_FINAL0_A_INPUT_CONSTANT_COLOR1		0x02000000
    680 #define NV30_3D_RC_FINAL0_A_INPUT_FOG				0x03000000
    681 #define NV30_3D_RC_FINAL0_A_INPUT_PRIMARY_COLOR			0x04000000
    682 #define NV30_3D_RC_FINAL0_A_INPUT_SECONDARY_COLOR		0x05000000
    683 #define NV30_3D_RC_FINAL0_A_INPUT_TEXTURE0			0x08000000
    684 #define NV30_3D_RC_FINAL0_A_INPUT_TEXTURE1			0x09000000
    685 #define NV30_3D_RC_FINAL0_A_INPUT_TEXTURE2			0x0a000000
    686 #define NV30_3D_RC_FINAL0_A_INPUT_TEXTURE3			0x0b000000
    687 #define NV30_3D_RC_FINAL0_A_INPUT_SPARE0			0x0c000000
    688 #define NV30_3D_RC_FINAL0_A_INPUT_SPARE1			0x0d000000
    689 #define NV30_3D_RC_FINAL0_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR	0x0e000000
    690 #define NV30_3D_RC_FINAL0_A_INPUT_E_TIMES_F			0x0f000000
    691 #define NV30_3D_RC_FINAL0_A_COMPONENT_USAGE__MASK		0x10000000
    692 #define NV30_3D_RC_FINAL0_A_COMPONENT_USAGE__SHIFT		28
    693 #define NV30_3D_RC_FINAL0_A_COMPONENT_USAGE_RGB			0x00000000
    694 #define NV30_3D_RC_FINAL0_A_COMPONENT_USAGE_ALPHA		0x10000000
    695 #define NV30_3D_RC_FINAL0_A_MAPPING__MASK			0xe0000000
    696 #define NV30_3D_RC_FINAL0_A_MAPPING__SHIFT			29
    697 #define NV30_3D_RC_FINAL0_A_MAPPING_UNSIGNED_IDENTITY		0x00000000
    698 #define NV30_3D_RC_FINAL0_A_MAPPING_UNSIGNED_INVERT		0x20000000
    699 #define NV30_3D_RC_FINAL0_A_MAPPING_EXPAND_NORMAL		0x40000000
    700 #define NV30_3D_RC_FINAL0_A_MAPPING_EXPAND_NEGATE		0x60000000
    701 #define NV30_3D_RC_FINAL0_A_MAPPING_HALF_BIAS_NORMAL		0x80000000
    702 #define NV30_3D_RC_FINAL0_A_MAPPING_HALF_BIAS_NEGATE		0xa0000000
    703 #define NV30_3D_RC_FINAL0_A_MAPPING_SIGNED_IDENTITY		0xc0000000
    704 #define NV30_3D_RC_FINAL0_A_MAPPING_SIGNED_NEGATE		0xe0000000
    705 
    706 #define NV30_3D_RC_FINAL1					0x000008f8
    707 #define NV30_3D_RC_FINAL1_COLOR_SUM_CLAMP			0x00000080
    708 #define NV30_3D_RC_FINAL1_G_INPUT__MASK				0x00000f00
    709 #define NV30_3D_RC_FINAL1_G_INPUT__SHIFT			8
    710 #define NV30_3D_RC_FINAL1_G_INPUT_ZERO				0x00000000
    711 #define NV30_3D_RC_FINAL1_G_INPUT_CONSTANT_COLOR0		0x00000100
    712 #define NV30_3D_RC_FINAL1_G_INPUT_CONSTANT_COLOR1		0x00000200
    713 #define NV30_3D_RC_FINAL1_G_INPUT_FOG				0x00000300
    714 #define NV30_3D_RC_FINAL1_G_INPUT_PRIMARY_COLOR			0x00000400
    715 #define NV30_3D_RC_FINAL1_G_INPUT_SECONDARY_COLOR		0x00000500
    716 #define NV30_3D_RC_FINAL1_G_INPUT_TEXTURE0			0x00000800
    717 #define NV30_3D_RC_FINAL1_G_INPUT_TEXTURE1			0x00000900
    718 #define NV30_3D_RC_FINAL1_G_INPUT_TEXTURE2			0x00000a00
    719 #define NV30_3D_RC_FINAL1_G_INPUT_TEXTURE3			0x00000b00
    720 #define NV30_3D_RC_FINAL1_G_INPUT_SPARE0			0x00000c00
    721 #define NV30_3D_RC_FINAL1_G_INPUT_SPARE1			0x00000d00
    722 #define NV30_3D_RC_FINAL1_G_INPUT_SPARE0_PLUS_SECONDARY_COLOR	0x00000e00
    723 #define NV30_3D_RC_FINAL1_G_INPUT_E_TIMES_F			0x00000f00
    724 #define NV30_3D_RC_FINAL1_G_COMPONENT_USAGE__MASK		0x00001000
    725 #define NV30_3D_RC_FINAL1_G_COMPONENT_USAGE__SHIFT		12
    726 #define NV30_3D_RC_FINAL1_G_COMPONENT_USAGE_RGB			0x00000000
    727 #define NV30_3D_RC_FINAL1_G_COMPONENT_USAGE_ALPHA		0x00001000
    728 #define NV30_3D_RC_FINAL1_G_MAPPING__MASK			0x0000e000
    729 #define NV30_3D_RC_FINAL1_G_MAPPING__SHIFT			13
    730 #define NV30_3D_RC_FINAL1_G_MAPPING_UNSIGNED_IDENTITY		0x00000000
    731 #define NV30_3D_RC_FINAL1_G_MAPPING_UNSIGNED_INVERT		0x00002000
    732 #define NV30_3D_RC_FINAL1_G_MAPPING_EXPAND_NORMAL		0x00004000
    733 #define NV30_3D_RC_FINAL1_G_MAPPING_EXPAND_NEGATE		0x00006000
    734 #define NV30_3D_RC_FINAL1_G_MAPPING_HALF_BIAS_NORMAL		0x00008000
    735 #define NV30_3D_RC_FINAL1_G_MAPPING_HALF_BIAS_NEGATE		0x0000a000
    736 #define NV30_3D_RC_FINAL1_G_MAPPING_SIGNED_IDENTITY		0x0000c000
    737 #define NV30_3D_RC_FINAL1_G_MAPPING_SIGNED_NEGATE		0x0000e000
    738 #define NV30_3D_RC_FINAL1_F_INPUT__MASK				0x000f0000
    739 #define NV30_3D_RC_FINAL1_F_INPUT__SHIFT			16
    740 #define NV30_3D_RC_FINAL1_F_INPUT_ZERO				0x00000000
    741 #define NV30_3D_RC_FINAL1_F_INPUT_CONSTANT_COLOR0		0x00010000
    742 #define NV30_3D_RC_FINAL1_F_INPUT_CONSTANT_COLOR1		0x00020000
    743 #define NV30_3D_RC_FINAL1_F_INPUT_FOG				0x00030000
    744 #define NV30_3D_RC_FINAL1_F_INPUT_PRIMARY_COLOR			0x00040000
    745 #define NV30_3D_RC_FINAL1_F_INPUT_SECONDARY_COLOR		0x00050000
    746 #define NV30_3D_RC_FINAL1_F_INPUT_TEXTURE0			0x00080000
    747 #define NV30_3D_RC_FINAL1_F_INPUT_TEXTURE1			0x00090000
    748 #define NV30_3D_RC_FINAL1_F_INPUT_TEXTURE2			0x000a0000
    749 #define NV30_3D_RC_FINAL1_F_INPUT_TEXTURE3			0x000b0000
    750 #define NV30_3D_RC_FINAL1_F_INPUT_SPARE0			0x000c0000
    751 #define NV30_3D_RC_FINAL1_F_INPUT_SPARE1			0x000d0000
    752 #define NV30_3D_RC_FINAL1_F_INPUT_SPARE0_PLUS_SECONDARY_COLOR	0x000e0000
    753 #define NV30_3D_RC_FINAL1_F_INPUT_E_TIMES_F			0x000f0000
    754 #define NV30_3D_RC_FINAL1_F_COMPONENT_USAGE__MASK		0x00100000
    755 #define NV30_3D_RC_FINAL1_F_COMPONENT_USAGE__SHIFT		20
    756 #define NV30_3D_RC_FINAL1_F_COMPONENT_USAGE_RGB			0x00000000
    757 #define NV30_3D_RC_FINAL1_F_COMPONENT_USAGE_ALPHA		0x00100000
    758 #define NV30_3D_RC_FINAL1_F_MAPPING__MASK			0x00e00000
    759 #define NV30_3D_RC_FINAL1_F_MAPPING__SHIFT			21
    760 #define NV30_3D_RC_FINAL1_F_MAPPING_UNSIGNED_IDENTITY		0x00000000
    761 #define NV30_3D_RC_FINAL1_F_MAPPING_UNSIGNED_INVERT		0x00200000
    762 #define NV30_3D_RC_FINAL1_F_MAPPING_EXPAND_NORMAL		0x00400000
    763 #define NV30_3D_RC_FINAL1_F_MAPPING_EXPAND_NEGATE		0x00600000
    764 #define NV30_3D_RC_FINAL1_F_MAPPING_HALF_BIAS_NORMAL		0x00800000
    765 #define NV30_3D_RC_FINAL1_F_MAPPING_HALF_BIAS_NEGATE		0x00a00000
    766 #define NV30_3D_RC_FINAL1_F_MAPPING_SIGNED_IDENTITY		0x00c00000
    767 #define NV30_3D_RC_FINAL1_F_MAPPING_SIGNED_NEGATE		0x00e00000
    768 #define NV30_3D_RC_FINAL1_E_INPUT__MASK				0x0f000000
    769 #define NV30_3D_RC_FINAL1_E_INPUT__SHIFT			24
    770 #define NV30_3D_RC_FINAL1_E_INPUT_ZERO				0x00000000
    771 #define NV30_3D_RC_FINAL1_E_INPUT_CONSTANT_COLOR0		0x01000000
    772 #define NV30_3D_RC_FINAL1_E_INPUT_CONSTANT_COLOR1		0x02000000
    773 #define NV30_3D_RC_FINAL1_E_INPUT_FOG				0x03000000
    774 #define NV30_3D_RC_FINAL1_E_INPUT_PRIMARY_COLOR			0x04000000
    775 #define NV30_3D_RC_FINAL1_E_INPUT_SECONDARY_COLOR		0x05000000
    776 #define NV30_3D_RC_FINAL1_E_INPUT_TEXTURE0			0x08000000
    777 #define NV30_3D_RC_FINAL1_E_INPUT_TEXTURE1			0x09000000
    778 #define NV30_3D_RC_FINAL1_E_INPUT_TEXTURE2			0x0a000000
    779 #define NV30_3D_RC_FINAL1_E_INPUT_TEXTURE3			0x0b000000
    780 #define NV30_3D_RC_FINAL1_E_INPUT_SPARE0			0x0c000000
    781 #define NV30_3D_RC_FINAL1_E_INPUT_SPARE1			0x0d000000
    782 #define NV30_3D_RC_FINAL1_E_INPUT_SPARE0_PLUS_SECONDARY_COLOR	0x0e000000
    783 #define NV30_3D_RC_FINAL1_E_INPUT_E_TIMES_F			0x0f000000
    784 #define NV30_3D_RC_FINAL1_E_COMPONENT_USAGE__MASK		0x10000000
    785 #define NV30_3D_RC_FINAL1_E_COMPONENT_USAGE__SHIFT		28
    786 #define NV30_3D_RC_FINAL1_E_COMPONENT_USAGE_RGB			0x00000000
    787 #define NV30_3D_RC_FINAL1_E_COMPONENT_USAGE_ALPHA		0x10000000
    788 #define NV30_3D_RC_FINAL1_E_MAPPING__MASK			0xe0000000
    789 #define NV30_3D_RC_FINAL1_E_MAPPING__SHIFT			29
    790 #define NV30_3D_RC_FINAL1_E_MAPPING_UNSIGNED_IDENTITY		0x00000000
    791 #define NV30_3D_RC_FINAL1_E_MAPPING_UNSIGNED_INVERT		0x20000000
    792 #define NV30_3D_RC_FINAL1_E_MAPPING_EXPAND_NORMAL		0x40000000
    793 #define NV30_3D_RC_FINAL1_E_MAPPING_EXPAND_NEGATE		0x60000000
    794 #define NV30_3D_RC_FINAL1_E_MAPPING_HALF_BIAS_NORMAL		0x80000000
    795 #define NV30_3D_RC_FINAL1_E_MAPPING_HALF_BIAS_NEGATE		0xa0000000
    796 #define NV30_3D_RC_FINAL1_E_MAPPING_SIGNED_IDENTITY		0xc0000000
    797 #define NV30_3D_RC_FINAL1_E_MAPPING_SIGNED_NEGATE		0xe0000000
    798 
    799 #define NV30_3D_RC_ENABLE					0x000008fc
    800 #define NV30_3D_RC_ENABLE_NUM_COMBINERS__MASK			0x0000000f
    801 #define NV30_3D_RC_ENABLE_NUM_COMBINERS__SHIFT			0
    802 #define NV30_3D_RC_ENABLE_STAGE_CONSTANT_COLOR0			0x0000f000
    803 #define NV30_3D_RC_ENABLE_STAGE_CONSTANT_COLOR1			0x000f0000
    804 
    805 
    806 #define NV30_3D_RC_IN_ALPHA(i0)				       (0x00000900 + 0x20*(i0))
    807 #define NV30_3D_RC_IN_ALPHA_D_INPUT__MASK			0x0000000f
    808 #define NV30_3D_RC_IN_ALPHA_D_INPUT__SHIFT			0
    809 #define NV30_3D_RC_IN_ALPHA_D_INPUT_ZERO			0x00000000
    810 #define NV30_3D_RC_IN_ALPHA_D_INPUT_CONSTANT_COLOR0		0x00000001
    811 #define NV30_3D_RC_IN_ALPHA_D_INPUT_CONSTANT_COLOR1		0x00000002
    812 #define NV30_3D_RC_IN_ALPHA_D_INPUT_FOG				0x00000003
    813 #define NV30_3D_RC_IN_ALPHA_D_INPUT_PRIMARY_COLOR		0x00000004
    814 #define NV30_3D_RC_IN_ALPHA_D_INPUT_SECONDARY_COLOR		0x00000005
    815 #define NV30_3D_RC_IN_ALPHA_D_INPUT_TEXTURE0			0x00000008
    816 #define NV30_3D_RC_IN_ALPHA_D_INPUT_TEXTURE1			0x00000009
    817 #define NV30_3D_RC_IN_ALPHA_D_INPUT_TEXTURE2			0x0000000a
    818 #define NV30_3D_RC_IN_ALPHA_D_INPUT_TEXTURE3			0x0000000b
    819 #define NV30_3D_RC_IN_ALPHA_D_INPUT_SPARE0			0x0000000c
    820 #define NV30_3D_RC_IN_ALPHA_D_INPUT_SPARE1			0x0000000d
    821 #define NV30_3D_RC_IN_ALPHA_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR	0x0000000e
    822 #define NV30_3D_RC_IN_ALPHA_D_INPUT_E_TIMES_F			0x0000000f
    823 #define NV30_3D_RC_IN_ALPHA_D_COMPONENT_USAGE__MASK		0x00000010
    824 #define NV30_3D_RC_IN_ALPHA_D_COMPONENT_USAGE__SHIFT		4
    825 #define NV30_3D_RC_IN_ALPHA_D_COMPONENT_USAGE_BLUE		0x00000000
    826 #define NV30_3D_RC_IN_ALPHA_D_COMPONENT_USAGE_ALPHA		0x00000010
    827 #define NV30_3D_RC_IN_ALPHA_D_MAPPING__MASK			0x000000e0
    828 #define NV30_3D_RC_IN_ALPHA_D_MAPPING__SHIFT			5
    829 #define NV30_3D_RC_IN_ALPHA_D_MAPPING_UNSIGNED_IDENTITY		0x00000000
    830 #define NV30_3D_RC_IN_ALPHA_D_MAPPING_UNSIGNED_INVERT		0x00000020
    831 #define NV30_3D_RC_IN_ALPHA_D_MAPPING_EXPAND_NORMAL		0x00000040
    832 #define NV30_3D_RC_IN_ALPHA_D_MAPPING_EXPAND_NEGATE		0x00000060
    833 #define NV30_3D_RC_IN_ALPHA_D_MAPPING_HALF_BIAS_NORMAL		0x00000080
    834 #define NV30_3D_RC_IN_ALPHA_D_MAPPING_HALF_BIAS_NEGATE		0x000000a0
    835 #define NV30_3D_RC_IN_ALPHA_D_MAPPING_SIGNED_IDENTITY		0x000000c0
    836 #define NV30_3D_RC_IN_ALPHA_D_MAPPING_SIGNED_NEGATE		0x000000e0
    837 #define NV30_3D_RC_IN_ALPHA_C_INPUT__MASK			0x00000f00
    838 #define NV30_3D_RC_IN_ALPHA_C_INPUT__SHIFT			8
    839 #define NV30_3D_RC_IN_ALPHA_C_INPUT_ZERO			0x00000000
    840 #define NV30_3D_RC_IN_ALPHA_C_INPUT_CONSTANT_COLOR0		0x00000100
    841 #define NV30_3D_RC_IN_ALPHA_C_INPUT_CONSTANT_COLOR1		0x00000200
    842 #define NV30_3D_RC_IN_ALPHA_C_INPUT_FOG				0x00000300
    843 #define NV30_3D_RC_IN_ALPHA_C_INPUT_PRIMARY_COLOR		0x00000400
    844 #define NV30_3D_RC_IN_ALPHA_C_INPUT_SECONDARY_COLOR		0x00000500
    845 #define NV30_3D_RC_IN_ALPHA_C_INPUT_TEXTURE0			0x00000800
    846 #define NV30_3D_RC_IN_ALPHA_C_INPUT_TEXTURE1			0x00000900
    847 #define NV30_3D_RC_IN_ALPHA_C_INPUT_TEXTURE2			0x00000a00
    848 #define NV30_3D_RC_IN_ALPHA_C_INPUT_TEXTURE3			0x00000b00
    849 #define NV30_3D_RC_IN_ALPHA_C_INPUT_SPARE0			0x00000c00
    850 #define NV30_3D_RC_IN_ALPHA_C_INPUT_SPARE1			0x00000d00
    851 #define NV30_3D_RC_IN_ALPHA_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR	0x00000e00
    852 #define NV30_3D_RC_IN_ALPHA_C_INPUT_E_TIMES_F			0x00000f00
    853 #define NV30_3D_RC_IN_ALPHA_C_COMPONENT_USAGE__MASK		0x00001000
    854 #define NV30_3D_RC_IN_ALPHA_C_COMPONENT_USAGE__SHIFT		12
    855 #define NV30_3D_RC_IN_ALPHA_C_COMPONENT_USAGE_BLUE		0x00000000
    856 #define NV30_3D_RC_IN_ALPHA_C_COMPONENT_USAGE_ALPHA		0x00001000
    857 #define NV30_3D_RC_IN_ALPHA_C_MAPPING__MASK			0x0000e000
    858 #define NV30_3D_RC_IN_ALPHA_C_MAPPING__SHIFT			13
    859 #define NV30_3D_RC_IN_ALPHA_C_MAPPING_UNSIGNED_IDENTITY		0x00000000
    860 #define NV30_3D_RC_IN_ALPHA_C_MAPPING_UNSIGNED_INVERT		0x00002000
    861 #define NV30_3D_RC_IN_ALPHA_C_MAPPING_EXPAND_NORMAL		0x00004000
    862 #define NV30_3D_RC_IN_ALPHA_C_MAPPING_EXPAND_NEGATE		0x00006000
    863 #define NV30_3D_RC_IN_ALPHA_C_MAPPING_HALF_BIAS_NORMAL		0x00008000
    864 #define NV30_3D_RC_IN_ALPHA_C_MAPPING_HALF_BIAS_NEGATE		0x0000a000
    865 #define NV30_3D_RC_IN_ALPHA_C_MAPPING_SIGNED_IDENTITY		0x0000c000
    866 #define NV30_3D_RC_IN_ALPHA_C_MAPPING_SIGNED_NEGATE		0x0000e000
    867 #define NV30_3D_RC_IN_ALPHA_B_INPUT__MASK			0x000f0000
    868 #define NV30_3D_RC_IN_ALPHA_B_INPUT__SHIFT			16
    869 #define NV30_3D_RC_IN_ALPHA_B_INPUT_ZERO			0x00000000
    870 #define NV30_3D_RC_IN_ALPHA_B_INPUT_CONSTANT_COLOR0		0x00010000
    871 #define NV30_3D_RC_IN_ALPHA_B_INPUT_CONSTANT_COLOR1		0x00020000
    872 #define NV30_3D_RC_IN_ALPHA_B_INPUT_FOG				0x00030000
    873 #define NV30_3D_RC_IN_ALPHA_B_INPUT_PRIMARY_COLOR		0x00040000
    874 #define NV30_3D_RC_IN_ALPHA_B_INPUT_SECONDARY_COLOR		0x00050000
    875 #define NV30_3D_RC_IN_ALPHA_B_INPUT_TEXTURE0			0x00080000
    876 #define NV30_3D_RC_IN_ALPHA_B_INPUT_TEXTURE1			0x00090000
    877 #define NV30_3D_RC_IN_ALPHA_B_INPUT_TEXTURE2			0x000a0000
    878 #define NV30_3D_RC_IN_ALPHA_B_INPUT_TEXTURE3			0x000b0000
    879 #define NV30_3D_RC_IN_ALPHA_B_INPUT_SPARE0			0x000c0000
    880 #define NV30_3D_RC_IN_ALPHA_B_INPUT_SPARE1			0x000d0000
    881 #define NV30_3D_RC_IN_ALPHA_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR	0x000e0000
    882 #define NV30_3D_RC_IN_ALPHA_B_INPUT_E_TIMES_F			0x000f0000
    883 #define NV30_3D_RC_IN_ALPHA_B_COMPONENT_USAGE__MASK		0x00100000
    884 #define NV30_3D_RC_IN_ALPHA_B_COMPONENT_USAGE__SHIFT		20
    885 #define NV30_3D_RC_IN_ALPHA_B_COMPONENT_USAGE_BLUE		0x00000000
    886 #define NV30_3D_RC_IN_ALPHA_B_COMPONENT_USAGE_ALPHA		0x00100000
    887 #define NV30_3D_RC_IN_ALPHA_B_MAPPING__MASK			0x00e00000
    888 #define NV30_3D_RC_IN_ALPHA_B_MAPPING__SHIFT			21
    889 #define NV30_3D_RC_IN_ALPHA_B_MAPPING_UNSIGNED_IDENTITY		0x00000000
    890 #define NV30_3D_RC_IN_ALPHA_B_MAPPING_UNSIGNED_INVERT		0x00200000
    891 #define NV30_3D_RC_IN_ALPHA_B_MAPPING_EXPAND_NORMAL		0x00400000
    892 #define NV30_3D_RC_IN_ALPHA_B_MAPPING_EXPAND_NEGATE		0x00600000
    893 #define NV30_3D_RC_IN_ALPHA_B_MAPPING_HALF_BIAS_NORMAL		0x00800000
    894 #define NV30_3D_RC_IN_ALPHA_B_MAPPING_HALF_BIAS_NEGATE		0x00a00000
    895 #define NV30_3D_RC_IN_ALPHA_B_MAPPING_SIGNED_IDENTITY		0x00c00000
    896 #define NV30_3D_RC_IN_ALPHA_B_MAPPING_SIGNED_NEGATE		0x00e00000
    897 #define NV30_3D_RC_IN_ALPHA_A_INPUT__MASK			0x0f000000
    898 #define NV30_3D_RC_IN_ALPHA_A_INPUT__SHIFT			24
    899 #define NV30_3D_RC_IN_ALPHA_A_INPUT_ZERO			0x00000000
    900 #define NV30_3D_RC_IN_ALPHA_A_INPUT_CONSTANT_COLOR0		0x01000000
    901 #define NV30_3D_RC_IN_ALPHA_A_INPUT_CONSTANT_COLOR1		0x02000000
    902 #define NV30_3D_RC_IN_ALPHA_A_INPUT_FOG				0x03000000
    903 #define NV30_3D_RC_IN_ALPHA_A_INPUT_PRIMARY_COLOR		0x04000000
    904 #define NV30_3D_RC_IN_ALPHA_A_INPUT_SECONDARY_COLOR		0x05000000
    905 #define NV30_3D_RC_IN_ALPHA_A_INPUT_TEXTURE0			0x08000000
    906 #define NV30_3D_RC_IN_ALPHA_A_INPUT_TEXTURE1			0x09000000
    907 #define NV30_3D_RC_IN_ALPHA_A_INPUT_TEXTURE2			0x0a000000
    908 #define NV30_3D_RC_IN_ALPHA_A_INPUT_TEXTURE3			0x0b000000
    909 #define NV30_3D_RC_IN_ALPHA_A_INPUT_SPARE0			0x0c000000
    910 #define NV30_3D_RC_IN_ALPHA_A_INPUT_SPARE1			0x0d000000
    911 #define NV30_3D_RC_IN_ALPHA_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR	0x0e000000
    912 #define NV30_3D_RC_IN_ALPHA_A_INPUT_E_TIMES_F			0x0f000000
    913 #define NV30_3D_RC_IN_ALPHA_A_COMPONENT_USAGE__MASK		0x10000000
    914 #define NV30_3D_RC_IN_ALPHA_A_COMPONENT_USAGE__SHIFT		28
    915 #define NV30_3D_RC_IN_ALPHA_A_COMPONENT_USAGE_BLUE		0x00000000
    916 #define NV30_3D_RC_IN_ALPHA_A_COMPONENT_USAGE_ALPHA		0x10000000
    917 #define NV30_3D_RC_IN_ALPHA_A_MAPPING__MASK			0xe0000000
    918 #define NV30_3D_RC_IN_ALPHA_A_MAPPING__SHIFT			29
    919 #define NV30_3D_RC_IN_ALPHA_A_MAPPING_UNSIGNED_IDENTITY		0x00000000
    920 #define NV30_3D_RC_IN_ALPHA_A_MAPPING_UNSIGNED_INVERT		0x20000000
    921 #define NV30_3D_RC_IN_ALPHA_A_MAPPING_EXPAND_NORMAL		0x40000000
    922 #define NV30_3D_RC_IN_ALPHA_A_MAPPING_EXPAND_NEGATE		0x60000000
    923 #define NV30_3D_RC_IN_ALPHA_A_MAPPING_HALF_BIAS_NORMAL		0x80000000
    924 #define NV30_3D_RC_IN_ALPHA_A_MAPPING_HALF_BIAS_NEGATE		0xa0000000
    925 #define NV30_3D_RC_IN_ALPHA_A_MAPPING_SIGNED_IDENTITY		0xc0000000
    926 #define NV30_3D_RC_IN_ALPHA_A_MAPPING_SIGNED_NEGATE		0xe0000000
    927 
    928 #define NV30_3D_RC_IN_RGB(i0)				       (0x00000904 + 0x20*(i0))
    929 #define NV30_3D_RC_IN_RGB_D_INPUT__MASK				0x0000000f
    930 #define NV30_3D_RC_IN_RGB_D_INPUT__SHIFT			0
    931 #define NV30_3D_RC_IN_RGB_D_INPUT_ZERO				0x00000000
    932 #define NV30_3D_RC_IN_RGB_D_INPUT_CONSTANT_COLOR0		0x00000001
    933 #define NV30_3D_RC_IN_RGB_D_INPUT_CONSTANT_COLOR1		0x00000002
    934 #define NV30_3D_RC_IN_RGB_D_INPUT_FOG				0x00000003
    935 #define NV30_3D_RC_IN_RGB_D_INPUT_PRIMARY_COLOR			0x00000004
    936 #define NV30_3D_RC_IN_RGB_D_INPUT_SECONDARY_COLOR		0x00000005
    937 #define NV30_3D_RC_IN_RGB_D_INPUT_TEXTURE0			0x00000008
    938 #define NV30_3D_RC_IN_RGB_D_INPUT_TEXTURE1			0x00000009
    939 #define NV30_3D_RC_IN_RGB_D_INPUT_TEXTURE2			0x0000000a
    940 #define NV30_3D_RC_IN_RGB_D_INPUT_TEXTURE3			0x0000000b
    941 #define NV30_3D_RC_IN_RGB_D_INPUT_SPARE0			0x0000000c
    942 #define NV30_3D_RC_IN_RGB_D_INPUT_SPARE1			0x0000000d
    943 #define NV30_3D_RC_IN_RGB_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR	0x0000000e
    944 #define NV30_3D_RC_IN_RGB_D_INPUT_E_TIMES_F			0x0000000f
    945 #define NV30_3D_RC_IN_RGB_D_COMPONENT_USAGE__MASK		0x00000010
    946 #define NV30_3D_RC_IN_RGB_D_COMPONENT_USAGE__SHIFT		4
    947 #define NV30_3D_RC_IN_RGB_D_COMPONENT_USAGE_RGB			0x00000000
    948 #define NV30_3D_RC_IN_RGB_D_COMPONENT_USAGE_ALPHA		0x00000010
    949 #define NV30_3D_RC_IN_RGB_D_MAPPING__MASK			0x000000e0
    950 #define NV30_3D_RC_IN_RGB_D_MAPPING__SHIFT			5
    951 #define NV30_3D_RC_IN_RGB_D_MAPPING_UNSIGNED_IDENTITY		0x00000000
    952 #define NV30_3D_RC_IN_RGB_D_MAPPING_UNSIGNED_INVERT		0x00000020
    953 #define NV30_3D_RC_IN_RGB_D_MAPPING_EXPAND_NORMAL		0x00000040
    954 #define NV30_3D_RC_IN_RGB_D_MAPPING_EXPAND_NEGATE		0x00000060
    955 #define NV30_3D_RC_IN_RGB_D_MAPPING_HALF_BIAS_NORMAL		0x00000080
    956 #define NV30_3D_RC_IN_RGB_D_MAPPING_HALF_BIAS_NEGATE		0x000000a0
    957 #define NV30_3D_RC_IN_RGB_D_MAPPING_SIGNED_IDENTITY		0x000000c0
    958 #define NV30_3D_RC_IN_RGB_D_MAPPING_SIGNED_NEGATE		0x000000e0
    959 #define NV30_3D_RC_IN_RGB_C_INPUT__MASK				0x00000f00
    960 #define NV30_3D_RC_IN_RGB_C_INPUT__SHIFT			8
    961 #define NV30_3D_RC_IN_RGB_C_INPUT_ZERO				0x00000000
    962 #define NV30_3D_RC_IN_RGB_C_INPUT_CONSTANT_COLOR0		0x00000100
    963 #define NV30_3D_RC_IN_RGB_C_INPUT_CONSTANT_COLOR1		0x00000200
    964 #define NV30_3D_RC_IN_RGB_C_INPUT_FOG				0x00000300
    965 #define NV30_3D_RC_IN_RGB_C_INPUT_PRIMARY_COLOR			0x00000400
    966 #define NV30_3D_RC_IN_RGB_C_INPUT_SECONDARY_COLOR		0x00000500
    967 #define NV30_3D_RC_IN_RGB_C_INPUT_TEXTURE0			0x00000800
    968 #define NV30_3D_RC_IN_RGB_C_INPUT_TEXTURE1			0x00000900
    969 #define NV30_3D_RC_IN_RGB_C_INPUT_TEXTURE2			0x00000a00
    970 #define NV30_3D_RC_IN_RGB_C_INPUT_TEXTURE3			0x00000b00
    971 #define NV30_3D_RC_IN_RGB_C_INPUT_SPARE0			0x00000c00
    972 #define NV30_3D_RC_IN_RGB_C_INPUT_SPARE1			0x00000d00
    973 #define NV30_3D_RC_IN_RGB_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR	0x00000e00
    974 #define NV30_3D_RC_IN_RGB_C_INPUT_E_TIMES_F			0x00000f00
    975 #define NV30_3D_RC_IN_RGB_C_COMPONENT_USAGE__MASK		0x00001000
    976 #define NV30_3D_RC_IN_RGB_C_COMPONENT_USAGE__SHIFT		12
    977 #define NV30_3D_RC_IN_RGB_C_COMPONENT_USAGE_RGB			0x00000000
    978 #define NV30_3D_RC_IN_RGB_C_COMPONENT_USAGE_ALPHA		0x00001000
    979 #define NV30_3D_RC_IN_RGB_C_MAPPING__MASK			0x0000e000
    980 #define NV30_3D_RC_IN_RGB_C_MAPPING__SHIFT			13
    981 #define NV30_3D_RC_IN_RGB_C_MAPPING_UNSIGNED_IDENTITY		0x00000000
    982 #define NV30_3D_RC_IN_RGB_C_MAPPING_UNSIGNED_INVERT		0x00002000
    983 #define NV30_3D_RC_IN_RGB_C_MAPPING_EXPAND_NORMAL		0x00004000
    984 #define NV30_3D_RC_IN_RGB_C_MAPPING_EXPAND_NEGATE		0x00006000
    985 #define NV30_3D_RC_IN_RGB_C_MAPPING_HALF_BIAS_NORMAL		0x00008000
    986 #define NV30_3D_RC_IN_RGB_C_MAPPING_HALF_BIAS_NEGATE		0x0000a000
    987 #define NV30_3D_RC_IN_RGB_C_MAPPING_SIGNED_IDENTITY		0x0000c000
    988 #define NV30_3D_RC_IN_RGB_C_MAPPING_SIGNED_NEGATE		0x0000e000
    989 #define NV30_3D_RC_IN_RGB_B_INPUT__MASK				0x000f0000
    990 #define NV30_3D_RC_IN_RGB_B_INPUT__SHIFT			16
    991 #define NV30_3D_RC_IN_RGB_B_INPUT_ZERO				0x00000000
    992 #define NV30_3D_RC_IN_RGB_B_INPUT_CONSTANT_COLOR0		0x00010000
    993 #define NV30_3D_RC_IN_RGB_B_INPUT_CONSTANT_COLOR1		0x00020000
    994 #define NV30_3D_RC_IN_RGB_B_INPUT_FOG				0x00030000
    995 #define NV30_3D_RC_IN_RGB_B_INPUT_PRIMARY_COLOR			0x00040000
    996 #define NV30_3D_RC_IN_RGB_B_INPUT_SECONDARY_COLOR		0x00050000
    997 #define NV30_3D_RC_IN_RGB_B_INPUT_TEXTURE0			0x00080000
    998 #define NV30_3D_RC_IN_RGB_B_INPUT_TEXTURE1			0x00090000
    999 #define NV30_3D_RC_IN_RGB_B_INPUT_TEXTURE2			0x000a0000
   1000 #define NV30_3D_RC_IN_RGB_B_INPUT_TEXTURE3			0x000b0000
   1001 #define NV30_3D_RC_IN_RGB_B_INPUT_SPARE0			0x000c0000
   1002 #define NV30_3D_RC_IN_RGB_B_INPUT_SPARE1			0x000d0000
   1003 #define NV30_3D_RC_IN_RGB_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR	0x000e0000
   1004 #define NV30_3D_RC_IN_RGB_B_INPUT_E_TIMES_F			0x000f0000
   1005 #define NV30_3D_RC_IN_RGB_B_COMPONENT_USAGE__MASK		0x00100000
   1006 #define NV30_3D_RC_IN_RGB_B_COMPONENT_USAGE__SHIFT		20
   1007 #define NV30_3D_RC_IN_RGB_B_COMPONENT_USAGE_RGB			0x00000000
   1008 #define NV30_3D_RC_IN_RGB_B_COMPONENT_USAGE_ALPHA		0x00100000
   1009 #define NV30_3D_RC_IN_RGB_B_MAPPING__MASK			0x00e00000
   1010 #define NV30_3D_RC_IN_RGB_B_MAPPING__SHIFT			21
   1011 #define NV30_3D_RC_IN_RGB_B_MAPPING_UNSIGNED_IDENTITY		0x00000000
   1012 #define NV30_3D_RC_IN_RGB_B_MAPPING_UNSIGNED_INVERT		0x00200000
   1013 #define NV30_3D_RC_IN_RGB_B_MAPPING_EXPAND_NORMAL		0x00400000
   1014 #define NV30_3D_RC_IN_RGB_B_MAPPING_EXPAND_NEGATE		0x00600000
   1015 #define NV30_3D_RC_IN_RGB_B_MAPPING_HALF_BIAS_NORMAL		0x00800000
   1016 #define NV30_3D_RC_IN_RGB_B_MAPPING_HALF_BIAS_NEGATE		0x00a00000
   1017 #define NV30_3D_RC_IN_RGB_B_MAPPING_SIGNED_IDENTITY		0x00c00000
   1018 #define NV30_3D_RC_IN_RGB_B_MAPPING_SIGNED_NEGATE		0x00e00000
   1019 #define NV30_3D_RC_IN_RGB_A_INPUT__MASK				0x0f000000
   1020 #define NV30_3D_RC_IN_RGB_A_INPUT__SHIFT			24
   1021 #define NV30_3D_RC_IN_RGB_A_INPUT_ZERO				0x00000000
   1022 #define NV30_3D_RC_IN_RGB_A_INPUT_CONSTANT_COLOR0		0x01000000
   1023 #define NV30_3D_RC_IN_RGB_A_INPUT_CONSTANT_COLOR1		0x02000000
   1024 #define NV30_3D_RC_IN_RGB_A_INPUT_FOG				0x03000000
   1025 #define NV30_3D_RC_IN_RGB_A_INPUT_PRIMARY_COLOR			0x04000000
   1026 #define NV30_3D_RC_IN_RGB_A_INPUT_SECONDARY_COLOR		0x05000000
   1027 #define NV30_3D_RC_IN_RGB_A_INPUT_TEXTURE0			0x08000000
   1028 #define NV30_3D_RC_IN_RGB_A_INPUT_TEXTURE1			0x09000000
   1029 #define NV30_3D_RC_IN_RGB_A_INPUT_TEXTURE2			0x0a000000
   1030 #define NV30_3D_RC_IN_RGB_A_INPUT_TEXTURE3			0x0b000000
   1031 #define NV30_3D_RC_IN_RGB_A_INPUT_SPARE0			0x0c000000
   1032 #define NV30_3D_RC_IN_RGB_A_INPUT_SPARE1			0x0d000000
   1033 #define NV30_3D_RC_IN_RGB_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR	0x0e000000
   1034 #define NV30_3D_RC_IN_RGB_A_INPUT_E_TIMES_F			0x0f000000
   1035 #define NV30_3D_RC_IN_RGB_A_COMPONENT_USAGE__MASK		0x10000000
   1036 #define NV30_3D_RC_IN_RGB_A_COMPONENT_USAGE__SHIFT		28
   1037 #define NV30_3D_RC_IN_RGB_A_COMPONENT_USAGE_RGB			0x00000000
   1038 #define NV30_3D_RC_IN_RGB_A_COMPONENT_USAGE_ALPHA		0x10000000
   1039 #define NV30_3D_RC_IN_RGB_A_MAPPING__MASK			0xe0000000
   1040 #define NV30_3D_RC_IN_RGB_A_MAPPING__SHIFT			29
   1041 #define NV30_3D_RC_IN_RGB_A_MAPPING_UNSIGNED_IDENTITY		0x00000000
   1042 #define NV30_3D_RC_IN_RGB_A_MAPPING_UNSIGNED_INVERT		0x20000000
   1043 #define NV30_3D_RC_IN_RGB_A_MAPPING_EXPAND_NORMAL		0x40000000
   1044 #define NV30_3D_RC_IN_RGB_A_MAPPING_EXPAND_NEGATE		0x60000000
   1045 #define NV30_3D_RC_IN_RGB_A_MAPPING_HALF_BIAS_NORMAL		0x80000000
   1046 #define NV30_3D_RC_IN_RGB_A_MAPPING_HALF_BIAS_NEGATE		0xa0000000
   1047 #define NV30_3D_RC_IN_RGB_A_MAPPING_SIGNED_IDENTITY		0xc0000000
   1048 #define NV30_3D_RC_IN_RGB_A_MAPPING_SIGNED_NEGATE		0xe0000000
   1049 
   1050 #define NV30_3D_RC_CONSTANT_COLOR0(i0)			       (0x00000908 + 0x20*(i0))
   1051 #define NV30_3D_RC_CONSTANT_COLOR0_B__MASK			0x000000ff
   1052 #define NV30_3D_RC_CONSTANT_COLOR0_B__SHIFT			0
   1053 #define NV30_3D_RC_CONSTANT_COLOR0_G__MASK			0x0000ff00
   1054 #define NV30_3D_RC_CONSTANT_COLOR0_G__SHIFT			8
   1055 #define NV30_3D_RC_CONSTANT_COLOR0_R__MASK			0x00ff0000
   1056 #define NV30_3D_RC_CONSTANT_COLOR0_R__SHIFT			16
   1057 #define NV30_3D_RC_CONSTANT_COLOR0_A__MASK			0xff000000
   1058 #define NV30_3D_RC_CONSTANT_COLOR0_A__SHIFT			24
   1059 
   1060 #define NV30_3D_RC_CONSTANT_COLOR1(i0)			       (0x0000090c + 0x20*(i0))
   1061 #define NV30_3D_RC_CONSTANT_COLOR1_B__MASK			0x000000ff
   1062 #define NV30_3D_RC_CONSTANT_COLOR1_B__SHIFT			0
   1063 #define NV30_3D_RC_CONSTANT_COLOR1_G__MASK			0x0000ff00
   1064 #define NV30_3D_RC_CONSTANT_COLOR1_G__SHIFT			8
   1065 #define NV30_3D_RC_CONSTANT_COLOR1_R__MASK			0x00ff0000
   1066 #define NV30_3D_RC_CONSTANT_COLOR1_R__SHIFT			16
   1067 #define NV30_3D_RC_CONSTANT_COLOR1_A__MASK			0xff000000
   1068 #define NV30_3D_RC_CONSTANT_COLOR1_A__SHIFT			24
   1069 
   1070 #define NV30_3D_RC_OUT_ALPHA(i0)			       (0x00000910 + 0x20*(i0))
   1071 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT__MASK			0x0000000f
   1072 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT__SHIFT			0
   1073 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_ZERO			0x00000000
   1074 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_CONSTANT_COLOR0		0x00000001
   1075 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_CONSTANT_COLOR1		0x00000002
   1076 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_FOG			0x00000003
   1077 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_PRIMARY_COLOR		0x00000004
   1078 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_SECONDARY_COLOR		0x00000005
   1079 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE0			0x00000008
   1080 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE1			0x00000009
   1081 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE2			0x0000000a
   1082 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE3			0x0000000b
   1083 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_SPARE0			0x0000000c
   1084 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_SPARE1			0x0000000d
   1085 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR	0x0000000e
   1086 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_E_TIMES_F		0x0000000f
   1087 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT__MASK			0x000000f0
   1088 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT__SHIFT			4
   1089 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_ZERO			0x00000000
   1090 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_CONSTANT_COLOR0		0x00000010
   1091 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_CONSTANT_COLOR1		0x00000020
   1092 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_FOG			0x00000030
   1093 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_PRIMARY_COLOR		0x00000040
   1094 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_SECONDARY_COLOR		0x00000050
   1095 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE0			0x00000080
   1096 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE1			0x00000090
   1097 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE2			0x000000a0
   1098 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE3			0x000000b0
   1099 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_SPARE0			0x000000c0
   1100 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_SPARE1			0x000000d0
   1101 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR	0x000000e0
   1102 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_E_TIMES_F		0x000000f0
   1103 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT__MASK			0x00000f00
   1104 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT__SHIFT			8
   1105 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_ZERO			0x00000000
   1106 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_CONSTANT_COLOR0		0x00000100
   1107 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_CONSTANT_COLOR1		0x00000200
   1108 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_FOG			0x00000300
   1109 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_PRIMARY_COLOR		0x00000400
   1110 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_SECONDARY_COLOR		0x00000500
   1111 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE0		0x00000800
   1112 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE1		0x00000900
   1113 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE2		0x00000a00
   1114 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE3		0x00000b00
   1115 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_SPARE0			0x00000c00
   1116 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_SPARE1			0x00000d00
   1117 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR	0x00000e00
   1118 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_E_TIMES_F		0x00000f00
   1119 #define NV30_3D_RC_OUT_ALPHA_CD_DOT_PRODUCT			0x00001000
   1120 #define NV30_3D_RC_OUT_ALPHA_AB_DOT_PRODUCT			0x00002000
   1121 #define NV30_3D_RC_OUT_ALPHA_MUX_SUM				0x00004000
   1122 #define NV30_3D_RC_OUT_ALPHA_BIAS__MASK				0x00008000
   1123 #define NV30_3D_RC_OUT_ALPHA_BIAS__SHIFT			15
   1124 #define NV30_3D_RC_OUT_ALPHA_BIAS_NONE				0x00000000
   1125 #define NV30_3D_RC_OUT_ALPHA_BIAS_BIAS_BY_NEGATIVE_ONE_HALF	0x00008000
   1126 #define NV30_3D_RC_OUT_ALPHA_SCALE__MASK			0x00030000
   1127 #define NV30_3D_RC_OUT_ALPHA_SCALE__SHIFT			16
   1128 #define NV30_3D_RC_OUT_ALPHA_SCALE_NONE				0x00000000
   1129 #define NV30_3D_RC_OUT_ALPHA_SCALE_SCALE_BY_TWO			0x00010000
   1130 #define NV30_3D_RC_OUT_ALPHA_SCALE_SCALE_BY_FOUR		0x00020000
   1131 #define NV30_3D_RC_OUT_ALPHA_SCALE_SCALE_BY_ONE_HALF		0x00030000
   1132 
   1133 #define NV30_3D_RC_OUT_RGB(i0)				       (0x00000914 + 0x20*(i0))
   1134 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT__MASK			0x0000000f
   1135 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT__SHIFT			0
   1136 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_ZERO			0x00000000
   1137 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_CONSTANT_COLOR0		0x00000001
   1138 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_CONSTANT_COLOR1		0x00000002
   1139 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_FOG			0x00000003
   1140 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_PRIMARY_COLOR		0x00000004
   1141 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_SECONDARY_COLOR		0x00000005
   1142 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_TEXTURE0			0x00000008
   1143 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_TEXTURE1			0x00000009
   1144 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_TEXTURE2			0x0000000a
   1145 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_TEXTURE3			0x0000000b
   1146 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_SPARE0			0x0000000c
   1147 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_SPARE1			0x0000000d
   1148 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR	0x0000000e
   1149 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_E_TIMES_F			0x0000000f
   1150 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT__MASK			0x000000f0
   1151 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT__SHIFT			4
   1152 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_ZERO			0x00000000
   1153 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_CONSTANT_COLOR0		0x00000010
   1154 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_CONSTANT_COLOR1		0x00000020
   1155 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_FOG			0x00000030
   1156 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_PRIMARY_COLOR		0x00000040
   1157 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_SECONDARY_COLOR		0x00000050
   1158 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_TEXTURE0			0x00000080
   1159 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_TEXTURE1			0x00000090
   1160 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_TEXTURE2			0x000000a0
   1161 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_TEXTURE3			0x000000b0
   1162 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_SPARE0			0x000000c0
   1163 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_SPARE1			0x000000d0
   1164 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR	0x000000e0
   1165 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_E_TIMES_F			0x000000f0
   1166 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT__MASK			0x00000f00
   1167 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT__SHIFT			8
   1168 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_ZERO			0x00000000
   1169 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_CONSTANT_COLOR0		0x00000100
   1170 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_CONSTANT_COLOR1		0x00000200
   1171 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_FOG			0x00000300
   1172 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_PRIMARY_COLOR		0x00000400
   1173 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_SECONDARY_COLOR		0x00000500
   1174 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_TEXTURE0			0x00000800
   1175 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_TEXTURE1			0x00000900
   1176 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_TEXTURE2			0x00000a00
   1177 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_TEXTURE3			0x00000b00
   1178 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_SPARE0			0x00000c00
   1179 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_SPARE1			0x00000d00
   1180 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR	0x00000e00
   1181 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_E_TIMES_F			0x00000f00
   1182 #define NV30_3D_RC_OUT_RGB_CD_DOT_PRODUCT			0x00001000
   1183 #define NV30_3D_RC_OUT_RGB_AB_DOT_PRODUCT			0x00002000
   1184 #define NV30_3D_RC_OUT_RGB_MUX_SUM				0x00004000
   1185 #define NV30_3D_RC_OUT_RGB_BIAS__MASK				0x00008000
   1186 #define NV30_3D_RC_OUT_RGB_BIAS__SHIFT				15
   1187 #define NV30_3D_RC_OUT_RGB_BIAS_NONE				0x00000000
   1188 #define NV30_3D_RC_OUT_RGB_BIAS_BIAS_BY_NEGATIVE_ONE_HALF	0x00008000
   1189 #define NV30_3D_RC_OUT_RGB_SCALE__MASK				0x00030000
   1190 #define NV30_3D_RC_OUT_RGB_SCALE__SHIFT				16
   1191 #define NV30_3D_RC_OUT_RGB_SCALE_NONE				0x00000000
   1192 #define NV30_3D_RC_OUT_RGB_SCALE_SCALE_BY_TWO			0x00010000
   1193 #define NV30_3D_RC_OUT_RGB_SCALE_SCALE_BY_FOUR			0x00020000
   1194 #define NV30_3D_RC_OUT_RGB_SCALE_SCALE_BY_ONE_HALF		0x00030000
   1195 
   1196 #define NV30_3D_VIEWPORT_HORIZ					0x00000a00
   1197 #define NV30_3D_VIEWPORT_HORIZ_X__MASK				0x0000ffff
   1198 #define NV30_3D_VIEWPORT_HORIZ_X__SHIFT				0
   1199 #define NV30_3D_VIEWPORT_HORIZ_W__MASK				0xffff0000
   1200 #define NV30_3D_VIEWPORT_HORIZ_W__SHIFT				16
   1201 
   1202 #define NV30_3D_VIEWPORT_VERT					0x00000a04
   1203 #define NV30_3D_VIEWPORT_VERT_Y__MASK				0x0000ffff
   1204 #define NV30_3D_VIEWPORT_VERT_Y__SHIFT				0
   1205 #define NV30_3D_VIEWPORT_VERT_H__MASK				0xffff0000
   1206 #define NV30_3D_VIEWPORT_VERT_H__SHIFT				16
   1207 
   1208 #define NV30_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION	0x00000a10
   1209 
   1210 
   1211 #define NV30_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_R	0x00000a10
   1212 
   1213 #define NV30_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_G	0x00000a14
   1214 
   1215 #define NV30_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_B	0x00000a18
   1216 
   1217 #define NV30_3D_VIEWPORT_TRANSLATE				0x00000a20
   1218 
   1219 
   1220 #define NV30_3D_VIEWPORT_TRANSLATE_X				0x00000a20
   1221 
   1222 #define NV30_3D_VIEWPORT_TRANSLATE_Y				0x00000a24
   1223 
   1224 #define NV30_3D_VIEWPORT_TRANSLATE_Z				0x00000a28
   1225 
   1226 #define NV30_3D_VIEWPORT_TRANSLATE_W				0x00000a2c
   1227 
   1228 #define NV30_3D_VIEWPORT_SCALE					0x00000a30
   1229 
   1230 
   1231 #define NV30_3D_VIEWPORT_SCALE_X				0x00000a30
   1232 
   1233 #define NV30_3D_VIEWPORT_SCALE_Y				0x00000a34
   1234 
   1235 #define NV30_3D_VIEWPORT_SCALE_Z				0x00000a38
   1236 
   1237 #define NV30_3D_VIEWPORT_SCALE_W				0x00000a3c
   1238 
   1239 #define NV30_3D_POLYGON_OFFSET_POINT_ENABLE			0x00000a60
   1240 
   1241 #define NV30_3D_POLYGON_OFFSET_LINE_ENABLE			0x00000a64
   1242 
   1243 #define NV30_3D_POLYGON_OFFSET_FILL_ENABLE			0x00000a68
   1244 
   1245 #define NV30_3D_DEPTH_FUNC					0x00000a6c
   1246 #define NV30_3D_DEPTH_FUNC_NEVER				0x00000200
   1247 #define NV30_3D_DEPTH_FUNC_LESS					0x00000201
   1248 #define NV30_3D_DEPTH_FUNC_EQUAL				0x00000202
   1249 #define NV30_3D_DEPTH_FUNC_LEQUAL				0x00000203
   1250 #define NV30_3D_DEPTH_FUNC_GREATER				0x00000204
   1251 #define NV30_3D_DEPTH_FUNC_NOTEQUAL				0x00000205
   1252 #define NV30_3D_DEPTH_FUNC_GEQUAL				0x00000206
   1253 #define NV30_3D_DEPTH_FUNC_ALWAYS				0x00000207
   1254 
   1255 #define NV30_3D_DEPTH_WRITE_ENABLE				0x00000a70
   1256 
   1257 #define NV30_3D_DEPTH_TEST_ENABLE				0x00000a74
   1258 
   1259 #define NV30_3D_POLYGON_OFFSET_FACTOR				0x00000a78
   1260 
   1261 #define NV30_3D_POLYGON_OFFSET_UNITS				0x00000a7c
   1262 
   1263 #define NV30_3D_VTX_ATTR_3I_XY(i0)			       (0x00000a80 + 0x8*(i0))
   1264 #define NV30_3D_VTX_ATTR_3I_XY__ESIZE				0x00000008
   1265 #define NV30_3D_VTX_ATTR_3I_XY__LEN				0x00000010
   1266 #define NV30_3D_VTX_ATTR_3I_XY_X__MASK				0x0000ffff
   1267 #define NV30_3D_VTX_ATTR_3I_XY_X__SHIFT				0
   1268 #define NV30_3D_VTX_ATTR_3I_XY_Y__MASK				0xffff0000
   1269 #define NV30_3D_VTX_ATTR_3I_XY_Y__SHIFT				16
   1270 
   1271 #define NV30_3D_VTX_ATTR_3I_Z(i0)			       (0x00000a84 + 0x8*(i0))
   1272 #define NV30_3D_VTX_ATTR_3I_Z__ESIZE				0x00000008
   1273 #define NV30_3D_VTX_ATTR_3I_Z__LEN				0x00000010
   1274 #define NV30_3D_VTX_ATTR_3I_Z_Z__MASK				0x0000ffff
   1275 #define NV30_3D_VTX_ATTR_3I_Z_Z__SHIFT				0
   1276 
   1277 #define NV30_3D_TEX_FILTER_OPTIMIZATION(i0)		       (0x00000b00 + 0x4*(i0))
   1278 #define NV30_3D_TEX_FILTER_OPTIMIZATION__ESIZE			0x00000004
   1279 #define NV30_3D_TEX_FILTER_OPTIMIZATION__LEN			0x00000004
   1280 #define NV40_3D_TEX_FILTER_OPTIMIZATION_TRILINEAR__MASK		0x0000001f
   1281 #define NV40_3D_TEX_FILTER_OPTIMIZATION_TRILINEAR__SHIFT	0
   1282 #define NV40_3D_TEX_FILTER_OPTIMIZATION_TRILINEAR_OFF		0x00000000
   1283 #define NV40_3D_TEX_FILTER_OPTIMIZATION_TRILINEAR_HIGH_QUALITY	0x00000004
   1284 #define NV40_3D_TEX_FILTER_OPTIMIZATION_TRILINEAR_QUALITY	0x00000006
   1285 #define NV40_3D_TEX_FILTER_OPTIMIZATION_TRILINEAR_PERFORMANCE	0x00000008
   1286 #define NV40_3D_TEX_FILTER_OPTIMIZATION_TRILINEAR_HIGH_PERFORMANCE	0x00000018
   1287 #define NV40_3D_TEX_FILTER_OPTIMIZATION_ANISO_SAMPLE__MASK	0x000001c0
   1288 #define NV40_3D_TEX_FILTER_OPTIMIZATION_ANISO_SAMPLE__SHIFT	6
   1289 #define NV40_3D_TEX_FILTER_OPTIMIZATION_ANISO_SAMPLE_OFF	0x00000000
   1290 #define NV40_3D_TEX_FILTER_OPTIMIZATION_ANISO_SAMPLE_HIGH_QUALITY	0x000000c0
   1291 #define NV40_3D_TEX_FILTER_OPTIMIZATION_ANISO_SAMPLE_QUALITY	0x000001c0
   1292 #define NV40_3D_TEX_FILTER_OPTIMIZATION_ANISO_SAMPLE_PERFORMANCE	0x00000140
   1293 #define NV40_3D_TEX_FILTER_OPTIMIZATION_UNKNOWN__MASK		0x00007c00
   1294 #define NV40_3D_TEX_FILTER_OPTIMIZATION_UNKNOWN__SHIFT		10
   1295 #define NV40_3D_TEX_FILTER_OPTIMIZATION_UNKNOWN_OFF		0x00000000
   1296 #define NV40_3D_TEX_FILTER_OPTIMIZATION_UNKNOWN_PARTIAL		0x00002c00
   1297 #define NV40_3D_TEX_FILTER_OPTIMIZATION_UNKNOWN_FULL		0x00007c00
   1298 
   1299 #define NV40_3D_UNK0B40(i0)				       (0x00000b40 + 0x4*(i0))
   1300 #define NV40_3D_UNK0B40__ESIZE					0x00000004
   1301 #define NV40_3D_UNK0B40__LEN					0x00000008
   1302 
   1303 #define NV30_3D_VP_UPLOAD_INST(i0)			       (0x00000b80 + 0x4*(i0))
   1304 #define NV30_3D_VP_UPLOAD_INST__ESIZE				0x00000004
   1305 #define NV30_3D_VP_UPLOAD_INST__LEN				0x00000004
   1306 
   1307 
   1308 #define NV30_3D_TEX_CLIP_PLANE(i0)			       (0x00000e00 + 0x10*(i0))
   1309 
   1310 
   1311 #define NV30_3D_TEX_CLIP_PLANE_X(i0)			       (0x00000e00 + 0x10*(i0))
   1312 
   1313 #define NV30_3D_TEX_CLIP_PLANE_Y(i0)			       (0x00000e04 + 0x10*(i0))
   1314 
   1315 #define NV30_3D_TEX_CLIP_PLANE_Z(i0)			       (0x00000e08 + 0x10*(i0))
   1316 
   1317 #define NV30_3D_TEX_CLIP_PLANE_W(i0)			       (0x00000e0c + 0x10*(i0))
   1318 
   1319 #define NV30_3D_LIGHT						0x00001000
   1320 
   1321 
   1322 #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT(i0)	       (0x00001000 + 0x40*(i0))
   1323 
   1324 
   1325 #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_R(i0)	       (0x00001000 + 0x40*(i0))
   1326 
   1327 #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_G(i0)	       (0x00001004 + 0x40*(i0))
   1328 
   1329 #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_B(i0)	       (0x00001008 + 0x40*(i0))
   1330 
   1331 #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE(i0)	       (0x0000100c + 0x40*(i0))
   1332 
   1333 
   1334 #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_R(i0)	       (0x0000100c + 0x40*(i0))
   1335 
   1336 #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_G(i0)	       (0x00001010 + 0x40*(i0))
   1337 
   1338 #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_B(i0)	       (0x00001014 + 0x40*(i0))
   1339 
   1340 #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR(i0)	       (0x00001018 + 0x40*(i0))
   1341 
   1342 
   1343 #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_R(i0)	       (0x00001018 + 0x40*(i0))
   1344 
   1345 #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_G(i0)	       (0x0000101c + 0x40*(i0))
   1346 
   1347 #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_B(i0)	       (0x00001020 + 0x40*(i0))
   1348 
   1349 #define NV30_3D_LIGHT_UNK24(i0)				       (0x00001024 + 0x40*(i0))
   1350 
   1351 #define NV30_3D_LIGHT_HALF_VECTOR(i0)			       (0x00001028 + 0x40*(i0))
   1352 
   1353 
   1354 #define NV30_3D_LIGHT_HALF_VECTOR_X(i0)			       (0x00001028 + 0x40*(i0))
   1355 
   1356 #define NV30_3D_LIGHT_HALF_VECTOR_Y(i0)			       (0x0000102c + 0x40*(i0))
   1357 
   1358 #define NV30_3D_LIGHT_HALF_VECTOR_Z(i0)			       (0x00001030 + 0x40*(i0))
   1359 
   1360 #define NV30_3D_LIGHT_DIRECTION(i0)			       (0x00001034 + 0x40*(i0))
   1361 
   1362 
   1363 #define NV30_3D_LIGHT_DIRECTION_X(i0)			       (0x00001034 + 0x40*(i0))
   1364 
   1365 #define NV30_3D_LIGHT_DIRECTION_Y(i0)			       (0x00001038 + 0x40*(i0))
   1366 
   1367 #define NV30_3D_LIGHT_DIRECTION_Z(i0)			       (0x0000103c + 0x40*(i0))
   1368 
   1369 
   1370 #define NV30_3D_LIGHT_SPOT_CUTOFF_A(i0)			       (0x00001200 + 0x40*(i0))
   1371 
   1372 #define NV30_3D_LIGHT_SPOT_CUTOFF_B(i0)			       (0x00001204 + 0x40*(i0))
   1373 
   1374 #define NV30_3D_LIGHT_SPOT_CUTOFF_C(i0)			       (0x00001208 + 0x40*(i0))
   1375 
   1376 #define NV30_3D_LIGHT_SPOT_DIR(i0)			       (0x0000120c + 0x40*(i0))
   1377 
   1378 
   1379 #define NV30_3D_LIGHT_SPOT_DIR_X(i0)			       (0x0000120c + 0x40*(i0))
   1380 
   1381 #define NV30_3D_LIGHT_SPOT_DIR_Y(i0)			       (0x00001210 + 0x40*(i0))
   1382 
   1383 #define NV30_3D_LIGHT_SPOT_DIR_Z(i0)			       (0x00001214 + 0x40*(i0))
   1384 
   1385 #define NV30_3D_LIGHT_SPOT_CUTOFF_D(i0)			       (0x00001218 + 0x40*(i0))
   1386 
   1387 #define NV30_3D_LIGHT_POSITION(i0)			       (0x0000121c + 0x40*(i0))
   1388 
   1389 
   1390 #define NV30_3D_LIGHT_POSITION_X(i0)			       (0x0000121c + 0x40*(i0))
   1391 
   1392 #define NV30_3D_LIGHT_POSITION_Y(i0)			       (0x00001220 + 0x40*(i0))
   1393 
   1394 #define NV30_3D_LIGHT_POSITION_Z(i0)			       (0x00001224 + 0x40*(i0))
   1395 
   1396 #define NV30_3D_LIGHT_ATTENUATION(i0)			       (0x00001228 + 0x40*(i0))
   1397 
   1398 #define NV30_3D_LIGHT_ATTENUATION_CONSTANT(i0)		       (0x00001228 + 0x40*(i0))
   1399 
   1400 #define NV30_3D_LIGHT_ATTENUATION_LINEAR(i0)		       (0x0000122c + 0x40*(i0))
   1401 
   1402 #define NV30_3D_LIGHT_ATTENUATION_QUADRATIC(i0)		       (0x00001230 + 0x40*(i0))
   1403 
   1404 #define NV30_3D_FRONT_MATERIAL_SHININESS(i0)		       (0x00001400 + 0x4*(i0))
   1405 #define NV30_3D_FRONT_MATERIAL_SHININESS__ESIZE			0x00000004
   1406 #define NV30_3D_FRONT_MATERIAL_SHININESS__LEN			0x00000006
   1407 
   1408 #define NV30_3D_ENABLED_LIGHTS					0x00001420
   1409 
   1410 #define NV30_3D_VERTEX_TWO_SIDE_ENABLE				0x0000142c
   1411 
   1412 #define NV30_3D_FP_REG_CONTROL					0x00001450
   1413 #define NV30_3D_FP_REG_CONTROL_UNK0__MASK			0x0000ffff
   1414 #define NV30_3D_FP_REG_CONTROL_UNK0__SHIFT			0
   1415 #define NV30_3D_FP_REG_CONTROL_UNK1__MASK			0xffff0000
   1416 #define NV30_3D_FP_REG_CONTROL_UNK1__SHIFT			16
   1417 
   1418 #define NV30_3D_FLATSHADE_FIRST					0x00001454
   1419 
   1420 #define NV30_3D_EDGEFLAG					0x0000145c
   1421 #define NV30_3D_EDGEFLAG_ENABLE					0x00000001
   1422 
   1423 #define NV30_3D_VP_CLIP_PLANES_ENABLE				0x00001478
   1424 #define NV30_3D_VP_CLIP_PLANES_ENABLE_PLANE0			0x00000002
   1425 #define NV30_3D_VP_CLIP_PLANES_ENABLE_PLANE1			0x00000020
   1426 #define NV30_3D_VP_CLIP_PLANES_ENABLE_PLANE2			0x00000200
   1427 #define NV30_3D_VP_CLIP_PLANES_ENABLE_PLANE3			0x00002000
   1428 #define NV30_3D_VP_CLIP_PLANES_ENABLE_PLANE4			0x00020000
   1429 #define NV30_3D_VP_CLIP_PLANES_ENABLE_PLANE5			0x00200000
   1430 
   1431 #define NV30_3D_POLYGON_STIPPLE_ENABLE				0x0000147c
   1432 
   1433 #define NV30_3D_POLYGON_STIPPLE_PATTERN(i0)		       (0x00001480 + 0x4*(i0))
   1434 #define NV30_3D_POLYGON_STIPPLE_PATTERN__ESIZE			0x00000004
   1435 #define NV30_3D_POLYGON_STIPPLE_PATTERN__LEN			0x00000020
   1436 
   1437 #define NV30_3D_VTX_ATTR_3F(i0)				       (0x00001500 + 0x10*(i0))
   1438 #define NV30_3D_VTX_ATTR_3F__ESIZE				0x00000010
   1439 #define NV30_3D_VTX_ATTR_3F__LEN				0x00000010
   1440 
   1441 
   1442 #define NV30_3D_VTX_ATTR_3F_X(i0)			       (0x00001500 + 0x10*(i0))
   1443 
   1444 #define NV30_3D_VTX_ATTR_3F_Y(i0)			       (0x00001504 + 0x10*(i0))
   1445 
   1446 #define NV30_3D_VTX_ATTR_3F_Z(i0)			       (0x00001508 + 0x10*(i0))
   1447 
   1448 
   1449 #define NV30_3D_VP_CLIP_PLANE(i0, i1)			       (0x00001600 + 0x10*(i0) + 0x4*(i1))
   1450 #define NV30_3D_VP_CLIP_PLANE__ESIZE				0x00000004
   1451 #define NV30_3D_VP_CLIP_PLANE__LEN				0x00000004
   1452 
   1453 #define NV30_3D_VTXBUF(i0)				       (0x00001680 + 0x4*(i0))
   1454 #define NV30_3D_VTXBUF__ESIZE					0x00000004
   1455 #define NV30_3D_VTXBUF__LEN					0x00000010
   1456 #define NV30_3D_VTXBUF_OFFSET__MASK				0x0fffffff
   1457 #define NV30_3D_VTXBUF_OFFSET__SHIFT				0
   1458 #define NV30_3D_VTXBUF_DMA1					0x80000000
   1459 
   1460 #define NV40_3D_VTX_CACHE_INVALIDATE				0x00001714
   1461 
   1462 #define NV40_3D_VB_ELEMENT_BASE					0x0000173c
   1463 
   1464 #define NV30_3D_VTXFMT(i0)				       (0x00001740 + 0x4*(i0))
   1465 #define NV30_3D_VTXFMT__ESIZE					0x00000004
   1466 #define NV30_3D_VTXFMT__LEN					0x00000010
   1467 #define NV30_3D_VTXFMT_TYPE__MASK				0x0000000f
   1468 #define NV30_3D_VTXFMT_TYPE__SHIFT				0
   1469 #define NV30_3D_VTXFMT_TYPE_B8G8R8A8_UNORM			0x00000000
   1470 #define NV30_3D_VTXFMT_TYPE_V16_SNORM				0x00000001
   1471 #define NV30_3D_VTXFMT_TYPE_V32_FLOAT				0x00000002
   1472 #define NV30_3D_VTXFMT_TYPE_V16_FLOAT				0x00000003
   1473 #define NV30_3D_VTXFMT_TYPE_U8_UNORM				0x00000004
   1474 #define NV30_3D_VTXFMT_TYPE_V16_SSCALED				0x00000005
   1475 #define NV30_3D_VTXFMT_TYPE_U8_USCALED				0x00000007
   1476 #define NV30_3D_VTXFMT_SIZE__MASK				0x000000f0
   1477 #define NV30_3D_VTXFMT_SIZE__SHIFT				4
   1478 #define NV30_3D_VTXFMT_STRIDE__MASK				0x0000ff00
   1479 #define NV30_3D_VTXFMT_STRIDE__SHIFT				8
   1480 
   1481 #define NV30_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION	0x000017a0
   1482 
   1483 
   1484 #define NV30_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_R	0x000017a0
   1485 
   1486 #define NV30_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_G	0x000017a4
   1487 
   1488 #define NV30_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_B	0x000017a8
   1489 
   1490 #define NV30_3D_COLOR_MATERIAL_BACK				0x000017b0
   1491 
   1492 
   1493 #define NV30_3D_COLOR_MATERIAL_BACK_R				0x000017b0
   1494 
   1495 #define NV30_3D_COLOR_MATERIAL_BACK_G				0x000017b4
   1496 
   1497 #define NV30_3D_COLOR_MATERIAL_BACK_B				0x000017b8
   1498 
   1499 #define NV30_3D_COLOR_MATERIAL_BACK_A				0x000017bc
   1500 
   1501 #define NV30_3D_QUERY_RESET					0x000017c8
   1502 
   1503 #define NV30_3D_QUERY_ENABLE					0x000017cc
   1504 
   1505 #define NV30_3D_QUERY_GET					0x00001800
   1506 #define NV30_3D_QUERY_GET_OFFSET__MASK				0x00ffffff
   1507 #define NV30_3D_QUERY_GET_OFFSET__SHIFT				0
   1508 #define NV30_3D_QUERY_GET_UNK24__MASK				0xff000000
   1509 #define NV30_3D_QUERY_GET_UNK24__SHIFT				24
   1510 
   1511 #define NV30_3D_VERTEX_BEGIN_END				0x00001808
   1512 #define NV30_3D_VERTEX_BEGIN_END_STOP				0x00000000
   1513 #define NV30_3D_VERTEX_BEGIN_END_POINTS				0x00000001
   1514 #define NV30_3D_VERTEX_BEGIN_END_LINES				0x00000002
   1515 #define NV30_3D_VERTEX_BEGIN_END_LINE_LOOP			0x00000003
   1516 #define NV30_3D_VERTEX_BEGIN_END_LINE_STRIP			0x00000004
   1517 #define NV30_3D_VERTEX_BEGIN_END_TRIANGLES			0x00000005
   1518 #define NV30_3D_VERTEX_BEGIN_END_TRIANGLE_STRIP			0x00000006
   1519 #define NV30_3D_VERTEX_BEGIN_END_TRIANGLE_FAN			0x00000007
   1520 #define NV30_3D_VERTEX_BEGIN_END_QUADS				0x00000008
   1521 #define NV30_3D_VERTEX_BEGIN_END_QUAD_STRIP			0x00000009
   1522 #define NV30_3D_VERTEX_BEGIN_END_POLYGON			0x0000000a
   1523 
   1524 #define NV30_3D_VB_ELEMENT_U16					0x0000180c
   1525 #define NV30_3D_VB_ELEMENT_U16_0__MASK				0x0000ffff
   1526 #define NV30_3D_VB_ELEMENT_U16_0__SHIFT				0
   1527 #define NV30_3D_VB_ELEMENT_U16_1__MASK				0xffff0000
   1528 #define NV30_3D_VB_ELEMENT_U16_1__SHIFT				16
   1529 
   1530 #define NV30_3D_VB_ELEMENT_U32					0x00001810
   1531 
   1532 #define NV30_3D_VB_VERTEX_BATCH					0x00001814
   1533 #define NV30_3D_VB_VERTEX_BATCH_OFFSET__MASK			0x00ffffff
   1534 #define NV30_3D_VB_VERTEX_BATCH_OFFSET__SHIFT			0
   1535 #define NV30_3D_VB_VERTEX_BATCH_COUNT__MASK			0xff000000
   1536 #define NV30_3D_VB_VERTEX_BATCH_COUNT__SHIFT			24
   1537 
   1538 #define NV30_3D_VERTEX_DATA					0x00001818
   1539 
   1540 #define NV30_3D_IDXBUF_OFFSET					0x0000181c
   1541 
   1542 #define NV30_3D_IDXBUF_FORMAT					0x00001820
   1543 #define NV30_3D_IDXBUF_FORMAT_DMA1				0x00000001
   1544 #define NV30_3D_IDXBUF_FORMAT_TYPE__MASK			0x000000f0
   1545 #define NV30_3D_IDXBUF_FORMAT_TYPE__SHIFT			4
   1546 #define NV30_3D_IDXBUF_FORMAT_TYPE_U32				0x00000000
   1547 #define NV30_3D_IDXBUF_FORMAT_TYPE_U16				0x00000010
   1548 
   1549 #define NV30_3D_VB_INDEX_BATCH					0x00001824
   1550 #define NV30_3D_VB_INDEX_BATCH_START__MASK			0x00ffffff
   1551 #define NV30_3D_VB_INDEX_BATCH_START__SHIFT			0
   1552 #define NV30_3D_VB_INDEX_BATCH_COUNT__MASK			0xff000000
   1553 #define NV30_3D_VB_INDEX_BATCH_COUNT__SHIFT			24
   1554 
   1555 #define NV30_3D_POLYGON_MODE_FRONT				0x00001828
   1556 #define NV30_3D_POLYGON_MODE_FRONT_POINT			0x00001b00
   1557 #define NV30_3D_POLYGON_MODE_FRONT_LINE				0x00001b01
   1558 #define NV30_3D_POLYGON_MODE_FRONT_FILL				0x00001b02
   1559 
   1560 #define NV30_3D_POLYGON_MODE_BACK				0x0000182c
   1561 #define NV30_3D_POLYGON_MODE_BACK_POINT				0x00001b00
   1562 #define NV30_3D_POLYGON_MODE_BACK_LINE				0x00001b01
   1563 #define NV30_3D_POLYGON_MODE_BACK_FILL				0x00001b02
   1564 
   1565 #define NV30_3D_CULL_FACE					0x00001830
   1566 #define NV30_3D_CULL_FACE_FRONT					0x00000404
   1567 #define NV30_3D_CULL_FACE_BACK					0x00000405
   1568 #define NV30_3D_CULL_FACE_FRONT_AND_BACK			0x00000408
   1569 
   1570 #define NV30_3D_FRONT_FACE					0x00001834
   1571 #define NV30_3D_FRONT_FACE_CW					0x00000900
   1572 #define NV30_3D_FRONT_FACE_CCW					0x00000901
   1573 
   1574 #define NV30_3D_POLYGON_SMOOTH_ENABLE				0x00001838
   1575 
   1576 #define NV30_3D_CULL_FACE_ENABLE				0x0000183c
   1577 
   1578 #define NV30_3D_TEX_PALETTE_OFFSET(i0)			       (0x00001840 + 0x4*(i0))
   1579 #define NV30_3D_TEX_PALETTE_OFFSET__ESIZE			0x00000004
   1580 #define NV30_3D_TEX_PALETTE_OFFSET__LEN				0x00000008
   1581 
   1582 #define NV40_3D_TEX_SIZE1(i0)				       (0x00001840 + 0x4*(i0))
   1583 #define NV40_3D_TEX_SIZE1__ESIZE				0x00000004
   1584 #define NV40_3D_TEX_SIZE1__LEN					0x00000008
   1585 #define NV40_3D_TEX_SIZE1_DEPTH__MASK				0xfff00000
   1586 #define NV40_3D_TEX_SIZE1_DEPTH__SHIFT				20
   1587 #define NV40_3D_TEX_SIZE1_PITCH__MASK				0x0000ffff
   1588 #define NV40_3D_TEX_SIZE1_PITCH__SHIFT				0
   1589 
   1590 #define NV30_3D_VTX_ATTR_2F(i0)				       (0x00001880 + 0x8*(i0))
   1591 #define NV30_3D_VTX_ATTR_2F__ESIZE				0x00000008
   1592 #define NV30_3D_VTX_ATTR_2F__LEN				0x00000010
   1593 
   1594 
   1595 #define NV30_3D_VTX_ATTR_2F_X(i0)			       (0x00001880 + 0x8*(i0))
   1596 
   1597 #define NV30_3D_VTX_ATTR_2F_Y(i0)			       (0x00001884 + 0x8*(i0))
   1598 
   1599 #define NV30_3D_VTX_ATTR_2I(i0)				       (0x00001900 + 0x4*(i0))
   1600 #define NV30_3D_VTX_ATTR_2I__ESIZE				0x00000004
   1601 #define NV30_3D_VTX_ATTR_2I__LEN				0x00000010
   1602 #define NV30_3D_VTX_ATTR_2I_X__MASK				0x0000ffff
   1603 #define NV30_3D_VTX_ATTR_2I_X__SHIFT				0
   1604 #define NV30_3D_VTX_ATTR_2I_Y__MASK				0xffff0000
   1605 #define NV30_3D_VTX_ATTR_2I_Y__SHIFT				16
   1606 
   1607 #define NV30_3D_VTX_ATTR_4UB(i0)			       (0x00001940 + 0x4*(i0))
   1608 #define NV30_3D_VTX_ATTR_4UB__ESIZE				0x00000004
   1609 #define NV30_3D_VTX_ATTR_4UB__LEN				0x00000010
   1610 #define NV30_3D_VTX_ATTR_4UB_X__MASK				0x000000ff
   1611 #define NV30_3D_VTX_ATTR_4UB_X__SHIFT				0
   1612 #define NV30_3D_VTX_ATTR_4UB_Y__MASK				0x0000ff00
   1613 #define NV30_3D_VTX_ATTR_4UB_Y__SHIFT				8
   1614 #define NV30_3D_VTX_ATTR_4UB_Z__MASK				0x00ff0000
   1615 #define NV30_3D_VTX_ATTR_4UB_Z__SHIFT				16
   1616 #define NV30_3D_VTX_ATTR_4UB_W__MASK				0xff000000
   1617 #define NV30_3D_VTX_ATTR_4UB_W__SHIFT				24
   1618 
   1619 #define NV30_3D_VTX_ATTR_4I(i0)				       (0x00001980 + 0x8*(i0))
   1620 #define NV30_3D_VTX_ATTR_4I__ESIZE				0x00000008
   1621 #define NV30_3D_VTX_ATTR_4I__LEN				0x00000010
   1622 
   1623 #define NV30_3D_VTX_ATTR_4I_XY(i0)			       (0x00001980 + 0x8*(i0))
   1624 #define NV30_3D_VTX_ATTR_4I_XY_X__MASK				0x0000ffff
   1625 #define NV30_3D_VTX_ATTR_4I_XY_X__SHIFT				0
   1626 #define NV30_3D_VTX_ATTR_4I_XY_Y__MASK				0xffff0000
   1627 #define NV30_3D_VTX_ATTR_4I_XY_Y__SHIFT				16
   1628 
   1629 #define NV30_3D_VTX_ATTR_4I_ZW(i0)			       (0x00001984 + 0x8*(i0))
   1630 #define NV30_3D_VTX_ATTR_4I_ZW_Z__MASK				0x0000ffff
   1631 #define NV30_3D_VTX_ATTR_4I_ZW_Z__SHIFT				0
   1632 #define NV30_3D_VTX_ATTR_4I_ZW_W__MASK				0xffff0000
   1633 #define NV30_3D_VTX_ATTR_4I_ZW_W__SHIFT				16
   1634 
   1635 #define NV30_3D_TEX_OFFSET(i0)				       (0x00001a00 + 0x20*(i0))
   1636 #define NV30_3D_TEX_OFFSET__ESIZE				0x00000020
   1637 #define NV30_3D_TEX_OFFSET__LEN					0x00000008
   1638 
   1639 #define NV30_3D_TEX_FORMAT(i0)				       (0x00001a04 + 0x20*(i0))
   1640 #define NV30_3D_TEX_FORMAT__ESIZE				0x00000020
   1641 #define NV30_3D_TEX_FORMAT__LEN					0x00000008
   1642 #define NV30_3D_TEX_FORMAT_DMA0					0x00000001
   1643 #define NV30_3D_TEX_FORMAT_DMA1					0x00000002
   1644 #define NV30_3D_TEX_FORMAT_CUBIC				0x00000004
   1645 #define NV30_3D_TEX_FORMAT_NO_BORDER				0x00000008
   1646 #define NV30_3D_TEX_FORMAT_DIMS__MASK				0x000000f0
   1647 #define NV30_3D_TEX_FORMAT_DIMS__SHIFT				4
   1648 #define NV30_3D_TEX_FORMAT_DIMS_1D				0x00000010
   1649 #define NV30_3D_TEX_FORMAT_DIMS_2D				0x00000020
   1650 #define NV30_3D_TEX_FORMAT_DIMS_3D				0x00000030
   1651 #define NV30_3D_TEX_FORMAT_FORMAT__MASK				0x0000ff00
   1652 #define NV30_3D_TEX_FORMAT_FORMAT__SHIFT			8
   1653 #define NV30_3D_TEX_FORMAT_FORMAT_L8				0x00000000
   1654 #define NV30_3D_TEX_FORMAT_FORMAT_I8				0x00000100
   1655 #define NV30_3D_TEX_FORMAT_FORMAT_A1R5G5B5			0x00000200
   1656 #define NV30_3D_TEX_FORMAT_FORMAT_A4R4G4B4			0x00000400
   1657 #define NV30_3D_TEX_FORMAT_FORMAT_R5G6B5			0x00000500
   1658 #define NV30_3D_TEX_FORMAT_FORMAT_A8R8G8B8			0x00000600
   1659 #define NV30_3D_TEX_FORMAT_FORMAT_X8R8G8B8			0x00000700
   1660 #define NV30_3D_TEX_FORMAT_FORMAT_INDEX8			0x00000b00
   1661 #define NV30_3D_TEX_FORMAT_FORMAT_DXT1				0x00000c00
   1662 #define NV30_3D_TEX_FORMAT_FORMAT_DXT3				0x00000e00
   1663 #define NV30_3D_TEX_FORMAT_FORMAT_DXT5				0x00000f00
   1664 #define NV30_3D_TEX_FORMAT_FORMAT_A1R5G5B5_RECT			0x00001000
   1665 #define NV30_3D_TEX_FORMAT_FORMAT_R5G6B5_RECT			0x00001100
   1666 #define NV30_3D_TEX_FORMAT_FORMAT_A8R8G8B8_RECT			0x00001200
   1667 #define NV30_3D_TEX_FORMAT_FORMAT_L8_RECT			0x00001300
   1668 #define NV30_3D_TEX_FORMAT_FORMAT_DSDT8_RECT			0x00001700
   1669 #define NV30_3D_TEX_FORMAT_FORMAT_A8L8				0x00001a00
   1670 #define NV30_3D_TEX_FORMAT_FORMAT_I8_RECT			0x00001b00
   1671 #define NV30_3D_TEX_FORMAT_FORMAT_A4R4G4B4_RECT			0x00001d00
   1672 #define NV30_3D_TEX_FORMAT_FORMAT_R8G8B8_RECT			0x00001e00
   1673 #define NV30_3D_TEX_FORMAT_FORMAT_A8L8_RECT			0x00002000
   1674 #define NV30_3D_TEX_FORMAT_FORMAT_Z24				0x00002a00
   1675 #define NV30_3D_TEX_FORMAT_FORMAT_Z24_RECT			0x00002b00
   1676 #define NV30_3D_TEX_FORMAT_FORMAT_Z16				0x00002c00
   1677 #define NV30_3D_TEX_FORMAT_FORMAT_Z16_RECT			0x00002d00
   1678 #define NV30_3D_TEX_FORMAT_FORMAT_DSDT8				0x00002800
   1679 #define NV30_3D_TEX_FORMAT_FORMAT_HILO16			0x00003300
   1680 #define NV30_3D_TEX_FORMAT_FORMAT_HILO16_RECT			0x00003600
   1681 #define NV30_3D_TEX_FORMAT_FORMAT_HILO8				0x00004400
   1682 #define NV30_3D_TEX_FORMAT_FORMAT_SIGNED_HILO8			0x00004500
   1683 #define NV30_3D_TEX_FORMAT_FORMAT_HILO8_RECT			0x00004600
   1684 #define NV30_3D_TEX_FORMAT_FORMAT_SIGNED_HILO8_RECT		0x00004700
   1685 #define NV30_3D_TEX_FORMAT_FORMAT_A16				0x00003200
   1686 #define NV30_3D_TEX_FORMAT_FORMAT_A16_RECT			0x00003500
   1687 #define NV30_3D_TEX_FORMAT_FORMAT_UNK3F				0x00003f00
   1688 #define NV30_3D_TEX_FORMAT_FORMAT_FLOAT_RGBA16_NV		0x00004a00
   1689 #define NV30_3D_TEX_FORMAT_FORMAT_FLOAT_RGBA32_NV		0x00004b00
   1690 #define NV30_3D_TEX_FORMAT_FORMAT_FLOAT_R32_NV			0x00004c00
   1691 #define NV40_3D_TEX_FORMAT_FORMAT__MASK				0x00001f00
   1692 #define NV40_3D_TEX_FORMAT_FORMAT__SHIFT			8
   1693 #define NV40_3D_TEX_FORMAT_FORMAT_L8				0x00000100
   1694 #define NV40_3D_TEX_FORMAT_FORMAT_A1R5G5B5			0x00000200
   1695 #define NV40_3D_TEX_FORMAT_FORMAT_A4R4G4B4			0x00000300
   1696 #define NV40_3D_TEX_FORMAT_FORMAT_R5G6B5			0x00000400
   1697 #define NV40_3D_TEX_FORMAT_FORMAT_A8R8G8B8			0x00000500
   1698 #define NV40_3D_TEX_FORMAT_FORMAT_DXT1				0x00000600
   1699 #define NV40_3D_TEX_FORMAT_FORMAT_DXT3				0x00000700
   1700 #define NV40_3D_TEX_FORMAT_FORMAT_DXT5				0x00000800
   1701 #define NV40_3D_TEX_FORMAT_FORMAT_A8L8				0x00000b00
   1702 #define NV40_3D_TEX_FORMAT_FORMAT_Z24				0x00001000
   1703 #define NV40_3D_TEX_FORMAT_FORMAT_Z16				0x00001200
   1704 #define NV40_3D_TEX_FORMAT_FORMAT_A16				0x00001400
   1705 #define NV40_3D_TEX_FORMAT_FORMAT_A16L16			0x00001500
   1706 #define NV40_3D_TEX_FORMAT_FORMAT_HILO8				0x00001800
   1707 #define NV40_3D_TEX_FORMAT_FORMAT_RGBA16F			0x00001a00
   1708 #define NV40_3D_TEX_FORMAT_FORMAT_RGBA32F			0x00001b00
   1709 #define NV40_3D_TEX_FORMAT_LINEAR				0x00002000
   1710 #define NV40_3D_TEX_FORMAT_RECT					0x00004000
   1711 #define NV40_3D_TEX_FORMAT_MIPMAP_COUNT__MASK			0x000f0000
   1712 #define NV40_3D_TEX_FORMAT_MIPMAP_COUNT__SHIFT			16
   1713 #define NV30_3D_TEX_FORMAT_MIPMAP				0x00080000
   1714 #define NV30_3D_TEX_FORMAT_BASE_SIZE_U__MASK			0x00f00000
   1715 #define NV30_3D_TEX_FORMAT_BASE_SIZE_U__SHIFT			20
   1716 #define NV30_3D_TEX_FORMAT_BASE_SIZE_V__MASK			0x0f000000
   1717 #define NV30_3D_TEX_FORMAT_BASE_SIZE_V__SHIFT			24
   1718 #define NV30_3D_TEX_FORMAT_BASE_SIZE_W__MASK			0xf0000000
   1719 #define NV30_3D_TEX_FORMAT_BASE_SIZE_W__SHIFT			28
   1720 
   1721 #define NV30_3D_TEX_WRAP(i0)				       (0x00001a08 + 0x20*(i0))
   1722 #define NV30_3D_TEX_WRAP__ESIZE					0x00000020
   1723 #define NV30_3D_TEX_WRAP__LEN					0x00000008
   1724 #define NV30_3D_TEX_WRAP_S__MASK				0x000000ff
   1725 #define NV30_3D_TEX_WRAP_S__SHIFT				0
   1726 #define NV30_3D_TEX_WRAP_S_REPEAT				0x00000001
   1727 #define NV30_3D_TEX_WRAP_S_MIRRORED_REPEAT			0x00000002
   1728 #define NV30_3D_TEX_WRAP_S_CLAMP_TO_EDGE			0x00000003
   1729 #define NV30_3D_TEX_WRAP_S_CLAMP_TO_BORDER			0x00000004
   1730 #define NV30_3D_TEX_WRAP_S_CLAMP				0x00000005
   1731 #define NV40_3D_TEX_WRAP_S_MIRROR_CLAMP_TO_EDGE			0x00000006
   1732 #define NV40_3D_TEX_WRAP_S_MIRROR_CLAMP_TO_BORDER		0x00000007
   1733 #define NV40_3D_TEX_WRAP_S_MIRROR_CLAMP				0x00000008
   1734 #define NV40_3D_TEX_WRAP_ANISO_MIP_FILTER_OPTIMIZATION__MASK	0x00000070
   1735 #define NV40_3D_TEX_WRAP_ANISO_MIP_FILTER_OPTIMIZATION__SHIFT	4
   1736 #define NV40_3D_TEX_WRAP_ANISO_MIP_FILTER_OPTIMIZATION_OFF	0x00000000
   1737 #define NV40_3D_TEX_WRAP_ANISO_MIP_FILTER_OPTIMIZATION_QUALITY	0x00000020
   1738 #define NV40_3D_TEX_WRAP_ANISO_MIP_FILTER_OPTIMIZATION_PERFORMANCE	0x00000030
   1739 #define NV40_3D_TEX_WRAP_ANISO_MIP_FILTER_OPTIMIZATION_HIGH_PERFORMANCE	0x00000070
   1740 #define NV30_3D_TEX_WRAP_T__MASK				0x00000f00
   1741 #define NV30_3D_TEX_WRAP_T__SHIFT				8
   1742 #define NV30_3D_TEX_WRAP_T_REPEAT				0x00000100
   1743 #define NV30_3D_TEX_WRAP_T_MIRRORED_REPEAT			0x00000200
   1744 #define NV30_3D_TEX_WRAP_T_CLAMP_TO_EDGE			0x00000300
   1745 #define NV30_3D_TEX_WRAP_T_CLAMP_TO_BORDER			0x00000400
   1746 #define NV30_3D_TEX_WRAP_T_CLAMP				0x00000500
   1747 #define NV40_3D_TEX_WRAP_T_MIRROR_CLAMP_TO_EDGE			0x00000600
   1748 #define NV40_3D_TEX_WRAP_T_MIRROR_CLAMP_TO_BORDER		0x00000700
   1749 #define NV40_3D_TEX_WRAP_T_MIRROR_CLAMP				0x00000800
   1750 #define NV30_3D_TEX_WRAP_EXPAND_NORMAL				0x0000f000
   1751 #define NV30_3D_TEX_WRAP_R__MASK				0x000f0000
   1752 #define NV30_3D_TEX_WRAP_R__SHIFT				16
   1753 #define NV30_3D_TEX_WRAP_R_REPEAT				0x00010000
   1754 #define NV30_3D_TEX_WRAP_R_MIRRORED_REPEAT			0x00020000
   1755 #define NV30_3D_TEX_WRAP_R_CLAMP_TO_EDGE			0x00030000
   1756 #define NV30_3D_TEX_WRAP_R_CLAMP_TO_BORDER			0x00040000
   1757 #define NV30_3D_TEX_WRAP_R_CLAMP				0x00050000
   1758 #define NV40_3D_TEX_WRAP_R_MIRROR_CLAMP_TO_EDGE			0x00060000
   1759 #define NV40_3D_TEX_WRAP_R_MIRROR_CLAMP_TO_BORDER		0x00070000
   1760 #define NV40_3D_TEX_WRAP_R_MIRROR_CLAMP				0x00080000
   1761 #define NV40_3D_TEX_WRAP_GAMMA_DECREASE_FILTER__MASK		0x00f00000
   1762 #define NV40_3D_TEX_WRAP_GAMMA_DECREASE_FILTER__SHIFT		20
   1763 #define NV40_3D_TEX_WRAP_GAMMA_DECREASE_FILTER_NONE		0x00000000
   1764 #define NV40_3D_TEX_WRAP_GAMMA_DECREASE_FILTER_RED		0x00100000
   1765 #define NV40_3D_TEX_WRAP_GAMMA_DECREASE_FILTER_GREEN		0x00200000
   1766 #define NV40_3D_TEX_WRAP_GAMMA_DECREASE_FILTER_BLUE		0x00400000
   1767 #define NV40_3D_TEX_WRAP_GAMMA_DECREASE_FILTER_ALL		0x00f00000
   1768 #define NV30_3D_TEX_WRAP_RCOMP__MASK				0xf0000000
   1769 #define NV30_3D_TEX_WRAP_RCOMP__SHIFT				28
   1770 #define NV30_3D_TEX_WRAP_RCOMP_NEVER				0x00000000
   1771 #define NV30_3D_TEX_WRAP_RCOMP_GREATER				0x10000000
   1772 #define NV30_3D_TEX_WRAP_RCOMP_EQUAL				0x20000000
   1773 #define NV30_3D_TEX_WRAP_RCOMP_GEQUAL				0x30000000
   1774 #define NV30_3D_TEX_WRAP_RCOMP_LESS				0x40000000
   1775 #define NV30_3D_TEX_WRAP_RCOMP_NOTEQUAL				0x50000000
   1776 #define NV30_3D_TEX_WRAP_RCOMP_LEQUAL				0x60000000
   1777 #define NV30_3D_TEX_WRAP_RCOMP_ALWAYS				0x70000000
   1778 
   1779 #define NV30_3D_TEX_ENABLE(i0)				       (0x00001a0c + 0x20*(i0))
   1780 #define NV30_3D_TEX_ENABLE__ESIZE				0x00000020
   1781 #define NV30_3D_TEX_ENABLE__LEN					0x00000008
   1782 #define NV30_3D_TEX_ENABLE_ANISO__MASK				0x00000030
   1783 #define NV30_3D_TEX_ENABLE_ANISO__SHIFT				4
   1784 #define NV30_3D_TEX_ENABLE_ANISO_NONE				0x00000000
   1785 #define NV30_3D_TEX_ENABLE_ANISO_2X				0x00000010
   1786 #define NV30_3D_TEX_ENABLE_ANISO_4X				0x00000020
   1787 #define NV30_3D_TEX_ENABLE_ANISO_8X				0x00000030
   1788 #define NV40_3D_TEX_ENABLE_ANISO__MASK				0x000000f0
   1789 #define NV40_3D_TEX_ENABLE_ANISO__SHIFT				4
   1790 #define NV40_3D_TEX_ENABLE_ANISO_NONE				0x00000000
   1791 #define NV40_3D_TEX_ENABLE_ANISO_2X				0x00000010
   1792 #define NV40_3D_TEX_ENABLE_ANISO_4X				0x00000020
   1793 #define NV40_3D_TEX_ENABLE_ANISO_6X				0x00000030
   1794 #define NV40_3D_TEX_ENABLE_ANISO_8X				0x00000040
   1795 #define NV40_3D_TEX_ENABLE_ANISO_10X				0x00000050
   1796 #define NV40_3D_TEX_ENABLE_ANISO_12X				0x00000060
   1797 #define NV40_3D_TEX_ENABLE_ANISO_16X				0x00000070
   1798 #define NV30_3D_TEX_ENABLE_MIPMAP_MAX_LOD__MASK			0x0003c000
   1799 #define NV30_3D_TEX_ENABLE_MIPMAP_MAX_LOD__SHIFT		14
   1800 #define NV40_3D_TEX_ENABLE_MIPMAP_MAX_LOD__MASK			0x00038000
   1801 #define NV40_3D_TEX_ENABLE_MIPMAP_MAX_LOD__SHIFT		15
   1802 #define NV30_3D_TEX_ENABLE_MIPMAP_MIN_LOD__MASK			0x3c000000
   1803 #define NV30_3D_TEX_ENABLE_MIPMAP_MIN_LOD__SHIFT		26
   1804 #define NV40_3D_TEX_ENABLE_MIPMAP_MIN_LOD__MASK			0x38000000
   1805 #define NV40_3D_TEX_ENABLE_MIPMAP_MIN_LOD__SHIFT		27
   1806 #define NV30_3D_TEX_ENABLE_ENABLE				0x40000000
   1807 #define NV40_3D_TEX_ENABLE_ENABLE				0x80000000
   1808 
   1809 #define NV30_3D_TEX_SWIZZLE(i0)				       (0x00001a10 + 0x20*(i0))
   1810 #define NV30_3D_TEX_SWIZZLE__ESIZE				0x00000020
   1811 #define NV30_3D_TEX_SWIZZLE__LEN				0x00000008
   1812 #define NV30_3D_TEX_SWIZZLE_S1_W__MASK				0x00000003
   1813 #define NV30_3D_TEX_SWIZZLE_S1_W__SHIFT				0
   1814 #define NV30_3D_TEX_SWIZZLE_S1_W_W				0x00000000
   1815 #define NV30_3D_TEX_SWIZZLE_S1_W_Z				0x00000001
   1816 #define NV30_3D_TEX_SWIZZLE_S1_W_Y				0x00000002
   1817 #define NV30_3D_TEX_SWIZZLE_S1_W_X				0x00000003
   1818 #define NV30_3D_TEX_SWIZZLE_S1_Z__MASK				0x0000000c
   1819 #define NV30_3D_TEX_SWIZZLE_S1_Z__SHIFT				2
   1820 #define NV30_3D_TEX_SWIZZLE_S1_Z_W				0x00000000
   1821 #define NV30_3D_TEX_SWIZZLE_S1_Z_Z				0x00000004
   1822 #define NV30_3D_TEX_SWIZZLE_S1_Z_Y				0x00000008
   1823 #define NV30_3D_TEX_SWIZZLE_S1_Z_X				0x0000000c
   1824 #define NV30_3D_TEX_SWIZZLE_S1_Y__MASK				0x00000030
   1825 #define NV30_3D_TEX_SWIZZLE_S1_Y__SHIFT				4
   1826 #define NV30_3D_TEX_SWIZZLE_S1_Y_W				0x00000000
   1827 #define NV30_3D_TEX_SWIZZLE_S1_Y_Z				0x00000010
   1828 #define NV30_3D_TEX_SWIZZLE_S1_Y_Y				0x00000020
   1829 #define NV30_3D_TEX_SWIZZLE_S1_Y_X				0x00000030
   1830 #define NV30_3D_TEX_SWIZZLE_S1_X__MASK				0x000000c0
   1831 #define NV30_3D_TEX_SWIZZLE_S1_X__SHIFT				6
   1832 #define NV30_3D_TEX_SWIZZLE_S1_X_W				0x00000000
   1833 #define NV30_3D_TEX_SWIZZLE_S1_X_Z				0x00000040
   1834 #define NV30_3D_TEX_SWIZZLE_S1_X_Y				0x00000080
   1835 #define NV30_3D_TEX_SWIZZLE_S1_X_X				0x000000c0
   1836 #define NV30_3D_TEX_SWIZZLE_S0_W__MASK				0x00000300
   1837 #define NV30_3D_TEX_SWIZZLE_S0_W__SHIFT				8
   1838 #define NV30_3D_TEX_SWIZZLE_S0_W_ZERO				0x00000000
   1839 #define NV30_3D_TEX_SWIZZLE_S0_W_ONE				0x00000100
   1840 #define NV30_3D_TEX_SWIZZLE_S0_W_S1				0x00000200
   1841 #define NV30_3D_TEX_SWIZZLE_S0_Z__MASK				0x00000c00
   1842 #define NV30_3D_TEX_SWIZZLE_S0_Z__SHIFT				10
   1843 #define NV30_3D_TEX_SWIZZLE_S0_Z_ZERO				0x00000000
   1844 #define NV30_3D_TEX_SWIZZLE_S0_Z_ONE				0x00000400
   1845 #define NV30_3D_TEX_SWIZZLE_S0_Z_S1				0x00000800
   1846 #define NV30_3D_TEX_SWIZZLE_S0_Y__MASK				0x00003000
   1847 #define NV30_3D_TEX_SWIZZLE_S0_Y__SHIFT				12
   1848 #define NV30_3D_TEX_SWIZZLE_S0_Y_ZERO				0x00000000
   1849 #define NV30_3D_TEX_SWIZZLE_S0_Y_ONE				0x00001000
   1850 #define NV30_3D_TEX_SWIZZLE_S0_Y_S1				0x00002000
   1851 #define NV30_3D_TEX_SWIZZLE_S0_X__MASK				0x0000c000
   1852 #define NV30_3D_TEX_SWIZZLE_S0_X__SHIFT				14
   1853 #define NV30_3D_TEX_SWIZZLE_S0_X_ZERO				0x00000000
   1854 #define NV30_3D_TEX_SWIZZLE_S0_X_ONE				0x00004000
   1855 #define NV30_3D_TEX_SWIZZLE_S0_X_S1				0x00008000
   1856 #define NV30_3D_TEX_SWIZZLE_RECT_PITCH__MASK			0xffff0000
   1857 #define NV30_3D_TEX_SWIZZLE_RECT_PITCH__SHIFT			16
   1858 
   1859 #define NV30_3D_TEX_FILTER(i0)				       (0x00001a14 + 0x20*(i0))
   1860 #define NV30_3D_TEX_FILTER__ESIZE				0x00000020
   1861 #define NV30_3D_TEX_FILTER__LEN					0x00000008
   1862 #define NV30_3D_TEX_FILTER_LOD_BIAS__MASK			0x00000f00
   1863 #define NV30_3D_TEX_FILTER_LOD_BIAS__SHIFT			8
   1864 #define NV30_3D_TEX_FILTER_MIN__MASK				0x000f0000
   1865 #define NV30_3D_TEX_FILTER_MIN__SHIFT				16
   1866 #define NV30_3D_TEX_FILTER_MIN_NEAREST				0x00010000
   1867 #define NV30_3D_TEX_FILTER_MIN_LINEAR				0x00020000
   1868 #define NV30_3D_TEX_FILTER_MIN_NEAREST_MIPMAP_NEAREST		0x00030000
   1869 #define NV30_3D_TEX_FILTER_MIN_LINEAR_MIPMAP_NEAREST		0x00040000
   1870 #define NV30_3D_TEX_FILTER_MIN_NEAREST_MIPMAP_LINEAR		0x00050000
   1871 #define NV30_3D_TEX_FILTER_MIN_LINEAR_MIPMAP_LINEAR		0x00060000
   1872 #define NV30_3D_TEX_FILTER_MAG__MASK				0x0f000000
   1873 #define NV30_3D_TEX_FILTER_MAG__SHIFT				24
   1874 #define NV30_3D_TEX_FILTER_MAG_NEAREST				0x01000000
   1875 #define NV30_3D_TEX_FILTER_MAG_LINEAR				0x02000000
   1876 #define NV30_3D_TEX_FILTER_SIGNED_BLUE				0x10000000
   1877 #define NV30_3D_TEX_FILTER_SIGNED_GREEN				0x20000000
   1878 #define NV30_3D_TEX_FILTER_SIGNED_RED				0x40000000
   1879 #define NV30_3D_TEX_FILTER_SIGNED_ALPHA				0x80000000
   1880 
   1881 #define NV30_3D_TEX_NPOT_SIZE(i0)			       (0x00001a18 + 0x20*(i0))
   1882 #define NV30_3D_TEX_NPOT_SIZE__ESIZE				0x00000020
   1883 #define NV30_3D_TEX_NPOT_SIZE__LEN				0x00000008
   1884 #define NV30_3D_TEX_NPOT_SIZE_H__MASK				0x0000ffff
   1885 #define NV30_3D_TEX_NPOT_SIZE_H__SHIFT				0
   1886 #define NV30_3D_TEX_NPOT_SIZE_W__MASK				0xffff0000
   1887 #define NV30_3D_TEX_NPOT_SIZE_W__SHIFT				16
   1888 
   1889 #define NV30_3D_TEX_BORDER_COLOR(i0)			       (0x00001a1c + 0x20*(i0))
   1890 #define NV30_3D_TEX_BORDER_COLOR__ESIZE				0x00000020
   1891 #define NV30_3D_TEX_BORDER_COLOR__LEN				0x00000008
   1892 #define NV30_3D_TEX_BORDER_COLOR_B__MASK			0x000000ff
   1893 #define NV30_3D_TEX_BORDER_COLOR_B__SHIFT			0
   1894 #define NV30_3D_TEX_BORDER_COLOR_G__MASK			0x0000ff00
   1895 #define NV30_3D_TEX_BORDER_COLOR_G__SHIFT			8
   1896 #define NV30_3D_TEX_BORDER_COLOR_R__MASK			0x00ff0000
   1897 #define NV30_3D_TEX_BORDER_COLOR_R__SHIFT			16
   1898 #define NV30_3D_TEX_BORDER_COLOR_A__MASK			0xff000000
   1899 #define NV30_3D_TEX_BORDER_COLOR_A__SHIFT			24
   1900 
   1901 #define NV30_3D_VTX_ATTR_4F(i0)				       (0x00001c00 + 0x10*(i0))
   1902 #define NV30_3D_VTX_ATTR_4F__ESIZE				0x00000010
   1903 #define NV30_3D_VTX_ATTR_4F__LEN				0x00000010
   1904 
   1905 
   1906 #define NV30_3D_VTX_ATTR_4F_X(i0)			       (0x00001c00 + 0x10*(i0))
   1907 
   1908 #define NV30_3D_VTX_ATTR_4F_Y(i0)			       (0x00001c04 + 0x10*(i0))
   1909 
   1910 #define NV30_3D_VTX_ATTR_4F_Z(i0)			       (0x00001c08 + 0x10*(i0))
   1911 
   1912 #define NV30_3D_VTX_ATTR_4F_W(i0)			       (0x00001c0c + 0x10*(i0))
   1913 
   1914 #define NV30_3D_FP_CONTROL					0x00001d60
   1915 #define NV30_3D_FP_CONTROL_USED_REGS_MINUS1_DIV2__MASK		0x0000000f
   1916 #define NV30_3D_FP_CONTROL_USED_REGS_MINUS1_DIV2__SHIFT		0
   1917 #define NV30_3D_FP_CONTROL_USES_KIL				0x00000080
   1918 #define NV40_3D_FP_CONTROL_KIL					0x00000080
   1919 #define NV40_3D_FP_CONTROL_TEMP_COUNT__MASK			0xff000000
   1920 #define NV40_3D_FP_CONTROL_TEMP_COUNT__SHIFT			24
   1921 
   1922 #define NV30_3D_FENCE_OFFSET					0x00001d6c
   1923 
   1924 #define NV30_3D_FENCE_VALUE					0x00001d70
   1925 
   1926 #define NV30_3D_DEPTH_CONTROL					0x00001d78
   1927 #define NV30_3D_DEPTH_CONTROL_CLAMP				0x000000f0
   1928 
   1929 #define NV30_3D_MULTISAMPLE_CONTROL				0x00001d7c
   1930 #define NV30_3D_MULTISAMPLE_CONTROL_ENABLE			0x00000001
   1931 #define NV30_3D_MULTISAMPLE_CONTROL_SAMPLE_ALPHA_TO_COVERAGE	0x00000010
   1932 #define NV30_3D_MULTISAMPLE_CONTROL_SAMPLE_ALPHA_TO_ONE		0x00000100
   1933 #define NV30_3D_MULTISAMPLE_CONTROL_SAMPLE_COVERAGE__MASK	0xffff0000
   1934 #define NV30_3D_MULTISAMPLE_CONTROL_SAMPLE_COVERAGE__SHIFT	16
   1935 
   1936 #define NV30_3D_COORD_CONVENTIONS				0x00001d88
   1937 #define NV30_3D_COORD_CONVENTIONS_HEIGHT__MASK			0x00000fff
   1938 #define NV30_3D_COORD_CONVENTIONS_HEIGHT__SHIFT			0
   1939 #define NV30_3D_COORD_CONVENTIONS_ORIGIN__MASK			0x00001000
   1940 #define NV30_3D_COORD_CONVENTIONS_ORIGIN__SHIFT			12
   1941 #define NV30_3D_COORD_CONVENTIONS_ORIGIN_NORMAL			0x00000000
   1942 #define NV30_3D_COORD_CONVENTIONS_ORIGIN_INVERTED		0x00001000
   1943 #define NV30_3D_COORD_CONVENTIONS_CENTER__MASK			0x00010000
   1944 #define NV30_3D_COORD_CONVENTIONS_CENTER__SHIFT			16
   1945 #define NV30_3D_COORD_CONVENTIONS_CENTER_HALF_INTEGER		0x00000000
   1946 #define NV30_3D_COORD_CONVENTIONS_CENTER_INTEGER		0x00010000
   1947 
   1948 #define NV30_3D_CLEAR_DEPTH_VALUE				0x00001d8c
   1949 
   1950 #define NV30_3D_CLEAR_COLOR_VALUE				0x00001d90
   1951 #define NV30_3D_CLEAR_COLOR_VALUE_B__MASK			0x000000ff
   1952 #define NV30_3D_CLEAR_COLOR_VALUE_B__SHIFT			0
   1953 #define NV30_3D_CLEAR_COLOR_VALUE_G__MASK			0x0000ff00
   1954 #define NV30_3D_CLEAR_COLOR_VALUE_G__SHIFT			8
   1955 #define NV30_3D_CLEAR_COLOR_VALUE_R__MASK			0x00ff0000
   1956 #define NV30_3D_CLEAR_COLOR_VALUE_R__SHIFT			16
   1957 #define NV30_3D_CLEAR_COLOR_VALUE_A__MASK			0xff000000
   1958 #define NV30_3D_CLEAR_COLOR_VALUE_A__SHIFT			24
   1959 
   1960 #define NV30_3D_CLEAR_BUFFERS					0x00001d94
   1961 #define NV30_3D_CLEAR_BUFFERS_DEPTH				0x00000001
   1962 #define NV30_3D_CLEAR_BUFFERS_STENCIL				0x00000002
   1963 #define NV30_3D_CLEAR_BUFFERS_COLOR_R				0x00000010
   1964 #define NV30_3D_CLEAR_BUFFERS_COLOR_G				0x00000020
   1965 #define NV30_3D_CLEAR_BUFFERS_COLOR_B				0x00000040
   1966 #define NV30_3D_CLEAR_BUFFERS_COLOR_A				0x00000080
   1967 
   1968 #define NV30_3D_PRIMITIVE_RESTART_ENABLE			0x00001dac
   1969 
   1970 #define NV30_3D_PRIMITIVE_RESTART_INDEX				0x00001db0
   1971 
   1972 #define NV30_3D_LINE_STIPPLE_ENABLE				0x00001db4
   1973 
   1974 #define NV30_3D_LINE_STIPPLE_PATTERN				0x00001db8
   1975 #define NV30_3D_LINE_STIPPLE_PATTERN_FACTOR__MASK		0x0000ffff
   1976 #define NV30_3D_LINE_STIPPLE_PATTERN_FACTOR__SHIFT		0
   1977 #define NV30_3D_LINE_STIPPLE_PATTERN_PATTERN__MASK		0xffff0000
   1978 #define NV30_3D_LINE_STIPPLE_PATTERN_PATTERN__SHIFT		16
   1979 
   1980 #define NV30_3D_BACK_MATERIAL_SHININESS(i0)		       (0x00001e20 + 0x4*(i0))
   1981 #define NV30_3D_BACK_MATERIAL_SHININESS__ESIZE			0x00000004
   1982 #define NV30_3D_BACK_MATERIAL_SHININESS__LEN			0x00000006
   1983 
   1984 #define NV30_3D_VTX_ATTR_1F(i0)				       (0x00001e40 + 0x4*(i0))
   1985 #define NV30_3D_VTX_ATTR_1F__ESIZE				0x00000004
   1986 #define NV30_3D_VTX_ATTR_1F__LEN				0x00000010
   1987 
   1988 #define NV30_3D_ENGINE						0x00001e94
   1989 #define NV30_3D_ENGINE_FP					0x00000001
   1990 #define NV30_3D_ENGINE_VP					0x00000002
   1991 #define NV30_3D_ENGINE_FIXED					0x00000004
   1992 
   1993 #define NV30_3D_VP_UPLOAD_FROM_ID				0x00001e9c
   1994 
   1995 #define NV30_3D_VP_START_FROM_ID				0x00001ea0
   1996 
   1997 #define NV30_3D_POINT_PARAMETERS(i0)			       (0x00001ec0 + 0x4*(i0))
   1998 #define NV30_3D_POINT_PARAMETERS__ESIZE				0x00000004
   1999 #define NV30_3D_POINT_PARAMETERS__LEN				0x00000008
   2000 
   2001 #define NV30_3D_POINT_SIZE					0x00001ee0
   2002 
   2003 #define NV30_3D_POINT_PARAMETERS_ENABLE				0x00001ee4
   2004 
   2005 #define NV30_3D_POINT_SPRITE					0x00001ee8
   2006 #define NV30_3D_POINT_SPRITE_ENABLE				0x00000001
   2007 #define NV30_3D_POINT_SPRITE_R_MODE__MASK			0x00000006
   2008 #define NV30_3D_POINT_SPRITE_R_MODE__SHIFT			1
   2009 #define NV30_3D_POINT_SPRITE_R_MODE_ZERO			0x00000000
   2010 #define NV30_3D_POINT_SPRITE_R_MODE_R				0x00000002
   2011 #define NV30_3D_POINT_SPRITE_R_MODE_S				0x00000004
   2012 #define NV30_3D_POINT_SPRITE_COORD_REPLACE_0			0x00000100
   2013 #define NV30_3D_POINT_SPRITE_COORD_REPLACE_1			0x00000200
   2014 #define NV30_3D_POINT_SPRITE_COORD_REPLACE_2			0x00000400
   2015 #define NV30_3D_POINT_SPRITE_COORD_REPLACE_3			0x00000800
   2016 #define NV30_3D_POINT_SPRITE_COORD_REPLACE_4			0x00001000
   2017 #define NV30_3D_POINT_SPRITE_COORD_REPLACE_5			0x00002000
   2018 #define NV30_3D_POINT_SPRITE_COORD_REPLACE_6			0x00004000
   2019 #define NV30_3D_POINT_SPRITE_COORD_REPLACE_7			0x00008000
   2020 
   2021 #define NV30_3D_VP_UPLOAD_CONST_ID				0x00001efc
   2022 
   2023 #define NV30_3D_VP_UPLOAD_CONST(i0)			       (0x00001f00 + 0x10*(i0))
   2024 #define NV30_3D_VP_UPLOAD_CONST__ESIZE				0x00000010
   2025 #define NV30_3D_VP_UPLOAD_CONST__LEN				0x00000004
   2026 
   2027 
   2028 #define NV30_3D_VP_UPLOAD_CONST_X(i0)			       (0x00001f00 + 0x10*(i0))
   2029 
   2030 #define NV30_3D_VP_UPLOAD_CONST_Y(i0)			       (0x00001f04 + 0x10*(i0))
   2031 
   2032 #define NV30_3D_VP_UPLOAD_CONST_Z(i0)			       (0x00001f08 + 0x10*(i0))
   2033 
   2034 #define NV30_3D_VP_UPLOAD_CONST_W(i0)			       (0x00001f0c + 0x10*(i0))
   2035 
   2036 #define NV30_3D_UNK1F80(i0)				       (0x00001f80 + 0x4*(i0))
   2037 #define NV30_3D_UNK1F80__ESIZE					0x00000004
   2038 #define NV30_3D_UNK1F80__LEN					0x00000010
   2039 
   2040 #define NV40_3D_TEX_CACHE_CTL					0x00001fd8
   2041 
   2042 #define NV40_3D_VP_ATTRIB_EN					0x00001ff0
   2043 
   2044 #define NV40_3D_VP_RESULT_EN					0x00001ff4
   2045 
   2046 
   2047 #endif /* _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV30_40_3D_XML */
   2048