diff options
author | Eric Anholt <eric@anholt.net> | 2011-01-10 10:01:12 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2011-01-10 17:21:10 -0800 |
commit | 5b3eb7538cd9ceb967b6e9e765896183e7c2c4d4 (patch) | |
tree | 220862ba5058742e9330550c995c687737fd07bf /src/mesa/drivers/dri/intel/intel_mipmap_tree.c | |
parent | da0c0dbab060416452e7c96415abef91ec7d64f4 (diff) |
Revert "intel: Always allocate miptrees from level 0, not tObj->BaseLevel."
This reverts commit 7ce6517f3ac41bf770ab39aba4509d4f535ef663.
This reverts commit d60145d06d999c5c76000499e6fa9351e11d17fa.
I was wrong about which generations supported baselevel adjustment --
it's just gen4, nothing earlier. This meant that i915 would have
never used the mag filter when baselevel != 0. Not a severe bug, but
not an intentional regression. I think we can fix the performance
issue another way.
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_mipmap_tree.c')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c index 2ced6ac86b..a3409274fb 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c @@ -56,7 +56,8 @@ static struct intel_mipmap_tree * intel_miptree_create_internal(struct intel_context *intel, GLenum target, GLenum internal_format, - GLuint levels, + GLuint first_level, + GLuint last_level, GLuint width0, GLuint height0, GLuint depth0, GLuint cpp, GLuint compress_byte, @@ -65,14 +66,15 @@ intel_miptree_create_internal(struct intel_context *intel, GLboolean ok; struct intel_mipmap_tree *mt = calloc(sizeof(*mt), 1); - DBG("%s target %s format %s levels %d <-- %p\n", __FUNCTION__, + DBG("%s target %s format %s level %d..%d <-- %p\n", __FUNCTION__, _mesa_lookup_enum_by_nr(target), _mesa_lookup_enum_by_nr(internal_format), - levels, mt); + first_level, last_level, mt); mt->target = target_to_target(target); mt->internal_format = internal_format; - mt->levels = levels; + mt->first_level = first_level; + mt->last_level = last_level; mt->width0 = width0; mt->height0 = height0; mt->depth0 = depth0; @@ -104,7 +106,8 @@ intel_miptree_create(struct intel_context *intel, GLenum target, GLenum base_format, GLenum internal_format, - GLuint levels, + GLuint first_level, + GLuint last_level, GLuint width0, GLuint height0, GLuint depth0, GLuint cpp, GLuint compress_byte, @@ -123,7 +126,7 @@ intel_miptree_create(struct intel_context *intel, } mt = intel_miptree_create_internal(intel, target, internal_format, - levels, width0, + first_level, last_level, width0, height0, depth0, cpp, compress_byte, tiling); /* @@ -161,7 +164,7 @@ intel_miptree_create_for_region(struct intel_context *intel, struct intel_mipmap_tree *mt; mt = intel_miptree_create_internal(intel, target, internal_format, - 1, + 0, 0, region->width, region->height, 1, region->cpp, compress_byte, I915_TILING_NONE); |