intel: Use the gl_format to get the base_format for miptree create.
authorEric Anholt <eric@anholt.net>
Thu, 9 Jun 2011 17:07:56 +0000 (10:07 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 14 Jun 2011 18:17:39 +0000 (11:17 -0700)
One less argument to this insanely long function call.

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 97a61a58cb6f34d6e4273e3123b242f41719254c..02f40f51dfcb188c1423de091cd378f660654d86 100644 (file)
@@ -642,7 +642,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->level,
                                    intel_image->level,
                                    intel_image->base.Width,
index b0b708401c9394947067346a7ade203f45b15ace..be18e515df0219a5e98d378150a1f0032f6c2aae 100644 (file)
@@ -105,7 +105,6 @@ struct intel_mipmap_tree *
 intel_miptree_create(struct intel_context *intel,
                     GLenum target,
                     gl_format format,
-                    GLenum base_format,
                     GLuint first_level,
                     GLuint last_level,
                     GLuint width0,
@@ -115,6 +114,7 @@ intel_miptree_create(struct intel_context *intel,
 {
    struct intel_mipmap_tree *mt;
    uint32_t tiling = I915_TILING_NONE;
+   GLenum base_format = _mesa_get_format_base_format(format);
 
    if (intel->use_texture_tiling && compress_byte == 0) {
       if (intel->gen >= 4 &&
index c1eb200b61b3ee25d3ba38479a7befdcea539ea7..c259e5147872f44a60180250fad69d38b1b2030c 100644 (file)
@@ -137,7 +137,6 @@ struct intel_mipmap_tree
 struct intel_mipmap_tree *intel_miptree_create(struct intel_context *intel,
                                                GLenum target,
                                               gl_format format,
-                                               GLenum base_format,
                                                GLuint first_level,
                                                GLuint last_level,
                                                GLuint width0,
index 1a3665ccc6601e979710fd779ef8cd06e4434611..b7d0eb1a44911b8d633c27aad56d575fcccf2364 100644 (file)
@@ -116,7 +116,6 @@ intel_miptree_create_for_teximage(struct intel_context *intel,
    return intel_miptree_create(intel,
                               intelObj->base.Target,
                               intelImage->base.TexFormat,
-                              intelImage->base._BaseFormat,
                               firstLevel,
                               lastLevel,
                               width,
index a6de0de47afadcdc1cede8f0bb59a92915394339..e810db85c1493df1080873daa677794565e9cda9 100644 (file)
@@ -134,7 +134,6 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
       intelObj->mt = intel_miptree_create(intel,
                                           intelObj->base.Target,
                                          firstImage->base.TexFormat,
-                                          firstImage->base._BaseFormat,
                                           tObj->BaseLevel,
                                           intelObj->_MaxLevel,
                                           firstImage->base.Width,