Search
lxdream.org :: lxdream :: r291:cb3e8f0ac24a
lxdream 0.9.1
released Jun 29
Download Now
changeset291:cb3e8f0ac24a
parent290:4d11ef6766be
child292:3b78f6d301b7
authornkeynes
dateMon Jan 15 12:57:42 2007 +0000 (12 years ago)
Tidy up pointer types
src/pvr2/texcache.c
1.1 --- a/src/pvr2/texcache.c Mon Jan 15 12:57:12 2007 +0000
1.2 +++ b/src/pvr2/texcache.c Mon Jan 15 12:57:42 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 }
.