radeon: Remove some dead teximage mapping code.
authorEric Anholt <eric@anholt.net>
Fri, 19 Apr 2013 22:45:33 +0000 (15:45 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 30 Apr 2013 17:40:42 +0000 (10:40 -0700)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/drivers/dri/radeon/radeon_texture.c
src/mesa/drivers/dri/radeon/radeon_texture.h

index b1bc0fc9dd90c04db71bcf59ea5cfc4723e151e9..b6e551cd99228339ff1ca1fd5d6aa625298d40cd 100644 (file)
@@ -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.
index b0a07fc8a098e33fa549b7fcf974887c00a052b4..343c171cec1ed7300b1972606de8ada627814694 100644 (file)
@@ -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);