diff options
author | Pauli Nieminen <[email protected]> | 2012-06-12 21:38:44 +0300 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2012-08-12 15:49:28 -0700 |
commit | c9a7dfcf92e6adb4b85338c2c8dbbfbaf39fbfe7 (patch) | |
tree | 4953463bf82e63f8db3c3772718397293dc01059 /src/mesa/drivers/dri/intel | |
parent | c5af8891805fc4f590c1371c098cdbc704c44e00 (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/dri/intel')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_tex.c | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_tex_image.c | 3 |
2 files changed, 5 insertions, 8 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__); |