? depend
? ff.patch
? r300-mipmap.patch
? server
Index: r300_cmdbuf.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_cmdbuf.c,v
retrieving revision 1.46
diff -u -b -B -u -r1.46 r300_cmdbuf.c
--- r300_cmdbuf.c	3 Sep 2005 16:39:57 -0000	1.46
+++ r300_cmdbuf.c	17 Sep 2005 13:27:03 -0000
@@ -567,7 +567,7 @@
 		  GLint srcx, GLint srcy,
 		  GLint dstx, GLint dsty, GLuint w, GLuint h)
 {
-	drm_radeon_cmd_header_t *cmd;
+	drm_r300_cmd_header_t *cmd;
 
 	if (RADEON_DEBUG & DEBUG_IOCTL)
 		fprintf(stderr,
@@ -582,13 +582,13 @@
 	assert(w < (1 << 16));
 	assert(h < (1 << 16));
 
-	cmd =
-	    (drm_radeon_cmd_header_t *) r300AllocCmdBuf(rmesa, 8,
+	cmd = (drm_r300_cmd_header_t *) r300AllocCmdBuf(rmesa, 8,
 							__FUNCTION__);
 
-	cmd[0].header.cmd_type = R300_CMD_PACKET3;
-	cmd[1].i = R200_CP_CMD_BITBLT_MULTI | (5 << 16);
-	cmd[2].i = (RADEON_GMC_SRC_PITCH_OFFSET_CNTL |
+	cmd[0].packet3.cmd_type = R300_CMD_PACKET3;
+	cmd[0].packet3.packet = R300_CMD_PACKET3_RAW;
+	cmd[1].u = R200_CP_CMD_BITBLT_MULTI | (5 << 16);
+	cmd[2].u = (RADEON_GMC_SRC_PITCH_OFFSET_CNTL |
 		    RADEON_GMC_DST_PITCH_OFFSET_CNTL |
 		    RADEON_GMC_BRUSH_NONE |
 		    (color_fmt << 8) |
@@ -597,28 +597,24 @@
 		    RADEON_DP_SRC_SOURCE_MEMORY |
 		    RADEON_GMC_CLR_CMP_CNTL_DIS | RADEON_GMC_WR_MSK_DIS);
 
-	cmd[3].i = ((src_pitch / 64) << 22) | (src_offset >> 10);
-	cmd[4].i = ((dst_pitch / 64) << 22) | (dst_offset >> 10);
-	cmd[5].i = (srcx << 16) | srcy;
-	cmd[6].i = (dstx << 16) | dsty;	/* dst */
-	cmd[7].i = (w << 16) | h;
+	cmd[3].u = ((src_pitch / 64) << 22) | (src_offset >> 10);
+	cmd[4].u = ((dst_pitch / 64) << 22) | (dst_offset >> 10);
+	cmd[5].u = (srcx << 16) | srcy;
+	cmd[6].u = (dstx << 16) | dsty;	/* dst */
+	cmd[7].u = (w << 16) | h;
 }
 
 void r300EmitWait(r300ContextPtr rmesa, GLuint flags)
 {
-	if (rmesa->radeon.dri.drmMinor >= 6) {
-		drm_radeon_cmd_header_t *cmd;
+	drm_r300_cmd_header_t *cmd;
 
 		assert(!(flags & ~(R300_WAIT_2D | R300_WAIT_3D)));
 
-		cmd =
-		    (drm_radeon_cmd_header_t *) r300AllocCmdBuf(rmesa,
-								1,
+	cmd = (drm_r300_cmd_header_t *) r300AllocCmdBuf(rmesa, 1,
 								__FUNCTION__);
-		cmd[0].i = 0;
+	cmd[0].u = 0;
 		cmd[0].wait.cmd_type = R300_CMD_WAIT;
 		cmd[0].wait.flags = flags;
-	}
 }
 
 void r300EmitAOS(r300ContextPtr rmesa, GLuint nr, GLuint offset)
Index: r300_context.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_context.c,v
retrieving revision 1.36
diff -u -b -B -u -r1.36 r300_context.c
--- r300_context.c	9 Sep 2005 23:31:31 -0000	1.36
+++ r300_context.c	17 Sep 2005 13:27:03 -0000
@@ -83,8 +83,7 @@
   {"GL_ARB_multitexture",		NULL},
   {"GL_ARB_texture_border_clamp",	NULL},
   {"GL_ARB_texture_compression",	GL_ARB_texture_compression_functions},
-/* disable until we support it, fixes a few things in ut2004 */
-/*	{"GL_ARB_texture_cube_map",	NULL}, */
+  {"GL_ARB_texture_cube_map",		NULL}, 
   {"GL_ARB_texture_env_add",		NULL},
   {"GL_ARB_texture_env_combine",	NULL},
   {"GL_ARB_texture_env_crossbar",	NULL},
Index: r300_context.h
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_context.h,v
retrieving revision 1.70
diff -u -b -B -u -r1.70 r300_context.h
--- r300_context.h	20 Jul 2005 23:24:55 -0000	1.70
+++ r300_context.h	17 Sep 2005 13:27:03 -0000
@@ -523,11 +523,11 @@
 
 /* Vertex shader state */
 
-/* Tested with rv350 and verified from misc web pages. */
+/* Perhaps more if we store programs in vmem? */
 #define VSF_MAX_FRAGMENT_LENGTH (256*4)
 	
-/* Tested with rv350 and verified from misc web pages. */
-#define VSF_MAX_FRAGMENT_TEMPS (32)
+/* Can be tested with colormat currently. */
+#define VSF_MAX_FRAGMENT_TEMPS (14)
 
 
 struct r300_vertex_shader_fragment {
Index: r300_reg.h
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_reg.h,v
retrieving revision 1.46
diff -u -b -B -u -r1.46 r300_reg.h
--- r300_reg.h	20 Jul 2005 21:35:27 -0000	1.46
+++ r300_reg.h	17 Sep 2005 13:27:04 -0000
@@ -727,6 +727,7 @@
 #	define R300_TX_FORMAT_G8R8_G8B8	    	    0x15     /* no swizzle */
 						  /* 0x16 - some 16 bit green format.. ?? */
 #	define R300_TX_FORMAT_UNK25		   (1 << 25) /* no swizzle */
+#	define R300_TX_FORMAT_CUBIC_MAP		   (1 << 26)
 
 	/* gap */
 	/* Floating point formats */
Index: r300_tex.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_tex.c,v
retrieving revision 1.15
diff -u -b -B -u -r1.15 r300_tex.c
--- r300_tex.c	20 Jul 2005 21:35:27 -0000	1.15
+++ r300_tex.c	17 Sep 2005 13:27:05 -0000
@@ -220,10 +220,10 @@
 			t->filter |= R300_TX_MIN_FILTER_NEAREST_MIP_NEAREST;
 			break;
 		case GL_NEAREST_MIPMAP_LINEAR:
-			t->filter |= R300_TX_MIN_FILTER_LINEAR_MIP_NEAREST;
+			t->filter |= R300_TX_MIN_FILTER_NEAREST_MIP_LINEAR;
 			break;
 		case GL_LINEAR_MIPMAP_NEAREST:
-			t->filter |= R300_TX_MIN_FILTER_NEAREST_MIP_LINEAR;
+			t->filter |= R300_TX_MIN_FILTER_LINEAR_MIP_NEAREST;
 			break;
 		case GL_LINEAR_MIPMAP_LINEAR:
 			t->filter |= R300_TX_MIN_FILTER_LINEAR_MIP_LINEAR;
@@ -826,9 +826,9 @@
 				R200_STATECHANGE(rmesa, tf);
 				rmesa->hw.tf.cmd[TF_TFACTOR_0 + unit] =
 				    envColor;
-			}
+			}*/
 			break;
-		*/}
+		}
 
 	case GL_TEXTURE_LOD_BIAS_EXT:{
 			GLfloat bias, min;
Index: r300_texstate.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_texstate.c,v
retrieving revision 1.28
diff -u -b -B -u -r1.28 r300_texstate.c
--- r300_texstate.c	3 Sep 2005 16:39:57 -0000	1.28
+++ r300_texstate.c	17 Sep 2005 13:27:06 -0000
@@ -308,9 +308,8 @@
 		t->format_x |= R200_TEXCOORD_VOLUME;
 	} else if (tObj->Target == GL_TEXTURE_CUBE_MAP) {
 		ASSERT(log2Width == log2Height);
-		t->format |= ((log2Width << R200_TXFORMAT_F5_WIDTH_SHIFT) |
-				   (log2Height << R200_TXFORMAT_F5_HEIGHT_SHIFT)
-				   | (R200_TXFORMAT_CUBIC_MAP_ENABLE));
+		t->format |= R300_TX_FORMAT_CUBIC_MAP;
+		
 		t->format_x |= R200_TEXCOORD_CUBIC_ENV;
 		t->pp_cubic_faces = ((log2Width << R200_FACE_WIDTH_1_SHIFT) |
 				     (log2Height << R200_FACE_HEIGHT_1_SHIFT) |
Index: r300_vertexprog.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_vertexprog.c,v
retrieving revision 1.30
diff -u -b -B -u -r1.30 r300_vertexprog.c
--- r300_vertexprog.c	20 Jul 2005 23:24:55 -0000	1.30
+++ r300_vertexprog.c	17 Sep 2005 13:27:06 -0000
@@ -597,6 +597,7 @@
 		   Ops that need temp vars should probably be given reg indexes starting at the end of tmp area. */
 		switch(vpi->Opcode){
 		case VP_OPCODE_MOV://ADD RESULT 1.X Y Z W PARAM 0{} {X Y Z W} PARAM 0{} {ZERO ZERO ZERO ZERO} 
+#if 0
 			o_inst->op=MAKE_VSF_OP(R300_VPI_OUT_OP_ADD, t_dst_index(vp, &vpi->DstReg),
 					t_dst_mask(vpi->DstReg.WriteMask), t_dst_class(vpi->DstReg.File));
 			o_inst->src1=t_src(vp, &src[0]);
@@ -606,6 +607,23 @@
 					t_src_class(src[0].File), VSF_FLAG_NONE);
 
 			o_inst->src3=0;
+#else
+			hw_op=(src[0].File == PROGRAM_TEMPORARY) ? R300_VPI_OUT_OP_MAD_2 : R300_VPI_OUT_OP_MAD;
+			
+			o_inst->op=MAKE_VSF_OP(hw_op, t_dst_index(vp, &vpi->DstReg),
+				t_dst_mask(vpi->DstReg.WriteMask), t_dst_class(vpi->DstReg.File));
+			o_inst->src1=t_src(vp, &src[0]);
+			o_inst->src2=MAKE_VSF_SOURCE(t_src_index(vp, &src[0]),
+					SWIZZLE_ONE, SWIZZLE_ONE,
+					SWIZZLE_ONE, SWIZZLE_ONE,
+					t_src_class(src[0].File), VSF_FLAG_NONE);
+
+
+			o_inst->src3=MAKE_VSF_SOURCE(t_src_index(vp, &src[1]),
+					SWIZZLE_ZERO, SWIZZLE_ZERO,
+					SWIZZLE_ZERO, SWIZZLE_ZERO,
+					t_src_class(src[1].File), VSF_FLAG_NONE);
+#endif			
 
 			goto next;
 			
