From 9c5fdbb721147f7304faaa8960f5b64e25a8f673 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 9 Jun 2011 10:07:56 -0700 Subject: [PATCH] intel: Use the gl_format to get the base_format for miptree create. One less argument to this insanely long function call. --- src/mesa/drivers/dri/intel/intel_fbo.c | 1 - src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 2 +- src/mesa/drivers/dri/intel/intel_mipmap_tree.h | 1 - src/mesa/drivers/dri/intel/intel_tex_image.c | 1 - src/mesa/drivers/dri/intel/intel_tex_validate.c | 1 - 5 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c index 97a61a58cb6..02f40f51dfc 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.c +++ b/src/mesa/drivers/dri/intel/intel_fbo.c @@ -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, diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c index b0b708401c9..be18e515df0 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c @@ -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 && diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h index c1eb200b61b..c259e514787 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h @@ -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, diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index 1a3665ccc66..b7d0eb1a449 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_image.c +++ b/src/mesa/drivers/dri/intel/intel_tex_image.c @@ -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, diff --git a/src/mesa/drivers/dri/intel/intel_tex_validate.c b/src/mesa/drivers/dri/intel/intel_tex_validate.c index a6de0de47af..e810db85c14 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_validate.c +++ b/src/mesa/drivers/dri/intel/intel_tex_validate.c @@ -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, -- 2.30.2