revision 1142:fd82bfba61c4
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 1142:fd82bfba61c4 |
parent | 1141:dc60a0987db9 |
child | 1143:8ec0f1f990aa |
author | nkeynes |
date | Tue Oct 26 18:41:01 2010 +1000 (13 years ago) |
Fix call to isGLMultitextureSuppported() in texcache
Add debug helper to print idx4 textures on console
Change pvr2_scene_dump() to just dump to stdout
Add debug helper to print idx4 textures on console
Change pvr2_scene_dump() to just dump to stdout
1.1 --- a/src/pvr2/scene.c Tue Oct 26 09:22:22 2010 +10001.2 +++ b/src/pvr2/scene.c Tue Oct 26 18:41:01 2010 +10001.3 @@ -936,7 +936,7 @@1.4 /**1.5 * Dump the current scene to file in a (mostly) human readable form1.6 */1.7 -void pvr2_scene_dump( FILE *f )1.8 +void pvr2_scene_print( FILE *f )1.9 {1.10 int i,j;1.12 @@ -974,3 +974,8 @@1.13 }1.15 }1.16 +1.17 +void pvr2_scene_dump()1.18 +{1.19 + pvr2_scene_print(stdout);1.20 +}
2.1 --- a/src/pvr2/texcache.c Tue Oct 26 09:22:22 2010 +10002.2 +++ b/src/pvr2/texcache.c Tue Oct 26 18:41:01 2010 +10002.3 @@ -94,7 +94,7 @@2.4 int i;2.5 GLuint texids[MAX_TEXTURES];2.7 - if( glsl_is_supported() && isGLMultitextureSupported ) {2.8 + if( glsl_is_supported() && isGLMultitextureSupported() ) {2.9 texcache_have_palette_shader = TRUE;2.10 texcache_palette_valid = FALSE;2.11 glGenTextures(1, &texcache_palette_texid );2.12 @@ -898,3 +898,19 @@2.13 }2.14 }2.15 }2.16 +2.17 +void texcache_print_idx4( uint32_t texture_addr, int width )2.18 +{2.19 + unsigned x,y;2.20 + int src_bytes = (width*width>>1);2.21 + char tmp[src_bytes];2.22 + char data[width*width];2.23 + pvr2_vram64_read_twiddled_4( tmp, texture_addr, width, width );2.24 + decode_pal4_to_pal8( data, tmp, src_bytes );2.25 + for( y=0; y<width; y++ ) {2.26 + for( x=0; x<width; x++ ) {2.27 + printf( "%1x", data[y*width+x] );2.28 + }2.29 + printf( "\n" );2.30 + }2.31 +}
.