[Mesa-dev] [PATCH 06/11] intel: Drop the internal_format field of the mipmap tree.
Ian Romanick
idr at freedesktop.org
Fri Jun 10 18:06:41 PDT 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 06/10/2011 01:38 PM, Eric Anholt wrote:
> This has been replaced with the gl_format now.
I just want to make sure I grok this. 2/11 and 6/11 just sap
IntenalFormat for TexFormat, right?
> ---
> src/mesa/drivers/dri/intel/intel_fbo.c | 1 -
> src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 10 +++-------
> src/mesa/drivers/dri/intel/intel_mipmap_tree.h | 3 ---
> src/mesa/drivers/dri/intel/intel_tex_image.c | 4 +---
> src/mesa/drivers/dri/intel/intel_tex_validate.c | 1 -
> 5 files changed, 4 insertions(+), 15 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
> index 0520386..ac63557 100644
> --- a/src/mesa/drivers/dri/intel/intel_fbo.c
> +++ b/src/mesa/drivers/dri/intel/intel_fbo.c
> @@ -643,7 +643,6 @@ intel_render_texture(struct gl_context * ctx,
> new_mt = intel_miptree_create(intel, image->TexObject->Target,
> intel_image->base.TexFormat,
> intel_image->base._BaseFormat,
> - intel_image->base.InternalFormat,
> intel_image->level,
> intel_image->level,
> intel_image->base.Width,
> diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
> index 3fdb73d..689755a 100644
> --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
> @@ -56,7 +56,6 @@ static struct intel_mipmap_tree *
> intel_miptree_create_internal(struct intel_context *intel,
> GLenum target,
> gl_format format,
> - GLenum internal_format,
> GLuint first_level,
> GLuint last_level,
> GLuint width0,
> @@ -69,12 +68,11 @@ intel_miptree_create_internal(struct intel_context *intel,
>
> 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),
> + _mesa_get_format_name(format),
> first_level, last_level, mt);
>
> mt->target = target_to_target(target);
> mt->format = format;
> - mt->internal_format = internal_format;
> mt->first_level = first_level;
> mt->last_level = last_level;
> mt->width0 = width0;
> @@ -108,7 +106,6 @@ intel_miptree_create(struct intel_context *intel,
> GLenum target,
> gl_format format,
> GLenum base_format,
> - GLenum internal_format,
> GLuint first_level,
> GLuint last_level,
> GLuint width0,
> @@ -128,7 +125,7 @@ intel_miptree_create(struct intel_context *intel,
> tiling = I915_TILING_X;
> }
>
> - mt = intel_miptree_create_internal(intel, target, format, internal_format,
> + mt = intel_miptree_create_internal(intel, target, format,
> first_level, last_level, width0,
> height0, depth0, cpp, compress_byte,
> tiling);
> @@ -160,14 +157,13 @@ struct intel_mipmap_tree *
> intel_miptree_create_for_region(struct intel_context *intel,
> GLenum target,
> gl_format format,
> - GLenum internal_format,
> struct intel_region *region,
> GLuint depth0,
> GLuint compress_byte)
> {
> struct intel_mipmap_tree *mt;
>
> - mt = intel_miptree_create_internal(intel, target, format, internal_format,
> + mt = intel_miptree_create_internal(intel, target, format,
> 0, 0,
> region->width, region->height, 1,
> region->cpp, compress_byte,
> diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
> index 0ce8c09..c1eb200 100644
> --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
> +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
> @@ -92,7 +92,6 @@ struct intel_mipmap_tree
> */
> GLenum target;
> gl_format format;
> - GLenum internal_format;
>
> GLuint first_level;
> GLuint last_level;
> @@ -139,7 +138,6 @@ struct intel_mipmap_tree *intel_miptree_create(struct intel_context *intel,
> GLenum target,
> gl_format format,
> GLenum base_format,
> - GLenum internal_format,
> GLuint first_level,
> GLuint last_level,
> GLuint width0,
> @@ -153,7 +151,6 @@ struct intel_mipmap_tree *
> intel_miptree_create_for_region(struct intel_context *intel,
> GLenum target,
> gl_format format,
> - GLenum internal_format,
> struct intel_region *region,
> GLuint depth0,
> GLuint compress_byte);
> diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
> index b5084e8..1a3665c 100644
> --- a/src/mesa/drivers/dri/intel/intel_tex_image.c
> +++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
> @@ -117,7 +117,6 @@ intel_miptree_create_for_teximage(struct intel_context *intel,
> intelObj->base.Target,
> intelImage->base.TexFormat,
> intelImage->base._BaseFormat,
> - intelImage->base.InternalFormat,
> firstLevel,
> lastLevel,
> width,
> @@ -694,7 +693,7 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
> }
>
> mt = intel_miptree_create_for_region(intel, target, texFormat,
> - internalFormat, rb->region, 1, 0);
> + rb->region, 1, 0);
> if (mt == NULL)
> return;
>
> @@ -758,7 +757,6 @@ intel_image_target_texture_2d(struct gl_context *ctx, GLenum target,
> return;
>
> mt = intel_miptree_create_for_region(intel, target, image->format,
> - image->internal_format,
> image->region, 1, 0);
> if (mt == NULL)
> return;
> diff --git a/src/mesa/drivers/dri/intel/intel_tex_validate.c b/src/mesa/drivers/dri/intel/intel_tex_validate.c
> index e833c15..a6de0de 100644
> --- a/src/mesa/drivers/dri/intel/intel_tex_validate.c
> +++ b/src/mesa/drivers/dri/intel/intel_tex_validate.c
> @@ -135,7 +135,6 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
> intelObj->base.Target,
> firstImage->base.TexFormat,
> firstImage->base._BaseFormat,
> - firstImage->base.InternalFormat,
> tObj->BaseLevel,
> intelObj->_MaxLevel,
> firstImage->base.Width,
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAk3yv6EACgkQX1gOwKyEAw9PyQCeNNjcJae1790jzdmMDlSrB+rM
r7kAoJXyAJEJ+CercO2SxRniGU64JC9n
=Q+Lb
-----END PGP SIGNATURE-----
More information about the mesa-dev
mailing list