diff options
Diffstat (limited to 'src/mesa/drivers/dri/i830/i830_texmem.c')
-rw-r--r-- | src/mesa/drivers/dri/i830/i830_texmem.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i830/i830_texmem.c b/src/mesa/drivers/dri/i830/i830_texmem.c index 6a30b49655..7faf90874c 100644 --- a/src/mesa/drivers/dri/i830/i830_texmem.c +++ b/src/mesa/drivers/dri/i830/i830_texmem.c @@ -116,6 +116,20 @@ static void i830UploadTexLevel( i830ContextPtr imesa, src += image->Width*2; } } + else if ((t->Setup[I830_TEXREG_TM0S1] & TM0S1_MT_FORMAT_MASK)==MT_COMPRESS_DXT1) + { + for (j = 0 ; j < image->Height/4 ; j++, dst += (t->Pitch)) { + __memcpy(dst, src, (image->Width*2) ); + src += image->Width*2; + } + } + else if (((t->Setup[I830_TEXREG_TM0S1] & TM0S1_MT_FORMAT_MASK)==MT_COMPRESS_DXT2_3) || ((t->Setup[I830_TEXREG_TM0S1] & TM0S1_MT_FORMAT_MASK)==MT_COMPRESS_DXT4_5)) + { + for (j = 0 ; j < image->Height/4 ; j++, dst += (t->Pitch)) { + __memcpy(dst, src, (image->Width*4) ); + src += image->Width*4; + } + } } else if (image->Width * image->TexFormat->TexelBytes == t->Pitch) { GLubyte *dst = (GLubyte *)(t->BufAddr + t->image[0][hwlevel].offset); |