diff options
author | Brian Paul <brianp@vmware.com> | 2009-11-18 22:12:38 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-11-18 22:12:39 -0700 |
commit | 53ca30040ca91a8e888d3e8bd2706f8ec6de75d7 (patch) | |
tree | 7fb4101a6f5192b4df314b0676f058187647e6dd | |
parent | e6d44ab2b9b6646ee93ec032b32e60ad40fb10b5 (diff) |
intel: don't pass base_format to intel_miptree_create()
Just compute it locally.
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_mipmap_tree.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_tex_image.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_tex_validate.c | 1 |
4 files changed, 1 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 3ae49387f7..2d18b72c59 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c @@ -135,7 +135,6 @@ intel_miptree_create_internal(struct intel_context *intel, struct intel_mipmap_tree * intel_miptree_create(struct intel_context *intel, GLenum target, - GLenum base_format, gl_format format, GLuint first_level, GLuint last_level, @@ -147,6 +146,7 @@ intel_miptree_create(struct intel_context *intel, struct intel_mipmap_tree *mt; uint32_t tiling; const GLuint compress_byte = intel_compressed_num_bytes(format); + const GLenum base_format = _mesa_get_format_base_format(format); /* Determine tiling mode, if any */ if (intel->use_texture_tiling && compress_byte == 0 && diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h index bf5975090b..738313139e 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h @@ -131,7 +131,6 @@ struct intel_mipmap_tree struct intel_mipmap_tree *intel_miptree_create(struct intel_context *intel, GLenum target, - GLenum base_format, gl_format format, GLuint first_level, GLuint last_level, diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index b42b9aadba..41ba414410 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_image.c +++ b/src/mesa/drivers/dri/intel/intel_tex_image.c @@ -129,7 +129,6 @@ guess_and_alloc_mipmap_tree(struct intel_context *intel, intelObj->mt = intel_miptree_create(intel, intelObj->base.Target, - intelImage->base._BaseFormat, intelImage->base.TexFormat, firstLevel, lastLevel, @@ -358,14 +357,11 @@ intelTexImage(GLcontext * ctx, assert(intelImage->mt); } else if (intelImage->base.Border == 0) { - GLenum baseFormat = _mesa_get_format_base_format(intelImage->base.TexFormat); - /* Didn't fit in the object miptree, but it's suitable for inclusion in * a miptree, so create one just for our level and store it in the image. * It'll get moved into the object miptree at validate time. */ intelImage->mt = intel_miptree_create(intel, target, - baseFormat, texImage->TexFormat, level, level, width, height, depth, diff --git a/src/mesa/drivers/dri/intel/intel_tex_validate.c b/src/mesa/drivers/dri/intel/intel_tex_validate.c index ca6c9e333a..65cdd1a47e 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_validate.c +++ b/src/mesa/drivers/dri/intel/intel_tex_validate.c @@ -191,7 +191,6 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit) if (!intelObj->mt) { intelObj->mt = intel_miptree_create(intel, intelObj->base.Target, - firstImage->base._BaseFormat, firstImage->base.TexFormat, intelObj->firstLevel, intelObj->lastLevel, |