Search
lxdream.org :: lxdream :: r107:e576dd36073a
lxdream 0.9.1
released Jun 29
Download Now
changeset107:e576dd36073a
parent106:9048bac046c3
child108:565de331ccec
authornkeynes
dateTue Mar 14 13:02:06 2006 +0000 (14 years ago)
Make sure subfunctions are initted
Fix stupid sign bug in texcache
src/pvr2/pvr2.c
src/pvr2/texcache.c
1.1 --- a/src/pvr2/pvr2.c Tue Mar 14 12:45:53 2006 +0000
1.2 +++ b/src/pvr2/pvr2.c Tue Mar 14 13:02:06 2006 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: pvr2.c,v 1.18 2006-03-14 12:45:53 nkeynes Exp $
1.6 + * $Id: pvr2.c,v 1.19 2006-03-14 13:02:06 nkeynes Exp $
1.7 *
1.8 * PVR2 (Video) Core MMIO registers.
1.9 *
1.10 @@ -61,6 +61,8 @@
1.11 register_io_region( &mmio_region_PVR2PAL );
1.12 register_io_region( &mmio_region_PVR2TA );
1.13 video_base = mem_get_region_by_name( MEM_REGION_VIDEO );
1.14 + pvr2_render_init();
1.15 + texcache_init();
1.16 }
1.17
1.18 void video_set_driver( video_driver_t driver )
2.1 --- a/src/pvr2/texcache.c Tue Mar 14 12:45:53 2006 +0000
2.2 +++ b/src/pvr2/texcache.c Tue Mar 14 13:02:06 2006 +0000
2.3 @@ -1,5 +1,5 @@
2.4 /**
2.5 - * $Id: texcache.c,v 1.1 2006-03-13 12:39:07 nkeynes Exp $
2.6 + * $Id: texcache.c,v 1.2 2006-03-14 13:02:06 nkeynes Exp $
2.7 *
2.8 * Texture cache. Responsible for maintaining a working set of OpenGL
2.9 * textures.
2.10 @@ -38,9 +38,9 @@
2.11 */
2.12
2.13 typedef signed short texcache_entry_index;
2.14 -#define EMPTY_ENTRY -1
2.15 +#define EMPTY_ENTRY 0xFF
2.16
2.17 -static texcache_entry_index texcache_free_ptr;
2.18 +static texcache_entry_index texcache_free_ptr = 0;
2.19 static GLuint texcache_free_list[MAX_TEXTURES];
2.20
2.21 typedef struct texcache_entry {
2.22 @@ -118,7 +118,7 @@
2.23 texcache_entry_index idx = texcache_page_lookup[texture_page];
2.24 if( idx == EMPTY_ENTRY )
2.25 return;
2.26 - assert( texcache_free_ptr > 0 );
2.27 + assert( texcache_free_ptr >= 0 );
2.28 do {
2.29 texcache_entry_t entry = &texcache_active_list[idx];
2.30 /* release entry */
.