diff options
author | Nicolai Hähnle <[email protected]> | 2009-10-03 19:30:48 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2009-10-03 19:30:48 +0200 |
commit | 6d25b9125ec1e66e0e255b0ee20fe18dfe1076fa (patch) | |
tree | c376951940eac2875567979a81e6a03a019942b7 /src/mesa/drivers/dri/radeon/radeon_texture.c | |
parent | 81c7561d9d3faf70ac22c6a5f3fbea18f53eed92 (diff) | |
parent | 7d2699aedc084d9cb9c2bd2f8bdb5f038271ac1e (diff) |
Merge branch 'master' into r300-compiler
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_texture.c')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_texture.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index 049284ef8c5..7b7392b2179 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -101,7 +101,12 @@ void radeonFreeTexImageData(GLcontext *ctx, struct gl_texture_image *timage) /* Set Data pointer and additional data for mapped texture image */ static void teximage_set_map_data(radeon_texture_image *image) { - radeon_mipmap_level *lvl = &image->mt->levels[image->mtlevel]; + radeon_mipmap_level *lvl; + + if (!image->mt) + return; + + lvl = &image->mt->levels[image->mtlevel]; image->base.Data = image->mt->bo->ptr + lvl->faces[image->mtface].offset; image->base.RowStride = lvl->rowstride / image->mt->bpp; @@ -969,7 +974,7 @@ int radeon_validate_texture_miptree(GLcontext * ctx, struct gl_texture_object *t radeon_texture_image *image = get_radeon_texture_image(texObj->Image[face][level]); if (RADEON_DEBUG & RADEON_TEXTURE) fprintf(stderr, " face %i, level %i... %p vs %p ", face, level, t->mt, image->mt); - if (t->mt == image->mt) { + if (t->mt == image->mt || (!image->mt && !image->base.Data)) { if (RADEON_DEBUG & RADEON_TEXTURE) fprintf(stderr, "OK\n"); |