mesa/intel: map/unmap texture objects around mipmap generation function.

This at least stops the compiz brain explosion we were seeing, I do wonder
though if we should somehow be calling intel_generate_mipmap somehow.
This commit is contained in:
Dave Airlie
2008-05-09 13:02:41 +10:00
committed by Dave Airlie
parent 990e010394
commit c50ffc4cb8
2 changed files with 24 additions and 0 deletions

View File

@@ -1542,10 +1542,16 @@ _mesa_GenerateMipmapEXT(GLenum target)
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
texObj = _mesa_select_tex_object(ctx, texUnit, target);
if (ctx->Driver.MapTexture)
ctx->Driver.MapTexture(ctx, texObj);
/* XXX this might not handle cube maps correctly */
_mesa_lock_texture(ctx, texObj);
_mesa_generate_mipmap(ctx, target, texUnit, texObj);
_mesa_unlock_texture(ctx, texObj);
if (ctx->Driver.UnmapTexture)
ctx->Driver.UnmapTexture(ctx, texObj);
}