Search
lxdream.org :: lxdream/src/pvr2/texcache.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/texcache.c
changeset 291:cb3e8f0ac24a
prev289:111dfb1516a6
next300:a8ae4aeb0b42
author nkeynes
date Mon Jan 15 12:58:05 2007 +0000 (17 years ago)
permissions -rw-r--r--
last change Correct declaration of pvr2_vram64_read_stride
file annotate diff log raw
1.1 --- a/src/pvr2/texcache.c Mon Jan 15 12:17:02 2007 +0000
1.2 +++ b/src/pvr2/texcache.c Mon Jan 15 12:58:05 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: texcache.c,v 1.13 2007-01-15 12:17:02 nkeynes Exp $
1.6 + * $Id: texcache.c,v 1.14 2007-01-15 12:57:42 nkeynes Exp $
1.7 *
1.8 * Texture cache. Responsible for maintaining a working set of OpenGL
1.9 * textures.
1.10 @@ -397,10 +397,10 @@
1.11 char data[(width*height) << bpp_shift];
1.12 if( tex_format == PVR2_TEX_FORMAT_YUV422 ) {
1.13 char tmp[(width*height)<<1];
1.14 - pvr2_vram64_read_stride( &tmp, width<<1, texture_addr, stride<<1, height );
1.15 - yuv_decode(width, height, &tmp, &data );
1.16 + pvr2_vram64_read_stride( tmp, width<<1, texture_addr, stride<<1, height );
1.17 + yuv_decode(width, height, (uint32_t *)tmp, (uint32_t *)data );
1.18 } else {
1.19 - pvr2_vram64_read_stride( &data, width<<bpp_shift, texture_addr, stride<<bpp_shift, height );
1.20 + pvr2_vram64_read_stride( data, width<<bpp_shift, texture_addr, stride<<bpp_shift, height );
1.21 }
1.22 glTexImage2D( GL_TEXTURE_2D, 0, intFormat, width, height, 0, format, type, data );
1.23 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter);
1.24 @@ -447,19 +447,19 @@
1.25 int inputlength = ((mip_width*mip_height)<<1);
1.26 char tmp[inputlength];
1.27 pvr2_vram64_read( tmp, texture_addr, inputlength );
1.28 - yuv_decode( mip_width, mip_height, tmp, (uint32_t *)&data );
1.29 + yuv_decode( mip_width, mip_height, (uint32_t *)tmp, (uint32_t *)data );
1.30 } else if( PVR2_TEX_IS_COMPRESSED(mode) ) {
1.31 int inputlength = ((mip_width*mip_height) >> 2);
1.32 char tmp[inputlength];
1.33 pvr2_vram64_read( tmp, texture_addr, inputlength );
1.34 - vq_decode( mip_width, mip_height, tmp, (uint16_t *)&data, &codebook,
1.35 + vq_decode( mip_width, mip_height, tmp, (uint16_t *)data, &codebook,
1.36 PVR2_TEX_IS_TWIDDLED(mode) );
1.37 } else if( PVR2_TEX_IS_TWIDDLED(mode) ) {
1.38 char tmp[mip_bytes];
1.39 uint16_t *p = (uint16_t *)tmp;
1.40 pvr2_vram64_read( tmp, texture_addr, mip_bytes );
1.41 /* Untwiddle */
1.42 - detwiddle_16_to_16( 0, 0, mip_width, mip_width, &p, (uint16_t *)&data );
1.43 + detwiddle_16_to_16( 0, 0, mip_width, mip_width, &p, (uint16_t *)data );
1.44 } else {
1.45 pvr2_vram64_read( data, texture_addr, mip_bytes );
1.46 }
.