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