Search
lxdream.org :: lxdream/src/pvr2/texcache.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/texcache.c
changeset 107:e576dd36073a
prev103:9b9cfc5855e0
next108:565de331ccec
author nkeynes
date Tue Mar 14 13:02:06 2006 +0000 (18 years ago)
permissions -rw-r--r--
last change Make sure subfunctions are initted
Fix stupid sign bug in texcache
file annotate diff log raw
1.1 --- a/src/pvr2/texcache.c Mon Mar 13 12:39:07 2006 +0000
1.2 +++ b/src/pvr2/texcache.c Tue Mar 14 13:02:06 2006 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: texcache.c,v 1.1 2006-03-13 12:39:07 nkeynes Exp $
1.6 + * $Id: texcache.c,v 1.2 2006-03-14 13:02:06 nkeynes Exp $
1.7 *
1.8 * Texture cache. Responsible for maintaining a working set of OpenGL
1.9 * textures.
1.10 @@ -38,9 +38,9 @@
1.11 */
1.12
1.13 typedef signed short texcache_entry_index;
1.14 -#define EMPTY_ENTRY -1
1.15 +#define EMPTY_ENTRY 0xFF
1.16
1.17 -static texcache_entry_index texcache_free_ptr;
1.18 +static texcache_entry_index texcache_free_ptr = 0;
1.19 static GLuint texcache_free_list[MAX_TEXTURES];
1.20
1.21 typedef struct texcache_entry {
1.22 @@ -118,7 +118,7 @@
1.23 texcache_entry_index idx = texcache_page_lookup[texture_page];
1.24 if( idx == EMPTY_ENTRY )
1.25 return;
1.26 - assert( texcache_free_ptr > 0 );
1.27 + assert( texcache_free_ptr >= 0 );
1.28 do {
1.29 texcache_entry_t entry = &texcache_active_list[idx];
1.30 /* release entry */
.