diff options
author | Dave Airlie <airlied@redhat.com> | 2009-02-10 04:54:24 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-02-10 04:54:24 +1000 |
commit | ccf7814a315f0be05cdc36ca358e2917a3d4ac19 (patch) | |
tree | a7a480862ab4eec149451551a3669cb46e5e84ca /src/mesa/drivers/dri/radeon/radeon_tex.c | |
parent | 9df844b109a9d2cc1d3b16315c34ef84f147c5b6 (diff) |
radeon: major cleanups removing old dead codepaths.
This should be working gears on radeon state
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_tex.c')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_tex.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex.c b/src/mesa/drivers/dri/radeon/radeon_tex.c index 8784dcc5ed..16bd87a8dc 100644 --- a/src/mesa/drivers/dri/radeon/radeon_tex.c +++ b/src/mesa/drivers/dri/radeon/radeon_tex.c @@ -171,6 +171,9 @@ static void radeonSetTexFilter( radeonTexObjPtr t, GLenum minf, GLenum magf ) { GLuint anisotropy = (t->pp_txfilter & RADEON_MAX_ANISO_MASK); + /* Force revalidation to account for switches from/to mipmapping. */ + t->validated = GL_FALSE; + t->pp_txfilter &= ~(RADEON_MIN_FILTER_MASK | RADEON_MAG_FILTER_MASK); /* r100 chips can't handle mipmaps/aniso for cubemap/volume textures */ @@ -343,12 +346,17 @@ static void radeonTexParameter( GLcontext *ctx, GLenum target, case GL_TEXTURE_MAX_LEVEL: case GL_TEXTURE_MIN_LOD: case GL_TEXTURE_MAX_LOD: + /* This isn't the most efficient solution but there doesn't appear to * be a nice alternative. Since there's no LOD clamping, * we just have to rely on loading the right subset of mipmap levels * to simulate a clamped LOD. */ - driSwapOutTextureObject( (driTextureObject *) t ); + if (t->mt) { + radeon_miptree_unreference(t->mt); + t->mt = 0; + t->validated = GL_FALSE; + } break; default: |