diff options
author | Brian Paul <[email protected]> | 2009-10-13 10:37:39 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-10-13 10:38:34 -0600 |
commit | 83f4e72009e2ee03ec1175bd3e6e309e605c2bd1 (patch) | |
tree | 755054208fbbcadc9a21f424bbfd11cc61fc0a30 /src | |
parent | 89bb33fb20e69d9fa5325da10abf31d61d51d371 (diff) |
intel: fix broken sw generate mipmap path
Need to restore code that fixed up the intel_texture_image state.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_tex.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/intel/intel_tex.c index 3cbc379dbd3..215a534a5c5 100644 --- a/src/mesa/drivers/dri/intel/intel_tex.c +++ b/src/mesa/drivers/dri/intel/intel_tex.c @@ -177,6 +177,28 @@ intelGenerateMipmap(GLcontext *ctx, GLenum target, intel_tex_map_level_images(intel, intelObj, texObj->BaseLevel); _mesa_generate_mipmap(ctx, target, texObj); intel_tex_unmap_level_images(intel, intelObj, texObj->BaseLevel); + + { + GLuint nr_faces = (texObj->Target == GL_TEXTURE_CUBE_MAP) ? 6 : 1; + GLuint face, i; + /* Update the level information in our private data in the new images, + * since it didn't get set as part of a normal TexImage path. + */ + for (face = 0; face < nr_faces; face++) { + for (i = texObj->BaseLevel + 1; i < texObj->MaxLevel; i++) { + struct intel_texture_image *intelImage = + intel_texture_image(texObj->Image[face][i]); + if (!intelImage) + break; + intelImage->level = i; + intelImage->face = face; + /* Unreference the miptree to signal that the new Data is a + * bare pointer from mesa. + */ + intel_miptree_release(intel, &intelImage->mt); + } + } + } } else { _mesa_meta_GenerateMipmap(ctx, target, texObj); |