[Mesa-dev] [PATCH 09/11] intel: Drop the cpp argument to intel_miptree_create().
Eric Anholt
eric at anholt.net
Fri Jun 10 13:38:21 PDT 2011
---
src/mesa/drivers/dri/intel/intel_fbo.c | 5 +----
src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 9 ++++-----
src/mesa/drivers/dri/intel/intel_mipmap_tree.h | 1 -
src/mesa/drivers/dri/intel/intel_tex_image.c | 4 ----
src/mesa/drivers/dri/intel/intel_tex_validate.c | 1 -
5 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 156f76f..f9a464e 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -633,9 +633,6 @@ intel_render_texture(struct gl_context * ctx,
struct intel_context *intel = intel_context(ctx);
struct intel_mipmap_tree *old_mt = intel_image->mt;
struct intel_mipmap_tree *new_mt;
- int texel_bytes;
-
- texel_bytes = _mesa_get_format_bytes(intel_image->base.TexFormat);
new_mt = intel_miptree_create(intel, image->TexObject->Target,
intel_image->base.TexFormat,
@@ -644,7 +641,7 @@ intel_render_texture(struct gl_context * ctx,
intel_image->base.Width,
intel_image->base.Height,
intel_image->base.Depth,
- texel_bytes, GL_TRUE);
+ GL_TRUE);
intel_miptree_image_copy(intel,
new_mt,
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index eb3a45b..3589f3e 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -61,7 +61,7 @@ intel_miptree_create_internal(struct intel_context *intel,
GLuint last_level,
GLuint width0,
GLuint height0,
- GLuint depth0, GLuint cpp,
+ GLuint depth0,
uint32_t tiling)
{
GLboolean ok;
@@ -83,7 +83,7 @@ intel_miptree_create_internal(struct intel_context *intel,
mt->width0 = width0;
mt->height0 = height0;
mt->depth0 = depth0;
- mt->cpp = compress_byte ? compress_byte : cpp;
+ mt->cpp = compress_byte ? compress_byte : _mesa_get_format_bytes(mt->format);
mt->compressed = compress_byte ? 1 : 0;
mt->refcount = 1;
@@ -114,7 +114,7 @@ intel_miptree_create(struct intel_context *intel,
GLuint last_level,
GLuint width0,
GLuint height0,
- GLuint depth0, GLuint cpp,
+ GLuint depth0,
GLboolean expect_accelerated_upload)
{
struct intel_mipmap_tree *mt;
@@ -132,7 +132,7 @@ intel_miptree_create(struct intel_context *intel,
mt = intel_miptree_create_internal(intel, target, format,
first_level, last_level, width0,
- height0, depth0, cpp,
+ height0, depth0,
tiling);
/*
* pitch == 0 || height == 0 indicates the null texture
@@ -170,7 +170,6 @@ intel_miptree_create_for_region(struct intel_context *intel,
mt = intel_miptree_create_internal(intel, target, format,
0, 0,
region->width, region->height, 1,
- region->cpp,
I915_TILING_NONE);
if (!mt)
return mt;
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
index a531ecf..ea86590 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
@@ -142,7 +142,6 @@ struct intel_mipmap_tree *intel_miptree_create(struct intel_context *intel,
GLuint width0,
GLuint height0,
GLuint depth0,
- GLuint cpp,
GLboolean expect_accelerated_upload);
struct intel_mipmap_tree *
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index 6fa5c13..90d4117 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -55,7 +55,6 @@ intel_miptree_create_for_teximage(struct intel_context *intel,
GLuint height = intelImage->base.Height;
GLuint depth = intelImage->base.Depth;
GLuint i;
- GLuint texelBytes;
DBG("%s\n", __FUNCTION__);
@@ -108,8 +107,6 @@ intel_miptree_create_for_teximage(struct intel_context *intel,
}
}
- texelBytes = _mesa_get_format_bytes(intelImage->base.TexFormat);
-
return intel_miptree_create(intel,
intelObj->base.Target,
intelImage->base.TexFormat,
@@ -118,7 +115,6 @@ intel_miptree_create_for_teximage(struct intel_context *intel,
width,
height,
depth,
- texelBytes,
expect_accelerated_upload);
}
diff --git a/src/mesa/drivers/dri/intel/intel_tex_validate.c b/src/mesa/drivers/dri/intel/intel_tex_validate.c
index 84facdb..98e39b2 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_validate.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_validate.c
@@ -137,7 +137,6 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
firstImage->base.Width,
firstImage->base.Height,
firstImage->base.Depth,
- cpp,
GL_TRUE);
if (!intelObj->mt)
return GL_FALSE;
--
1.7.5.3
More information about the mesa-dev
mailing list