1.1 --- a/src/pvr2/tacore.c Sun Aug 06 07:47:26 2006 +0000
1.2 +++ b/src/pvr2/tacore.c Fri Aug 18 12:43:24 2006 +0000
1.5 - * $Id: tacore.c,v 1.8 2006-08-06 07:47:26 nkeynes Exp $
1.6 + * $Id: tacore.c,v 1.9 2006-08-18 12:43:24 nkeynes Exp $
1.8 * PVR2 Tile Accelerator implementation
1.11 int tilelist_dir; /* Growth direction of the tilelist, 0 = up, 1 = down */
1.12 uint32_t tilelist_size; /* Size of the tilelist segments */
1.13 uint32_t tilelist_start; /* Initial address of the tilelist */
1.14 + int polybuf_start; /* Initial bank address of the polygon buffer (ie &0x00F00000) */
1.15 int current_vertex_type;
1.16 gboolean accept_vertexes;
1.17 int vertex_count; /* index of last start-vertex seen, or -1 if no vertexes
1.20 MMIO_WRITE( PVR2, TA_LISTPOS, plistpos );
1.21 ta_status.tilelist_start = plistpos;
1.22 + ta_status.polybuf_start = MMIO_READ( PVR2, TA_POLYBASE ) & 0x00F00000;
1.25 static uint32_t parse_float_colour( float a, float r, float g, float b ) {
1.27 // ta_status.state = STATE_ERROR;
1.30 - *target++ = *data++;
1.31 + if( posn < PVR2_RAM_SIZE ) {
1.32 + *target++ = *data++;
1.40 /* Ok, we're good to go - write out the polygon first */
1.41 - uint32_t tile_entry = MMIO_READ( PVR2, TA_POLYPOS ) >> 2 | ta_status.poly_pointer;
1.42 + uint32_t tile_entry = (MMIO_READ( PVR2, TA_POLYPOS ) - ta_status.polybuf_start) >> 2 |
1.43 + ta_status.poly_pointer;
1.45 int status = ta_write_polygon_buffer( poly_context, ta_status.poly_context_size );