- /* Use actual texture offset */
-
- fprintf(stderr,"pp_border_color=%08x pp_cubic_faces=%08x format=%08x size=%08x format_x=%08x\n",
- t->pp_border_color, t->pp_cubic_faces, t->format, t->size, t->format_x);
-
- SINGLE_TEXTURE_PIPELINE.texture_unit[0].offset=rmesa->radeon.radeonScreen->fbLocation+t->offset;
- #if 0
- SINGLE_TEXTURE_PIPELINE.texture_unit[0].format=t->format;
- #endif
- SINGLE_TEXTURE_PIPELINE.texture_unit[0].size=t->size;
- SINGLE_TEXTURE_PIPELINE.texture_unit[0].filter=t->filter;
- SINGLE_TEXTURE_PIPELINE.texture_unit[0].unknown1=t->pitch; /* Unknown 1 is pitch ! */
- SINGLE_TEXTURE_PIPELINE.texture_unit[0].filter=t->filter;
-
-
- /* Upload texture, a hack, really we can do a lot better */
- #if 0
- memcpy(rsp->gartTextures.map, to->Image[0][0]->Data, to->Image[0][0]->RowStride*to->Image[0][0]->Height*4);
- #endif
-
- /* Program RS unit. This needs to be moved into R300 pipeline */
-reg_start(R300_RS_CNTL_0,1);
- /* R300_RS_CNTL_0(4300) */
- e32(0x00040084);
- /* RS_INST_COUNT(4304) */
- e32(0x000000c0);
-
-reg_start(R300_RS_ROUTE_0,0);
- e32(0x00024008);
-
-reg_start(R300_RS_INTERP_0,7);
- /* X_MEM0_0(4310) */
- e32(0x00d10000);
- /* X_MEM0_1(4314) */
- e32(0x00d10044);
- /* X_MEM0_2(4318) */
- e32(0x00d10084);
- /* X_MEM0_3(431c) */
- e32(0x00d100c4);
- /* X_MEM0_4(4320) */
- e32(0x00d10004);
- /* X_MEM0_5(4324) */
- e32(0x00d10004);
- /* X_MEM0_6(4328) */
- e32(0x00d10004);
- /* X_MEM0_7(432c) */
- e32(0x00d10004);
-
- reg_start(R300_RS_CNTL_0,0);
- e32(0x00040084);
-
- /* Magic register - note it is right after 20b0 */
-
- reg_start(0x20b4,0);
- e32(0x0000000c);
-
- program_pipeline(PASS_PREFIX &SINGLE_TEXTURE_PIPELINE);
-
- /* We need LOAD_VBPNTR to setup AOS_ATTR fields.. the offsets are irrelevant */
- setup_AOS(PASS_PREFIX vb_arrays, 3);
-
- for(i=0; i < VB->PrimitiveCount; i++){
- GLuint prim = VB->Primitive[i].mode;
- GLuint start = VB->Primitive[i].start;
- GLuint length = VB->Primitive[i].count;
- r300_render_tex_primitive(rmesa, ctx, start, start + length, prim);
- }
-
- /* This sequence is required after any 3d drawing packet
- I suspect it work arounds a bug (or deficiency) in hardware */
-
- reg_start(R300_RB3D_DSTCACHE_CTLSTAT,0);
- e32(0x0000000a);
-
- reg_start(0x4f18,0);
- e32(0x00000003);
-
-// exit(-1);
- fprintf(stderr, "\n");
- return GL_FALSE;