Turns out unknown5 was border color. texwrap looks good now.
[mesa.git] / src / mesa / drivers / dri / r300 / r300_reg.h
index 557c55dbbe7c44c8e9e367ef6a84fea36e06041a..60b2c8074e7243ea2bcdfe21952e9ae02b3e36b3 100644 (file)
@@ -16,8 +16,12 @@ I am fairly certain that they are correct unless stated otherwise in comments.
 #define R300_SE_VPORT_ZSCALE                0x1DA8
 #define R300_SE_VPORT_ZOFFSET               0x1DAC
 
-#define R300_SE_ZBIAS_FACTOR                0x1DB0     /* guess */
-#define R300_SE_ZBIAS_CONSTANT              0x1DB4     /* guess */
+/*
+VB mode colorbuffer clears are broken with these too so these would
+probably work also. --aet
+*/
+#define R300_SE_ZBIAS_FACTOR                0x1DB0
+#define R300_SE_ZBIAS_CONSTANT              0x1DB4
 
 /* This register is written directly and also starts data section in many 3d CP_PACKET3's */
 #define R300_VAP_VF_CNTL       0x2084
@@ -420,10 +424,31 @@ I am fairly certain that they are correct unless stated otherwise in comments.
 #       define R300_POINTSIZE_Y_MASK             (0xFFFF << 0) /* GUESS */
 #       define R300_POINTSIZE_X_SHIFT            16
 #       define R300_POINTSIZE_X_MASK             (0xFFFF << 16) /* GUESS */
+#       define R300_POINTSIZE_MAX             (R300_POINTSIZE_Y_MASK / 6)
+
+/* The line width is given in multiples of 6.
+   00020018 == 4.0, 0002001e == 5.0  */
+#define R300_RE_LINE_CNT                      0x4234
+#       define R300_LINESIZE_SHIFT            0
+#       define R300_LINESIZE_MASK             (0xFFFF << 0) /* GUESS */
+#       define R300_LINESIZE_MAX             (R300_LINESIZE_MASK / 6)
+#       define R300_LINE_CNT_UNK1           (1 << 17)
+
+/* Linestipple factor. 3a088889 == 1.0, 3baaaaa9 == 10.0 */
+#define R300_RE_LINE_STIPPLE_FACTOR           0x4238
+#define R300_RE_LINE_STIPPLE_PTRN1            0x43E0
+#define R300_RE_LINE_STIPPLE_PTRN2            0x43E4
+
+
+#define R300_RE_ZBIAS_T_FACTOR                0x42A4
+#define R300_RE_ZBIAS_T_CONSTANT              0x42A8
+#define R300_RE_ZBIAS_W_FACTOR                0x42AC
+#define R300_RE_ZBIAS_W_CONSTANT              0x42B0
 
 /* This register needs to be set to (1<<1) for RV350 to correctly
    perform depth test (see --vb-triangles in r300_demo)
    Don't know about other chips. - Vladimir
+   This is set to 3 when GL_POLYGON_OFFSET_FILL is on.
     */
 #define R300_RE_OCCLUSION_CNTL             0x42B4
 #      define R300_OCCLUSION_ON                (1<<1)
@@ -698,8 +723,7 @@ I am fairly certain that they are correct unless stated otherwise in comments.
 #       define R300_TXO_OFFSET_SHIFT             5
 /* END */
 #define R300_TX_UNK4_0                      0x4580
-#define R300_TX_UNK5_0                      0x45C0
-#define R300_TX_BORDER_COLOR_0              0x45F0 //ff00ff00 == { 0, 1.0, 0, 1.0 }
+#define R300_TX_BORDER_COLOR_0              0x45C0 //ff00ff00 == { 0, 1.0, 0, 1.0 }
 
 /* END */