⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 r300_reg.h

📁 linux-2.6.15.6
💻 H
📖 第 1 页 / 共 5 页
字号:
// on the vertex program, *not* the fragment program) */#define R300_RS_CNTL_0                      0x4300#       define R300_RS_CNTL_TC_CNT_SHIFT         2#       define R300_RS_CNTL_TC_CNT_MASK          (7 << 2)#		define R300_RS_CNTL_CI_CNT_SHIFT         7	/* number of color interpolators used */#       define R300_RS_CNTL_0_UNKNOWN_18         (1 << 18)/* Guess: RS_CNTL_1 holds the index of the highest used RS_ROUTE_n register. */#define R300_RS_CNTL_1                      0x4304/* gap *//* Only used for texture coordinates.// Use the source field to route texture coordinate input from the vertex program// to the desired interpolator. Note that the source field is relative to the// outputs the vertex program *actually* writes. If a vertex program only writes// texcoord[1], this will be source index 0.// Set INTERP_USED on all interpolators that produce data used by the// fragment program. INTERP_USED looks like a swizzling mask, but// I haven't seen it used that way.//// Note: The _UNKNOWN constants are always set in their respective register.// I don't know if this is necessary. */#define R300_RS_INTERP_0                    0x4310#define R300_RS_INTERP_1                    0x4314#       define R300_RS_INTERP_1_UNKNOWN          0x40#define R300_RS_INTERP_2                    0x4318#       define R300_RS_INTERP_2_UNKNOWN          0x80#define R300_RS_INTERP_3                    0x431C#       define R300_RS_INTERP_3_UNKNOWN          0xC0#define R300_RS_INTERP_4                    0x4320#define R300_RS_INTERP_5                    0x4324#define R300_RS_INTERP_6                    0x4328#define R300_RS_INTERP_7                    0x432C#       define R300_RS_INTERP_SRC_SHIFT          2#       define R300_RS_INTERP_SRC_MASK           (7 << 2)#       define R300_RS_INTERP_USED               0x00D10000/* These DWORDs control how vertex data is routed into fragment program// registers, after interpolators. */#define R300_RS_ROUTE_0                     0x4330#define R300_RS_ROUTE_1                     0x4334#define R300_RS_ROUTE_2                     0x4338#define R300_RS_ROUTE_3                     0x433C	/* GUESS */#define R300_RS_ROUTE_4                     0x4340	/* GUESS */#define R300_RS_ROUTE_5                     0x4344	/* GUESS */#define R300_RS_ROUTE_6                     0x4348	/* GUESS */#define R300_RS_ROUTE_7                     0x434C	/* GUESS */#       define R300_RS_ROUTE_SOURCE_INTERP_0     0#       define R300_RS_ROUTE_SOURCE_INTERP_1     1#       define R300_RS_ROUTE_SOURCE_INTERP_2     2#       define R300_RS_ROUTE_SOURCE_INTERP_3     3#       define R300_RS_ROUTE_SOURCE_INTERP_4     4#       define R300_RS_ROUTE_SOURCE_INTERP_5     5	/* GUESS */#       define R300_RS_ROUTE_SOURCE_INTERP_6     6	/* GUESS */#       define R300_RS_ROUTE_SOURCE_INTERP_7     7	/* GUESS */#       define R300_RS_ROUTE_ENABLE              (1 << 3)	/* GUESS */#       define R300_RS_ROUTE_DEST_SHIFT          6#       define R300_RS_ROUTE_DEST_MASK           (31 << 6)	/* GUESS *//* Special handling for color: When the fragment program uses color,// the ROUTE_0_COLOR bit is set and ROUTE_0_COLOR_DEST contains the// color register index. */#       define R300_RS_ROUTE_0_COLOR             (1 << 14)#       define R300_RS_ROUTE_0_COLOR_DEST_SHIFT  17#       define R300_RS_ROUTE_0_COLOR_DEST_MASK   (31 << 17)	/* GUESS *//* As above, but for secondary color */#		define R300_RS_ROUTE_1_COLOR1            (1 << 14)#		define R300_RS_ROUTE_1_COLOR1_DEST_SHIFT 17#		define R300_RS_ROUTE_1_COLOR1_DEST_MASK  (31 << 17)#		define R300_RS_ROUTE_1_UNKNOWN11         (1 << 11)/* END *//* BEGIN: Scissors and cliprects// There are four clipping rectangles. Their corner coordinates are inclusive.// Every pixel is assigned a number from 0 and 15 by setting bits 0-3 depending// on whether the pixel is inside cliprects 0-3, respectively. For example,// if a pixel is inside cliprects 0 and 1, but outside 2 and 3, it is assigned// the number 3 (binary 0011).// Iff the bit corresponding to the pixel's number in RE_CLIPRECT_CNTL is set,// the pixel is rasterized.//// In addition to this, there is a scissors rectangle. Only pixels inside the// scissors rectangle are drawn. (coordinates are inclusive)//// For some reason, the top-left corner of the framebuffer is at (1440, 1440)// for the purpose of clipping and scissors. */#define R300_RE_CLIPRECT_TL_0               0x43B0#define R300_RE_CLIPRECT_BR_0               0x43B4#define R300_RE_CLIPRECT_TL_1               0x43B8#define R300_RE_CLIPRECT_BR_1               0x43BC#define R300_RE_CLIPRECT_TL_2               0x43C0#define R300_RE_CLIPRECT_BR_2               0x43C4#define R300_RE_CLIPRECT_TL_3               0x43C8#define R300_RE_CLIPRECT_BR_3               0x43CC#       define R300_CLIPRECT_OFFSET              1440#       define R300_CLIPRECT_MASK                0x1FFF#       define R300_CLIPRECT_X_SHIFT             0#       define R300_CLIPRECT_X_MASK              (0x1FFF << 0)#       define R300_CLIPRECT_Y_SHIFT             13#       define R300_CLIPRECT_Y_MASK              (0x1FFF << 13)#define R300_RE_CLIPRECT_CNTL               0x43D0#       define R300_CLIP_OUT                     (1 << 0)#       define R300_CLIP_0                       (1 << 1)#       define R300_CLIP_1                       (1 << 2)#       define R300_CLIP_10                      (1 << 3)#       define R300_CLIP_2                       (1 << 4)#       define R300_CLIP_20                      (1 << 5)#       define R300_CLIP_21                      (1 << 6)#       define R300_CLIP_210                     (1 << 7)#       define R300_CLIP_3                       (1 << 8)#       define R300_CLIP_30                      (1 << 9)#       define R300_CLIP_31                      (1 << 10)#       define R300_CLIP_310                     (1 << 11)#       define R300_CLIP_32                      (1 << 12)#       define R300_CLIP_320                     (1 << 13)#       define R300_CLIP_321                     (1 << 14)#       define R300_CLIP_3210                    (1 << 15)/* gap */#define R300_RE_SCISSORS_TL                 0x43E0#define R300_RE_SCISSORS_BR                 0x43E4#       define R300_SCISSORS_OFFSET              1440#       define R300_SCISSORS_X_SHIFT             0#       define R300_SCISSORS_X_MASK              (0x1FFF << 0)#       define R300_SCISSORS_Y_SHIFT             13#       define R300_SCISSORS_Y_MASK              (0x1FFF << 13)/* END *//* BEGIN: Texture specification// The texture specification dwords are grouped by meaning and not by texture unit.// This means that e.g. the offset for texture image unit N is found in register// TX_OFFSET_0 + (4*N) */#define R300_TX_FILTER_0                    0x4400#       define R300_TX_REPEAT                    0#       define R300_TX_MIRRORED                  1#       define R300_TX_CLAMP                     4#       define R300_TX_CLAMP_TO_EDGE             2#       define R300_TX_CLAMP_TO_BORDER           6#       define R300_TX_WRAP_S_SHIFT              0#       define R300_TX_WRAP_S_MASK               (7 << 0)#       define R300_TX_WRAP_T_SHIFT              3#       define R300_TX_WRAP_T_MASK               (7 << 3)#       define R300_TX_WRAP_Q_SHIFT              6#       define R300_TX_WRAP_Q_MASK               (7 << 6)#       define R300_TX_MAG_FILTER_NEAREST        (1 << 9)#       define R300_TX_MAG_FILTER_LINEAR         (2 << 9)#       define R300_TX_MAG_FILTER_MASK           (3 << 9)#       define R300_TX_MIN_FILTER_NEAREST        (1 << 11)#       define R300_TX_MIN_FILTER_LINEAR         (2 << 11)#	define R300_TX_MIN_FILTER_NEAREST_MIP_NEAREST       (5  <<  11)#	define R300_TX_MIN_FILTER_NEAREST_MIP_LINEAR        (9  <<  11)#	define R300_TX_MIN_FILTER_LINEAR_MIP_NEAREST        (6  <<  11)#	define R300_TX_MIN_FILTER_LINEAR_MIP_LINEAR         (10 <<  11)/* NOTE: NEAREST doesnt seem to exist.   Im not seting MAG_FILTER_MASK and (3 << 11) on for all   anisotropy modes because that would void selected mag filter */#	define R300_TX_MIN_FILTER_ANISO_NEAREST             ((0 << 13) /*|R300_TX_MAG_FILTER_MASK|(3<<11)*/)#	define R300_TX_MIN_FILTER_ANISO_LINEAR              ((0 << 13) /*|R300_TX_MAG_FILTER_MASK|(3<<11)*/)#	define R300_TX_MIN_FILTER_ANISO_NEAREST_MIP_NEAREST ((1 << 13) /*|R300_TX_MAG_FILTER_MASK|(3<<11)*/)#	define R300_TX_MIN_FILTER_ANISO_NEAREST_MIP_LINEAR  ((2 << 13) /*|R300_TX_MAG_FILTER_MASK|(3<<11)*/)#       define R300_TX_MIN_FILTER_MASK           ( (15 << 11) | (3 << 13) )#	define R300_TX_MAX_ANISO_1_TO_1  (0 << 21)#	define R300_TX_MAX_ANISO_2_TO_1  (2 << 21)#	define R300_TX_MAX_ANISO_4_TO_1  (4 << 21)#	define R300_TX_MAX_ANISO_8_TO_1  (6 << 21)#	define R300_TX_MAX_ANISO_16_TO_1 (8 << 21)#	define R300_TX_MAX_ANISO_MASK    (14 << 21)#define R300_TX_UNK1_0                      0x4440#	define R300_LOD_BIAS_MASK	    0x1fff#define R300_TX_SIZE_0                      0x4480#       define R300_TX_WIDTHMASK_SHIFT           0#       define R300_TX_WIDTHMASK_MASK            (2047 << 0)#       define R300_TX_HEIGHTMASK_SHIFT          11#       define R300_TX_HEIGHTMASK_MASK           (2047 << 11)#       define R300_TX_UNK23                     (1 << 23)#       define R300_TX_SIZE_SHIFT                26	/* largest of width, height */#       define R300_TX_SIZE_MASK                 (15 << 26)#define R300_TX_FORMAT_0                    0x44C0	/* The interpretation of the format word by Wladimir van der Laan */	/* The X, Y, Z and W refer to the layout of the components.	   They are given meanings as R, G, B and Alpha by the swizzle	   specification */#	define R300_TX_FORMAT_X8		    0x0#	define R300_TX_FORMAT_X16		    0x1#	define R300_TX_FORMAT_Y4X4		    0x2#	define R300_TX_FORMAT_Y8X8		    0x3#	define R300_TX_FORMAT_Y16X16		    0x4#	define R300_TX_FORMAT_Z3Y3X2		    0x5#	define R300_TX_FORMAT_Z5Y6X5		    0x6#	define R300_TX_FORMAT_Z6Y5X5		    0x7#	define R300_TX_FORMAT_Z11Y11X10		    0x8#	define R300_TX_FORMAT_Z10Y11X11		    0x9#	define R300_TX_FORMAT_W4Z4Y4X4		    0xA#	define R300_TX_FORMAT_W1Z5Y5X5		    0xB#	define R300_TX_FORMAT_W8Z8Y8X8		    0xC#	define R300_TX_FORMAT_W2Z10Y10X10	    0xD#	define R300_TX_FORMAT_W16Z16Y16X16	    0xE#	define R300_TX_FORMAT_DXT1	    	    0xF#	define R300_TX_FORMAT_DXT3	    	    0x10#	define R300_TX_FORMAT_DXT5	    	    0x11#	define R300_TX_FORMAT_D3DMFT_CxV8U8	    0x12	/* no swizzle */#	define R300_TX_FORMAT_A8R8G8B8	    	    0x13	/* no swizzle */#	define R300_TX_FORMAT_B8G8_B8G8	    	    0x14	/* no swizzle */#	define R300_TX_FORMAT_G8R8_G8B8	    	    0x15	/* no swizzle */						  /* 0x16 - some 16 bit green format.. ?? */#	define R300_TX_FORMAT_UNK25		   (1 << 25)	/* no swizzle */	/* gap */	/* Floating point formats */	/* Note - hardware supports both 16 and 32 bit floating point */#	define R300_TX_FORMAT_FL_I16	    	    0x18#	define R300_TX_FORMAT_FL_I16A16	    	    0x19#	define R300_TX_FORMAT_FL_R16G16B16A16	    0x1A#	define R300_TX_FORMAT_FL_I32	    	    0x1B#	define R300_TX_FORMAT_FL_I32A32	    	    0x1C#	define R300_TX_FORMAT_FL_R32G32B32A32	    0x1D	/* alpha modes, convenience mostly */	/* if you have alpha, pick constant appropriate to the	   number of channels (1 for I8, 2 for I8A8, 4 for R8G8B8A8, etc */# 	define R300_TX_FORMAT_ALPHA_1CH		    0x000# 	define R300_TX_FORMAT_ALPHA_2CH		    0x200# 	define R300_TX_FORMAT_ALPHA_4CH		    0x600# 	define R300_TX_FORMAT_ALPHA_NONE	    0xA00	/* Swizzling */	/* constants */#	define R300_TX_FORMAT_X		0#	define R300_TX_FORMAT_Y		1#	define R300_TX_FORMAT_Z		2#	define R300_TX_FORMAT_W		3#	define R300_TX_FORMAT_ZERO	4#	define R300_TX_FORMAT_ONE	5#	define R300_TX_FORMAT_CUT_Z	6	/* 2.0*Z, everything above 1.0 is set to 0.0 */#	define R300_TX_FORMAT_CUT_W	7	/* 2.0*W, everything above 1.0 is set to 0.0 */#	define R300_TX_FORMAT_B_SHIFT	18#	define R300_TX_FORMAT_G_SHIFT	15#	define R300_TX_FORMAT_R_SHIFT	12#	define R300_TX_FORMAT_A_SHIFT	9	/* Convenience macro to take care of layout and swizzling */#	define R300_EASY_TX_FORMAT(B, G, R, A, FMT)	(\	  ((R300_TX_FORMAT_##B)<<R300_TX_FORMAT_B_SHIFT) \	| ((R300_TX_FORMAT_##G)<<R300_TX_FORMAT_G_SHIFT) \	| ((R300_TX_FORMAT_##R)<<R300_TX_FORMAT_R_SHIFT) \	| ((R300_TX_FORMAT_##A)<<R300_TX_FORMAT_A_SHIFT) \	| (R300_TX_FORMAT_##FMT) \	  )	/* These can be ORed with result of R300_EASY_TX_FORMAT() */	/* We don't really know what they do. Take values from a constant color ? */#	define R300_TX_FORMAT_CONST_X		(1<<5)#	define R300_TX_FORMAT_CONST_Y		(2<<5)#	define R300_TX_FORMAT_CONST_Z		(4<<5)#	define R300_TX_FORMAT_CONST_W		(8<<5)#	define R300_TX_FORMAT_YUV_MODE		0x00800000#define R300_TX_OFFSET_0                    0x4540/* BEGIN: Guess from R200 */#       define R300_TXO_ENDIAN_NO_SWAP           (0 << 0)#       define R300_TXO_ENDIAN_BYTE_SWAP         (1 << 0)#       define R300_TXO_ENDIAN_WORD_SWAP         (2 << 0)#       define R300_TXO_ENDIAN_HALFDW_SWAP       (3 << 0)#       define R300_TXO_OFFSET_MASK              0xffffffe0#       define R300_TXO_OFFSET_SHIFT             5/* END */#define R300_TX_UNK4_0                      0x4580#define R300_TX_BORDER_COLOR_0              0x45C0	//ff00ff00 == { 0, 1.0, 0, 1.0 }/* END */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -