intel: Drop the internal_format field of the mipmap tree.
authorEric Anholt <eric@anholt.net>
Thu, 9 Jun 2011 17:00:44 +0000 (10:00 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 14 Jun 2011 18:17:38 +0000 (11:17 -0700)
This has been replaced with the gl_format now.

src/mesa/drivers/dri/intel/intel_fbo.c
src/mesa/drivers/dri/intel/intel_mipmap_tree.c
src/mesa/drivers/dri/intel/intel_mipmap_tree.h
src/mesa/drivers/dri/intel/intel_tex_image.c
src/mesa/drivers/dri/intel/intel_tex_validate.c

index e53dd8a073adac872d730349c6c40d5a8f74d78f..97a61a58cb6f34d6e4273e3123b242f41719254c 100644 (file)
@@ -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,
index c190f0fb789ba42e2967f52286f8a4a0ef563c3f..b0b708401c9394947067346a7ade203f45b15ace 100644 (file)
@@ -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,
index 0ce8c091295323e09de824c21893f5d5f374c4f1..c1eb200b61b3ee25d3ba38479a7befdcea539ea7 100644 (file)
@@ -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);
index b5084e8b4fec49af813cdbf2b84389d1e98cc649..1a3665ccc6601e979710fd779ef8cd06e4434611 100644 (file)
@@ -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;
index e833c15af5c5bbdf74a50301c4f70b8308c4b728..a6de0de47afadcdc1cede8f0bb59a92915394339 100644 (file)
@@ -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,