1.1 --- a/src/pvr2/texcache.c Sun Sep 28 00:29:37 2008 +0000
1.2 +++ b/src/pvr2/texcache.c Sun Oct 19 05:09:31 2008 +0000
1.3 @@ -653,16 +653,12 @@
1.6 texcache_entry_t entry = &texcache_active_list[slot];
1.7 - if( entry->width != width || entry->height != height ) {
1.8 - glBindTexture(GL_TEXTURE_2D, entry->texture_id );
1.9 - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
1.10 - if( entry->buffer != NULL ) {
1.11 - texcache_release_render_buffer(entry->buffer);
1.14 + if( entry->buffer == NULL ) {
1.15 entry->buffer = pvr2_create_render_buffer( texture_addr, width, height, entry->texture_id );
1.17 - if( entry->buffer == NULL )
1.18 - entry->buffer = pvr2_create_render_buffer( texture_addr, width, height, entry->texture_id );
1.19 + } else if( entry->buffer->width != width || entry->buffer->height != height ) {
1.20 + texcache_release_render_buffer(entry->buffer);
1.21 + entry->buffer = pvr2_create_render_buffer( texture_addr, width, height, entry->texture_id );
1.24 return entry->buffer;