diff options
author | Ian Romanick <[email protected]> | 2009-09-10 15:33:45 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2009-09-10 15:33:45 -0700 |
commit | b8e1e8d2d8ae6ffbf8f271b46ee89788a926b3b0 (patch) | |
tree | 5db502ab80287bfc8ff61082784017c7448464f5 /src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c | |
parent | 81722c5d7e8e93d837510b9e6e5d014ec64cf4b3 (diff) | |
parent | d9dc4cb0e4f578da9e50c9d1ba6fd9c22ea2fca6 (diff) |
Merge branch 'master' into asm-shader-rework-2
Conflicts:
src/mesa/shader/lex.yy.c
src/mesa/shader/program_parse.tab.c
src/mesa/shader/program_parse.tab.h
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c index d9f17cfc58c..38db305e2a7 100644 --- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c +++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c @@ -190,13 +190,14 @@ static void calculate_miptree_layout_r300(radeonContextPtr rmesa, radeon_mipmap_ * Create a new mipmap tree, calculate its layout and allocate memory. */ radeon_mipmap_tree* radeon_miptree_create(radeonContextPtr rmesa, radeonTexObj *t, - GLenum target, GLuint firstLevel, GLuint lastLevel, + GLenum target, GLenum internal_format, GLuint firstLevel, GLuint lastLevel, GLuint width0, GLuint height0, GLuint depth0, GLuint bpp, GLuint tilebits, GLuint compressed) { radeon_mipmap_tree *mt = CALLOC_STRUCT(_radeon_mipmap_tree); mt->radeon = rmesa; + mt->internal_format = internal_format; mt->refcount = 1; mt->t = t; mt->target = target; @@ -318,8 +319,8 @@ GLboolean radeon_miptree_matches_image(radeon_mipmap_tree *mt, if (face >= mt->faces || level < mt->firstLevel || level > mt->lastLevel) return GL_FALSE; - if ((!texImage->IsCompressed && mt->compressed) || - (texImage->IsCompressed && !mt->compressed)) + if (texImage->InternalFormat != mt->internal_format || + texImage->IsCompressed != mt->compressed) return GL_FALSE; if (!texImage->IsCompressed && @@ -369,9 +370,9 @@ GLboolean radeon_miptree_matches_texture(radeon_mipmap_tree *mt, struct gl_textu * given image in the given position. */ void radeon_try_alloc_miptree(radeonContextPtr rmesa, radeonTexObj *t, - struct gl_texture_image *texImage, GLuint face, GLuint level) + radeon_texture_image *image, GLuint face, GLuint level) { - GLuint compressed = texImage->IsCompressed ? texImage->TexFormat->MesaFormat : 0; + GLuint compressed = image->base.IsCompressed ? image->base.TexFormat->MesaFormat : 0; GLuint numfaces = 1; GLuint firstLevel, lastLevel; @@ -385,9 +386,10 @@ void radeon_try_alloc_miptree(radeonContextPtr rmesa, radeonTexObj *t, return; t->mt = radeon_miptree_create(rmesa, t, t->base.Target, + image->base.InternalFormat, firstLevel, lastLevel, - texImage->Width, texImage->Height, texImage->Depth, - texImage->TexFormat->TexelBytes, t->tile_bits, compressed); + image->base.Width, image->base.Height, image->base.Depth, + image->base.TexFormat->TexelBytes, t->tile_bits, compressed); } /* Although we use the image_offset[] array to store relative offsets |