revision 324:340f0b0b7af3
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 324:340f0b0b7af3 |
parent | 323:067583c1a704 |
child | 325:5717ae5d4746 |
author | nkeynes |
date | Thu Jan 25 10:12:54 2007 +0000 (17 years ago) |
Fix 16-bit palette offsets
1.1 --- a/src/pvr2/texcache.c Thu Jan 25 08:21:56 2007 +00001.2 +++ b/src/pvr2/texcache.c Thu Jan 25 10:12:54 2007 +00001.3 @@ -1,5 +1,5 @@1.4 /**1.5 - * $Id: texcache.c,v 1.20 2007-01-25 08:16:02 nkeynes Exp $1.6 + * $Id: texcache.c,v 1.21 2007-01-25 10:12:54 nkeynes Exp $1.7 *1.8 * Texture cache. Responsible for maintaining a working set of OpenGL1.9 * textures.1.10 @@ -404,7 +404,7 @@1.11 if( tex_format == PVR2_TEX_FORMAT_IDX8 ) {1.12 int inputlength = mip_bytes >> bpp_shift;1.13 int bank = (mode >> 25) &0x03;1.14 - uint32_t *palette = (uint32_t *)(mmio_region_PVR2PAL.mem + (bank * (256 << bpp_shift)));1.15 + uint32_t *palette = ((uint32_t *)mmio_region_PVR2PAL.mem) + (bank<<8);1.16 char tmp[inputlength];1.17 pvr2_vram64_read_twiddled_8( tmp, texture_addr, mip_width, mip_height );1.18 if( bpp_shift == 2 ) {1.19 @@ -415,7 +415,7 @@1.20 } else if( tex_format == PVR2_TEX_FORMAT_IDX4 ) {1.21 int inputlength = (mip_width * mip_height) >> 1;1.22 int bank = (mode >>21 ) & 0x3F;1.23 - uint32_t *palette = (uint32_t *)(mmio_region_PVR2PAL.mem + (bank * (16 << bpp_shift)));1.24 + uint32_t *palette = ((uint32_t *)mmio_region_PVR2PAL.mem) + (bank<<4);1.25 char tmp[inputlength];1.26 pvr2_vram64_read_twiddled_4( tmp, texture_addr, mip_width, mip_height );1.27 if( bpp_shift == 2 ) {
.