diff options
author | Dave Airlie <airlied@redhat.com> | 2009-02-13 23:02:12 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-02-13 23:02:12 +1000 |
commit | ed8340192ef88bd841966aba10d0043b246805bd (patch) | |
tree | 1e0171547107f337fcdb4deaecd456890b72f906 /src | |
parent | 9fd8da299b4a62c6baf49f08067d7c1ddebb0ffd (diff) |
radeon: revert unneeded change to texturing code
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_texture.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index eb87a0dac5..2b04245a39 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -511,11 +511,8 @@ static void radeon_teximage( int size; if (texImage->IsCompressed) { size = texImage->CompressedSize; - dstRowStride = - _mesa_compressed_row_stride(texImage->TexFormat->MesaFormat, width); } else { size = texImage->Width * texImage->Height * texImage->Depth * texImage->TexFormat->TexelBytes; - dstRowStride = postConvWidth * texelBytes; } texImage->Data = _mesa_alloc_texmemory(size); } @@ -536,6 +533,14 @@ static void radeon_teximage( if (compressed) { memcpy(texImage->Data, pixels, imageSize); } else { + GLuint dstRowStride; + if (image->mt) { + radeon_mipmap_level *lvl = &image->mt->levels[image->mtlevel]; + dstRowStride = lvl->rowstride; + } else { + dstRowStride = texImage->Width * texImage->TexFormat->TexelBytes; + } + if (!texImage->TexFormat->StoreImage(ctx, dims, texImage->_BaseFormat, texImage->TexFormat, |