diff options
author | Maciej Cencora <[email protected]> | 2009-11-14 14:55:13 +0100 |
---|---|---|
committer | Maciej Cencora <[email protected]> | 2009-11-14 16:55:34 +0100 |
commit | 7628b06ba32e42f57a4fdb322bc32e3b411c1f18 (patch) | |
tree | e2ea49c502661650a73f2133d2a3741de5291df2 /src/mesa/drivers/dri/r300/r300_tex.c | |
parent | 6e5d473cc16ca2d001df213fc1d907f2943a95bb (diff) |
radeon: rework mipmap tree reference counting
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_tex.c')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_tex.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_tex.c b/src/mesa/drivers/dri/r300/r300_tex.c index 427237d200b..7e94e93df2e 100644 --- a/src/mesa/drivers/dri/r300/r300_tex.c +++ b/src/mesa/drivers/dri/r300/r300_tex.c @@ -228,11 +228,8 @@ static void r300TexParameter(GLcontext * ctx, GLenum target, * we just have to rely on loading the right subset of mipmap levels * to simulate a clamped LOD. */ - if (t->mt) { - radeon_miptree_unreference(t->mt); - t->mt = 0; - t->validated = GL_FALSE; - } + radeon_miptree_unreference(&t->mt); + t->validated = GL_FALSE; break; case GL_DEPTH_TEXTURE_MODE: @@ -286,10 +283,8 @@ static void r300DeleteTexture(GLcontext * ctx, struct gl_texture_object *texObj) t->bo = NULL; } - if (t->mt) { - radeon_miptree_unreference(t->mt); - t->mt = 0; - } + radeon_miptree_unreference(&t->mt); + _mesa_delete_texture_object(ctx, texObj); } |