summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorPauli Nieminen <[email protected]>2012-06-12 21:38:44 +0300
committerKenneth Graunke <[email protected]>2012-08-12 15:49:28 -0700
commitc9a7dfcf92e6adb4b85338c2c8dbbfbaf39fbfe7 (patch)
tree4953463bf82e63f8db3c3772718397293dc01059 /src/mesa/drivers
parentc5af8891805fc4f590c1371c098cdbc704c44e00 (diff)
mesa: Remove unnecessary parameters from AllocTextureImageBuffer
Size and format information is always stored in gl_texture_image structure. That makes it preferable to remove duplicate information from parameters to make interface easier to understand. Signed-off-by: Pauli Nieminen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex.c10
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_image.c3
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texture.c4
3 files changed, 6 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/intel/intel_tex.c
index b3ac2267b7d..92481b9b55f 100644
--- a/src/mesa/drivers/dri/intel/intel_tex.c
+++ b/src/mesa/drivers/dri/intel/intel_tex.c
@@ -51,9 +51,7 @@ intelDeleteTextureObject(struct gl_context *ctx,
static GLboolean
intel_alloc_texture_image_buffer(struct gl_context *ctx,
- struct gl_texture_image *image,
- gl_format format, GLsizei width,
- GLsizei height, GLsizei depth)
+ struct gl_texture_image *image)
{
struct intel_context *intel = intel_context(ctx);
struct intel_texture_image *intel_image = intel_texture_image(image);
@@ -84,14 +82,14 @@ intel_alloc_texture_image_buffer(struct gl_context *ctx,
assert(!intel_image->base.ImageOffsets);
intel_image->base.ImageOffsets = malloc(slices * sizeof(GLuint));
- _swrast_init_texture_image(image, width, height, depth);
+ _swrast_init_texture_image(image);
if (intel_texobj->mt &&
intel_miptree_match_image(intel_texobj->mt, image)) {
intel_miptree_reference(&intel_image->mt, intel_texobj->mt);
DBG("%s: alloc obj %p level %d %dx%dx%d using object's miptree %p\n",
__FUNCTION__, texobj, image->Level,
- width, height, depth, intel_texobj->mt);
+ image->Width, image->Height, image->Depth, intel_texobj->mt);
} else {
intel_image->mt = intel_miptree_create_for_teximage(intel, intel_texobj,
intel_image,
@@ -106,7 +104,7 @@ intel_alloc_texture_image_buffer(struct gl_context *ctx,
DBG("%s: alloc obj %p level %d %dx%dx%d using new miptree %p\n",
__FUNCTION__, texobj, image->Level,
- width, height, depth, intel_image->mt);
+ image->Width, image->Height, image->Depth, intel_image->mt);
}
return true;
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index acb21fbc7e4..fe9040cf1b6 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -160,8 +160,7 @@ try_pbo_upload(struct gl_context *ctx,
return false;
}
- ctx->Driver.AllocTextureImageBuffer(ctx, image, image->TexFormat,
- image->Width, image->Height, 1);
+ ctx->Driver.AllocTextureImageBuffer(ctx, image);
if (!intelImage->mt) {
DBG("%s: no miptree\n", __FUNCTION__);
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c
index 04f3e232b37..157cc096a31 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.c
@@ -103,9 +103,7 @@ radeonDeleteTextureImage(struct gl_context *ctx, struct gl_texture_image *img)
static GLboolean
radeonAllocTextureImageBuffer(struct gl_context *ctx,
- struct gl_texture_image *timage,
- gl_format format, GLsizei width,
- GLsizei height, GLsizei depth)
+ struct gl_texture_image *timage)
{
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
radeon_texture_image *image = get_radeon_texture_image(timage);