[Nouveau] [PATCH 2/3] nouveau: Update nv04 textured triangle object definitions.

Francisco Jerez currojerez at riseup.net
Sat Dec 26 06:49:26 PST 2009


Signed-off-by: Francisco Jerez <currojerez at riseup.net>
---
 nouveau/nouveau_class.h |  285 +++++++++++++++++++++++++----------------------
 1 files changed, 153 insertions(+), 132 deletions(-)

diff --git a/nouveau/nouveau_class.h b/nouveau/nouveau_class.h
index 87e167b..00b8e13 100644
--- a/nouveau/nouveau_class.h
+++ b/nouveau/nouveau_class.h
@@ -1326,8 +1326,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define  NV04_TEXTURED_TRIANGLE_COLORKEY						0x00000300
 #define  NV04_TEXTURED_TRIANGLE_OFFSET							0x00000304
 #define  NV04_TEXTURED_TRIANGLE_FORMAT							0x00000308
-#define   NV04_TEXTURED_TRIANGLE_FORMAT_DMA_SHIFT					0
-#define   NV04_TEXTURED_TRIANGLE_FORMAT_DMA_MASK					0x00000003
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_DMA_A						(1 <<  0)
+#define   NV04_TEXTURED_TRIANGLE_FORMAT_DMA_B						(1 <<  1)
 #define   NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_KEY_MATCH_SHIFT				2
 #define   NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_KEY_MATCH_MASK				0x0000000c
 #define   NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_ZOH_SHIFT				4
@@ -1401,14 +1401,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define    NV04_TEXTURED_TRIANGLE_BLEND_SHADE_MODE_FLAT					0x00000040
 #define    NV04_TEXTURED_TRIANGLE_BLEND_SHADE_MODE_GOURAUD				0x00000080
 #define    NV04_TEXTURED_TRIANGLE_BLEND_SHADE_MODE_PHONG				0x000000c0
-#define   NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE_SHIFT			8
-#define   NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE_MASK			0x00000f00
+#define   NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE			(1 <<  8)
 #define   NV04_TEXTURED_TRIANGLE_BLEND_SPECULAR_ENABLE_SHIFT				12
 #define   NV04_TEXTURED_TRIANGLE_BLEND_SPECULAR_ENABLE_MASK				0x0000f000
 #define   NV04_TEXTURED_TRIANGLE_BLEND_FOG_ENABLE_SHIFT					16
 #define   NV04_TEXTURED_TRIANGLE_BLEND_FOG_ENABLE_MASK					0x000f0000
-#define   NV04_TEXTURED_TRIANGLE_BLEND_ALPHA_ENABLE_SHIFT				20
-#define   NV04_TEXTURED_TRIANGLE_BLEND_ALPHA_ENABLE_MASK				0x00f00000
+#define   NV04_TEXTURED_TRIANGLE_BLEND_BLEND_ENABLE					(1 << 20)
 #define   NV04_TEXTURED_TRIANGLE_BLEND_SRC_SHIFT					24
 #define   NV04_TEXTURED_TRIANGLE_BLEND_SRC_MASK						0x0f000000
 #define   NV04_TEXTURED_TRIANGLE_BLEND_DST_SHIFT					28
@@ -1418,18 +1416,20 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define   NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_REF_MASK					0x000000ff
 #define   NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_FUNC_SHIFT				8
 #define   NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_FUNC_MASK				0x00000f00
-#define   NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_TEST_ENABLE				(1 << 12)
+#define   NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_ENABLE					(1 << 12)
 #define   NV04_TEXTURED_TRIANGLE_CONTROL_ORIGIN						(1 << 13)
-#define   NV04_TEXTURED_TRIANGLE_CONTROL_Z_ENABLE_SHIFT					14
-#define   NV04_TEXTURED_TRIANGLE_CONTROL_Z_ENABLE_MASK					0x0000c000
+#define   NV04_TEXTURED_TRIANGLE_CONTROL_Z_ENABLE					(1 << 14)
 #define   NV04_TEXTURED_TRIANGLE_CONTROL_Z_FUNC_SHIFT					16
 #define   NV04_TEXTURED_TRIANGLE_CONTROL_Z_FUNC_MASK					0x000f0000
 #define   NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_SHIFT				20
 #define   NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_MASK					0x00300000
+#define    NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_BOTH				0x00000000
+#define    NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_NONE				0x00100000
+#define    NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_CW					0x00200000
+#define    NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_CCW					0x00300000
 #define   NV04_TEXTURED_TRIANGLE_CONTROL_DITHER_ENABLE					(1 << 22)
 #define   NV04_TEXTURED_TRIANGLE_CONTROL_Z_PERSPECTIVE_ENABLE				(1 << 23)
-#define   NV04_TEXTURED_TRIANGLE_CONTROL_Z_WRITE_ENABLE_SHIFT				24
-#define   NV04_TEXTURED_TRIANGLE_CONTROL_Z_WRITE_ENABLE_MASK				0x3f000000
+#define   NV04_TEXTURED_TRIANGLE_CONTROL_Z_WRITE					(1 << 24)
 #define   NV04_TEXTURED_TRIANGLE_CONTROL_Z_FORMAT_SHIFT					30
 #define   NV04_TEXTURED_TRIANGLE_CONTROL_Z_FORMAT_MASK					0xc0000000
 #define  NV04_TEXTURED_TRIANGLE_FOGCOLOR						0x00000318
@@ -1473,20 +1473,20 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define  NV04_TEXTURED_TRIANGLE_TLVERTEX_TU__SIZE					0x00000010
 #define  NV04_TEXTURED_TRIANGLE_TLVERTEX_TV(x)						(0x0000041c+((x)*32))
 #define  NV04_TEXTURED_TRIANGLE_TLVERTEX_TV__SIZE					0x00000010
-#define  NV04_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE(x)				(0x00000600+((x)*4))
-#define  NV04_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE__SIZE				0x00000040
-#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I0_SHIFT			0
-#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I0_MASK				0x0000000f
-#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I1_SHIFT			4
-#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I1_MASK				0x000000f0
-#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I2_SHIFT			8
-#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I2_MASK				0x00000f00
-#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I3_SHIFT			12
-#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I3_MASK				0x0000f000
-#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I4_SHIFT			16
-#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I4_MASK				0x000f0000
-#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I5_SHIFT			20
-#define   NV04_TEXTURED_TRIANGLE_TLVERTEX_DRAWPRIMITIVE_I5_MASK				0x00f00000
+#define  NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE(x)					(0x00000600+((x)*4))
+#define  NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE__SIZE					0x00000040
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I0_SHIFT					0
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I0_MASK					0x0000000f
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I1_SHIFT					4
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I1_MASK					0x000000f0
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I2_SHIFT					8
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I2_MASK					0x00000f00
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I3_SHIFT					12
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I3_MASK					0x0000f000
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I4_SHIFT					16
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I4_MASK					0x000f0000
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I5_SHIFT					20
+#define   NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I5_MASK					0x00f00000
 
 
 #define NV04_MULTITEX_TRIANGLE								0x00000055
@@ -1501,8 +1501,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define  NV04_MULTITEX_TRIANGLE_OFFSET__SIZE						0x00000002
 #define  NV04_MULTITEX_TRIANGLE_FORMAT(x)						(0x00000310+((x)*4))
 #define  NV04_MULTITEX_TRIANGLE_FORMAT__SIZE						0x00000002
-#define   NV04_MULTITEX_TRIANGLE_FORMAT_DMA_SHIFT					0
-#define   NV04_MULTITEX_TRIANGLE_FORMAT_DMA_MASK					0x0000000f
+#define   NV04_MULTITEX_TRIANGLE_FORMAT_DMA_A						(1 <<  0)
+#define   NV04_MULTITEX_TRIANGLE_FORMAT_DMA_B						(1 <<  1)
 #define   NV04_MULTITEX_TRIANGLE_FORMAT_ORIGIN_ZOH_SHIFT				4
 #define   NV04_MULTITEX_TRIANGLE_FORMAT_ORIGIN_ZOH_MASK					0x00000030
 #define   NV04_MULTITEX_TRIANGLE_FORMAT_ORIGIN_FOH_SHIFT				6
@@ -1536,82 +1536,100 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define   NV04_MULTITEX_TRIANGLE_FILTER_MAGNIFY_SHIFT					28
 #define   NV04_MULTITEX_TRIANGLE_FILTER_MAGNIFY_MASK					0x70000000
 #define   NV04_MULTITEX_TRIANGLE_FILTER_ANISOTROPIC_MAGNIFY_ENABLE			(1 << 31)
-#define  NV04_MULTITEX_TRIANGLE_COMBINE_0_ALPHA						0x00000320
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_INVERSE0				(1 <<  0)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ALPHA0					(1 <<  1)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ARGUMENT0_SHIFT			2
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ARGUMENT0_MASK				0x000000fc
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_INVERSE1				(1 <<  8)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ALPHA1					(1 <<  9)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ARGUMENT1_SHIFT			10
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ARGUMENT1_MASK				0x0000fc00
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_INVERSE2				(1 << 16)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ALPHA2					(1 << 17)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ARGUMENT2_SHIFT			18
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ARGUMENT2_MASK				0x00fc0000
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_INVERSE3				(1 << 24)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ALPHA3					(1 << 25)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ARGUMENT3_SHIFT			26
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_ARGUMENT3_MASK				0x1c000000
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_OPERATION_SHIFT			29
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_ALPHA_OPERATION_MASK				0xe0000000
-#define  NV04_MULTITEX_TRIANGLE_COMBINE_0_COLOR						0x00000324
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_COLOR_INVERSE0				(1 <<  0)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ALPHA0					(1 <<  1)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ARGUMENT0_SHIFT			2
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ARGUMENT0_MASK				0x000000fc
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_COLOR_INVERSE1				(1 <<  8)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ALPHA1					(1 <<  9)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ARGUMENT1_SHIFT			10
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ARGUMENT1_MASK				0x0000fc00
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_COLOR_INVERSE2				(1 << 16)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ALPHA2					(1 << 17)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ARGUMENT2_SHIFT			18
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ARGUMENT2_MASK				0x00fc0000
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_COLOR_INVERSE3				(1 << 24)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ALPHA3					(1 << 25)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ARGUMENT3_SHIFT			26
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_COLOR_ARGUMENT3_MASK				0x1c000000
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_COLOR_OPERATION_SHIFT			29
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_0_COLOR_OPERATION_MASK				0xe0000000
-#define  NV04_MULTITEX_TRIANGLE_COMBINE_1_ALPHA						0x0000032c
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_INVERSE0				(1 <<  0)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ALPHA0					(1 <<  1)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ARGUMENT0_SHIFT			2
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ARGUMENT0_MASK				0x000000fc
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_INVERSE1				(1 <<  8)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ALPHA1					(1 <<  9)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ARGUMENT1_SHIFT			10
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ARGUMENT1_MASK				0x0000fc00
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_INVERSE2				(1 << 16)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ALPHA2					(1 << 17)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ARGUMENT2_SHIFT			18
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ARGUMENT2_MASK				0x00fc0000
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_INVERSE3				(1 << 24)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ALPHA3					(1 << 25)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ARGUMENT3_SHIFT			26
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_ARGUMENT3_MASK				0x1c000000
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_OPERATION_SHIFT			29
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_ALPHA_OPERATION_MASK				0xe0000000
-#define  NV04_MULTITEX_TRIANGLE_COMBINE_1_COLOR						0x00000330
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_COLOR_INVERSE0				(1 <<  0)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ALPHA0					(1 <<  1)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ARGUMENT0_SHIFT			2
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ARGUMENT0_MASK				0x000000fc
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_COLOR_INVERSE1				(1 <<  8)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ALPHA1					(1 <<  9)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ARGUMENT1_SHIFT			10
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ARGUMENT1_MASK				0x0000fc00
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_COLOR_INVERSE2				(1 << 16)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ALPHA2					(1 << 17)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ARGUMENT2_SHIFT			18
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ARGUMENT2_MASK				0x00fc0000
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_COLOR_INVERSE3				(1 << 24)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ALPHA3					(1 << 25)
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ARGUMENT3_SHIFT			26
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_COLOR_ARGUMENT3_MASK				0x1c000000
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_COLOR_OPERATION_SHIFT			29
-#define   NV04_MULTITEX_TRIANGLE_COMBINE_1_COLOR_OPERATION_MASK				0xe0000000
+#define  NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA(x)					(0x00000320+((x)*12))
+#define  NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA__SIZE					0x00000002
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_INVERSE0					(1 <<  0)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_SHIFT				2
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_MASK				0x000000fc
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_ZERO				0x00000004
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_CONSTANT			0x00000008
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_PRIMARY_COLOR			0x0000000c
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_PREVIOUS			0x00000010
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_TEXTURE0			0x00000014
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_TEXTURE1			0x00000018
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_INVERSE1					(1 <<  8)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_SHIFT				10
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_MASK				0x0000fc00
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_ZERO				0x00000400
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_CONSTANT			0x00000800
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_PRIMARY_COLOR			0x00000c00
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_PREVIOUS			0x00001000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_TEXTURE0			0x00001400
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_TEXTURE1			0x00001800
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_INVERSE2					(1 << 16)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_SHIFT				18
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_MASK				0x00fc0000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_ZERO				0x00040000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_CONSTANT			0x00080000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_PRIMARY_COLOR			0x000c0000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_PREVIOUS			0x00100000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_TEXTURE0			0x00140000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_TEXTURE1			0x00180000
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_INVERSE3					(1 << 24)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_SHIFT				26
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_MASK				0x1c000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_ZERO				0x04000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_CONSTANT			0x08000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_PRIMARY_COLOR			0x0c000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_PREVIOUS			0x10000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_TEXTURE0			0x14000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_TEXTURE1			0x18000000
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_SHIFT				29
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_MASK					0xe0000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_IDENTITY				0x20000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_SCALE2				0x40000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_SCALE4				0x60000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_BIAS				0x80000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_BIAS_SCALE2				0xe0000000
+#define  NV04_MULTITEX_TRIANGLE_COMBINE_COLOR(x)					(0x00000324+((x)*12))
+#define  NV04_MULTITEX_TRIANGLE_COMBINE_COLOR__SIZE					0x00000002
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_INVERSE0					(1 <<  0)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ALPHA0					(1 <<  1)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_SHIFT				2
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_MASK				0x000000fc
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_ZERO				0x00000004
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_CONSTANT			0x00000008
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_PRIMARY_COLOR			0x0000000c
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_PREVIOUS			0x00000010
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_TEXTURE0			0x00000014
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_TEXTURE1			0x00000018
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_INVERSE1					(1 <<  8)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ALPHA1					(1 <<  9)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_SHIFT				10
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_MASK				0x0000fc00
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_ZERO				0x00000400
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_CONSTANT			0x00000800
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_PRIMARY_COLOR			0x00000c00
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_PREVIOUS			0x00001000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_TEXTURE0			0x00001400
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_TEXTURE1			0x00001800
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_INVERSE2					(1 << 16)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ALPHA2					(1 << 17)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_SHIFT				18
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_MASK				0x00fc0000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_ZERO				0x00040000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_CONSTANT			0x00080000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_PRIMARY_COLOR			0x000c0000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_PREVIOUS			0x00100000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_TEXTURE0			0x00140000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_TEXTURE1			0x00180000
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_INVERSE3					(1 << 24)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ALPHA3					(1 << 25)
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_SHIFT				26
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_MASK				0x1c000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_ZERO				0x04000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_CONSTANT			0x08000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_PRIMARY_COLOR			0x0c000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_PREVIOUS			0x10000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_TEXTURE0			0x14000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_TEXTURE1			0x18000000
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_SHIFT				29
+#define   NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_MASK					0xe0000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_IDENTITY				0x20000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_SCALE2				0x40000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_SCALE4				0x60000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_BIAS				0x80000000
+#define    NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_BIAS_SCALE2				0xe0000000
 #define  NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR						0x00000334
 #define   NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_B_SHIFT					0
 #define   NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_B_MASK					0x000000ff
@@ -1626,14 +1644,15 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define   NV04_MULTITEX_TRIANGLE_BLEND_MASK_BIT_MASK					0x00000030
 #define   NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_SHIFT					6
 #define   NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_MASK					0x000000c0
-#define   NV04_MULTITEX_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE_SHIFT			8
-#define   NV04_MULTITEX_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE_MASK			0x00000f00
+#define    NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_FLAT					0x00000040
+#define    NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_GOURAUD				0x00000080
+#define    NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_PHONG				0x000000c0
+#define   NV04_MULTITEX_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE			(1 <<  8)
 #define   NV04_MULTITEX_TRIANGLE_BLEND_SPECULAR_ENABLE_SHIFT				12
 #define   NV04_MULTITEX_TRIANGLE_BLEND_SPECULAR_ENABLE_MASK				0x0000f000
 #define   NV04_MULTITEX_TRIANGLE_BLEND_FOG_ENABLE_SHIFT					16
 #define   NV04_MULTITEX_TRIANGLE_BLEND_FOG_ENABLE_MASK					0x000f0000
-#define   NV04_MULTITEX_TRIANGLE_BLEND_ALPHA_ENABLE_SHIFT				20
-#define   NV04_MULTITEX_TRIANGLE_BLEND_ALPHA_ENABLE_MASK				0x00f00000
+#define   NV04_MULTITEX_TRIANGLE_BLEND_BLEND_ENABLE					(1 << 20)
 #define   NV04_MULTITEX_TRIANGLE_BLEND_SRC_SHIFT					24
 #define   NV04_MULTITEX_TRIANGLE_BLEND_SRC_MASK						0x0f000000
 #define   NV04_MULTITEX_TRIANGLE_BLEND_DST_SHIFT					28
@@ -1643,27 +1662,29 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define   NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_REF_MASK				0x000000ff
 #define   NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_FUNC_SHIFT				8
 #define   NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_FUNC_MASK				0x00000f00
-#define   NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_TEST_ENABLE				(1 << 12)
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_ENABLE					(1 << 12)
 #define   NV04_MULTITEX_TRIANGLE_CONTROL0_ORIGIN					(1 << 13)
-#define   NV04_MULTITEX_TRIANGLE_CONTROL0_Z_ENABLE_SHIFT				14
-#define   NV04_MULTITEX_TRIANGLE_CONTROL0_Z_ENABLE_MASK					0x0000c000
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_Z_ENABLE					(1 << 14)
 #define   NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FUNC_SHIFT					16
 #define   NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FUNC_MASK					0x000f0000
 #define   NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_SHIFT				20
 #define   NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_MASK				0x00300000
+#define    NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_BOTH				0x00000000
+#define    NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_NONE				0x00100000
+#define    NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_CW					0x00200000
+#define    NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_CCW				0x00300000
 #define   NV04_MULTITEX_TRIANGLE_CONTROL0_DITHER_ENABLE					(1 << 22)
 #define   NV04_MULTITEX_TRIANGLE_CONTROL0_Z_PERSPECTIVE_ENABLE				(1 << 23)
-#define   NV04_MULTITEX_TRIANGLE_CONTROL0_Z_WRITE_ENABLE				(1 << 24)
-#define   NV04_MULTITEX_TRIANGLE_CONTROL0_STENCIL_WRITE_ENABLE				(1 << 25)
-#define   NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_WRITE_ENABLE				(1 << 26)
-#define   NV04_MULTITEX_TRIANGLE_CONTROL0_RED_WRITE_ENABLE				(1 << 27)
-#define   NV04_MULTITEX_TRIANGLE_CONTROL0_GREEN_WRITE_ENABLE				(1 << 28)
-#define   NV04_MULTITEX_TRIANGLE_CONTROL0_BLUE_WRITE_ENABLE				(1 << 29)
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_Z_WRITE					(1 << 24)
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_STENCIL_WRITE					(1 << 25)
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_WRITE					(1 << 26)
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_RED_WRITE					(1 << 27)
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_GREEN_WRITE					(1 << 28)
+#define   NV04_MULTITEX_TRIANGLE_CONTROL0_BLUE_WRITE					(1 << 29)
 #define   NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FORMAT_SHIFT				30
 #define   NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FORMAT_MASK					0xc0000000
 #define  NV04_MULTITEX_TRIANGLE_CONTROL1						0x00000340
-#define   NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_TEST_ENABLE_SHIFT			0
-#define   NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_TEST_ENABLE_MASK			0x0000000f
+#define   NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_ENABLE				(1 <<  0)
 #define   NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_FUNC_SHIFT				4
 #define   NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_FUNC_MASK				0x000000f0
 #define   NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_REF_SHIFT				8
@@ -1724,20 +1745,20 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TU1__SIZE					0x00000008
 #define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TV1(x)					(0x00000424+((x)*40))
 #define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TV1__SIZE					0x00000008
-#define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE(x)				(0x00000540+((x)*4))
-#define  NV04_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE__SIZE				0x00000030
-#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I0_SHIFT			0
-#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I0_MASK			0x0000000f
-#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I1_SHIFT			4
-#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I1_MASK			0x000000f0
-#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I2_SHIFT			8
-#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I2_MASK			0x00000f00
-#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I3_SHIFT			12
-#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I3_MASK			0x0000f000
-#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I4_SHIFT			16
-#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I4_MASK			0x000f0000
-#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I5_SHIFT			20
-#define   NV04_MULTITEX_TRIANGLE_TLMTVERTEX_DRAWPRIMITIVE_I5_MASK			0x00f00000
+#define  NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE(x)					(0x00000540+((x)*4))
+#define  NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE__SIZE					0x00000030
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I0_SHIFT					0
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I0_MASK					0x0000000f
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I1_SHIFT					4
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I1_MASK					0x000000f0
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I2_SHIFT					8
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I2_MASK					0x00000f00
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I3_SHIFT					12
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I3_MASK					0x0000f000
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I4_SHIFT					16
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I4_MASK					0x000f0000
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I5_SHIFT					20
+#define   NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I5_MASK					0x00f00000
 
 
 #define NV10TCL										0x00000056
-- 
1.6.4.4



More information about the Nouveau mailing list