diff options
author | Marek Olšák <[email protected]> | 2012-11-11 15:22:32 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-11-12 21:36:56 +0100 |
commit | 8111342e814304730bed34446ea816cbc17a5775 (patch) | |
tree | 90260b9415bd64076d679125fd8adfd75c787ea3 /src/mesa/drivers/dri/nouveau | |
parent | 26097c4855b97ee6e362c19df11d51fb7fd42192 (diff) |
mesa: add MaxNumLevels to gl_texture_image, remove MaxLog2
MaxLog2 led to bugs, because it didn't work well with 1D and 3D textures.
NOTE: This is a candidate for the stable branches.
v2: correct the comment at MaxNumlevels
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/nouveau')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_texture.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c index 37f7577b3d7..288b510e12a 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c @@ -369,7 +369,7 @@ get_last_level(struct gl_texture_object *t) t->Sampler.MinFilter == GL_LINEAR || !base) return t->BaseLevel; else - return MIN2(t->BaseLevel + base->MaxLog2, t->MaxLevel); + return MIN2(t->BaseLevel + base->MaxNumLevels - 1, t->MaxLevel); } static void |