From: Eric Anholt Date: Fri, 19 Apr 2013 22:45:33 +0000 (-0700) Subject: radeon: Remove some dead teximage mapping code. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dca4178130f2704d54cc16fba13f9585e6ae0e54;p=mesa.git radeon: Remove some dead teximage mapping code. Reviewed-by: Kenneth Graunke Reviewed-by: Brian Paul --- diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index b1bc0fc9dd9..b6e551cd992 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -154,56 +154,6 @@ void radeonFreeTextureImageBuffer(struct gl_context *ctx, struct gl_texture_imag image->base.ImageOffsets = NULL; } -/* Set Data pointer and additional data for mapped texture image */ -static void teximage_set_map_data(radeon_texture_image *image) -{ - radeon_mipmap_level *lvl; - - if (!image->mt) { - radeon_warning("%s(%p) Trying to set map data without miptree.\n", - __func__, image); - - return; - } - - lvl = &image->mt->levels[image->base.Base.Level]; - - image->base.Map = image->mt->bo->ptr + lvl->faces[image->base.Base.Face].offset; - image->base.RowStride = lvl->rowstride / _mesa_get_format_bytes(image->base.Base.TexFormat); -} - - -/** - * Map a single texture image for glTexImage and friends. - */ -void radeon_teximage_map(radeon_texture_image *image, GLboolean write_enable) -{ - radeon_print(RADEON_TEXTURE, RADEON_VERBOSE, - "%s(img %p), write_enable %s.\n", - __func__, image, - write_enable ? "true": "false"); - if (image->mt) { - assert(!image->base.Map); - - radeon_bo_map(image->mt->bo, write_enable); - teximage_set_map_data(image); - } -} - - -void radeon_teximage_unmap(radeon_texture_image *image) -{ - radeon_print(RADEON_TEXTURE, RADEON_VERBOSE, - "%s(img %p)\n", - __func__, image); - if (image->mt) { - assert(image->base.Map); - - image->base.Map = 0; - radeon_bo_unmap(image->mt->bo); - } -} - /** * Map texture memory/buffer into user space. * Note: the region of interest parameters are ignored here. diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.h b/src/mesa/drivers/dri/radeon/radeon_texture.h index b0a07fc8a09..343c171cec1 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.h +++ b/src/mesa/drivers/dri/radeon/radeon_texture.h @@ -46,8 +46,6 @@ void copy_rows(void* dst, GLuint dststride, const void* src, GLuint srcstride, struct gl_texture_image *radeonNewTextureImage(struct gl_context *ctx); void radeonFreeTextureImageBuffer(struct gl_context *ctx, struct gl_texture_image *timage); -void radeon_teximage_map(radeon_texture_image *image, GLboolean write_enable); -void radeon_teximage_unmap(radeon_texture_image *image); int radeon_validate_texture_miptree(struct gl_context * ctx, struct gl_sampler_object *samp, struct gl_texture_object *texObj);