[Mesa-dev] [PATCH 01/14] mesa: Rename FreeTexImageData to FreeTextureImageBuffer.

Eric Anholt eric at anholt.net
Wed Aug 24 11:08:15 PDT 2011


This was produced by sed, except for one hunk in driverfuncs.c where
trailing whitespace was dropped.
---
 src/mesa/drivers/common/driverfuncs.c          |    2 +-
 src/mesa/drivers/dri/intel/intel_tex.c         |    2 +-
 src/mesa/drivers/dri/intel/intel_tex_image.c   |    2 +-
 src/mesa/drivers/dri/nouveau/nouveau_texture.c |    2 +-
 src/mesa/drivers/dri/r200/r200_tex.c           |    2 +-
 src/mesa/drivers/dri/r300/r300_tex.c           |    2 +-
 src/mesa/drivers/dri/r600/evergreen_tex.c      |    2 +-
 src/mesa/drivers/dri/r600/r600_tex.c           |    2 +-
 src/mesa/drivers/dri/radeon/radeon_tex.c       |    2 +-
 src/mesa/drivers/dri/radeon/radeon_texture.c   |    6 +++---
 src/mesa/drivers/dri/radeon/radeon_texture.h   |    2 +-
 src/mesa/drivers/dri/unichrome/via_tex.c       |    2 +-
 src/mesa/main/context.c                        |    2 +-
 src/mesa/main/dd.h                             |    2 +-
 src/mesa/main/mipmap.c                         |    2 +-
 src/mesa/main/teximage.c                       |   16 ++++++++--------
 src/mesa/state_tracker/st_cb_texture.c         |    4 ++--
 src/mesa/state_tracker/st_gen_mipmap.c         |    2 +-
 18 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index a6174ee..912231b 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -111,7 +111,7 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
    driver->NewTextureObject = _mesa_new_texture_object;
    driver->DeleteTexture = _mesa_delete_texture_object;
    driver->NewTextureImage = _mesa_new_texture_image;
-   driver->FreeTexImageData = _mesa_free_texture_image_data; 
+   driver->FreeTextureImageBuffer = _mesa_free_texture_image_data;
    driver->MapTexture = NULL;
    driver->UnmapTexture = NULL;
    driver->TextureMemCpy = memcpy;
diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/intel/intel_tex.c
index ee0cd25..8744540 100644
--- a/src/mesa/drivers/dri/intel/intel_tex.c
+++ b/src/mesa/drivers/dri/intel/intel_tex.c
@@ -123,5 +123,5 @@ intelInitTextureFuncs(struct dd_function_table *functions)
    functions->NewTextureObject = intelNewTextureObject;
    functions->NewTextureImage = intelNewTextureImage;
    functions->DeleteTexture = intelDeleteTextureObject;
-   functions->FreeTexImageData = intelFreeTextureImageData;
+   functions->FreeTextureImageBuffer = intelFreeTextureImageData;
 }
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index 4ee6684..4149f45 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -418,7 +418,7 @@ intelTexImage(struct gl_context * ctx,
       }
    }
 
-   ctx->Driver.FreeTexImageData(ctx, texImage);
+   ctx->Driver.FreeTextureImageBuffer(ctx, texImage);
    assert(!intelImage->mt);
 
    if (intelObj->mt &&
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
index dcfd316..df1467d 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
@@ -704,7 +704,7 @@ nouveau_texture_functions_init(struct dd_function_table *functions)
 	functions->NewTextureObject = nouveau_texture_new;
 	functions->DeleteTexture = nouveau_texture_free;
 	functions->NewTextureImage = nouveau_teximage_new;
-	functions->FreeTexImageData = nouveau_teximage_free;
+	functions->FreeTextureImageBuffer = nouveau_teximage_free;
 	functions->ChooseTextureFormat = nouveau_choose_tex_format;
 	functions->TexImage1D = nouveau_teximage_1d;
 	functions->TexImage2D = nouveau_teximage_2d;
diff --git a/src/mesa/drivers/dri/r200/r200_tex.c b/src/mesa/drivers/dri/r200/r200_tex.c
index 91e77f9..665d9e1 100644
--- a/src/mesa/drivers/dri/r200/r200_tex.c
+++ b/src/mesa/drivers/dri/r200/r200_tex.c
@@ -533,7 +533,7 @@ void r200InitTextureFuncs( radeonContextPtr radeon, struct dd_function_table *fu
    functions->GenerateMipmap = radeonGenerateMipmap;
 
    functions->NewTextureImage = radeonNewTextureImage;
-   functions->FreeTexImageData = radeonFreeTexImageData;
+   functions->FreeTextureImageBuffer = radeonFreeTextureImageBuffer;
    functions->MapTexture = radeonMapTexture;
    functions->UnmapTexture = radeonUnmapTexture;
 
diff --git a/src/mesa/drivers/dri/r300/r300_tex.c b/src/mesa/drivers/dri/r300/r300_tex.c
index 93d8fe1..9dff68c 100644
--- a/src/mesa/drivers/dri/r300/r300_tex.c
+++ b/src/mesa/drivers/dri/r300/r300_tex.c
@@ -356,7 +356,7 @@ void r300InitTextureFuncs(radeonContextPtr radeon, struct dd_function_table *fun
 	 * since _mesa_init_driver_functions() was already called.
 	 */
 	functions->NewTextureImage = radeonNewTextureImage;
-	functions->FreeTexImageData = radeonFreeTexImageData;
+	functions->FreeTextureImageBuffer = radeonFreeTextureImageBuffer;
 	functions->MapTexture = radeonMapTexture;
 	functions->UnmapTexture = radeonUnmapTexture;
 
diff --git a/src/mesa/drivers/dri/r600/evergreen_tex.c b/src/mesa/drivers/dri/r600/evergreen_tex.c
index d240a21..b560ac4 100644
--- a/src/mesa/drivers/dri/r600/evergreen_tex.c
+++ b/src/mesa/drivers/dri/r600/evergreen_tex.c
@@ -1658,7 +1658,7 @@ void evergreenInitTextureFuncs(radeonContextPtr radeon, struct dd_function_table
 	 * since _mesa_init_driver_functions() was already called.
 	 */
 	functions->NewTextureImage = radeonNewTextureImage;
-	functions->FreeTexImageData = radeonFreeTexImageData;
+	functions->FreeTextureImageBuffer = radeonFreeTextureImageBuffer;
 	functions->MapTexture = radeonMapTexture;
 	functions->UnmapTexture = radeonUnmapTexture;
 
diff --git a/src/mesa/drivers/dri/r600/r600_tex.c b/src/mesa/drivers/dri/r600/r600_tex.c
index 3efa1d1..f1d704e 100644
--- a/src/mesa/drivers/dri/r600/r600_tex.c
+++ b/src/mesa/drivers/dri/r600/r600_tex.c
@@ -447,7 +447,7 @@ void r600InitTextureFuncs(radeonContextPtr radeon, struct dd_function_table *fun
 	 * since _mesa_init_driver_functions() was already called.
 	 */
 	functions->NewTextureImage = radeonNewTextureImage;
-	functions->FreeTexImageData = radeonFreeTexImageData;
+	functions->FreeTextureImageBuffer = radeonFreeTextureImageBuffer;
 	functions->MapTexture = radeonMapTexture;
 	functions->UnmapTexture = radeonUnmapTexture;
 
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex.c b/src/mesa/drivers/dri/radeon/radeon_tex.c
index a0b5506..bb83de5 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex.c
@@ -461,7 +461,7 @@ void radeonInitTextureFuncs( radeonContextPtr radeon, struct dd_function_table *
    functions->GenerateMipmap = radeonGenerateMipmap;
 
    functions->NewTextureImage = radeonNewTextureImage;
-   functions->FreeTexImageData = radeonFreeTexImageData;
+   functions->FreeTextureImageBuffer = radeonFreeTextureImageBuffer;
    functions->MapTexture = radeonMapTexture;
    functions->UnmapTexture = radeonUnmapTexture;
 
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c
index ad7e4c1..50cf564 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.c
@@ -86,7 +86,7 @@ struct gl_texture_image *radeonNewTextureImage(struct gl_context *ctx)
 /**
  * Free memory associated with this texture image.
  */
-void radeonFreeTexImageData(struct gl_context *ctx, struct gl_texture_image *timage)
+void radeonFreeTextureImageBuffer(struct gl_context *ctx, struct gl_texture_image *timage)
 {
 	radeon_texture_image* image = get_radeon_texture_image(timage);
 
@@ -791,7 +791,7 @@ static void radeon_teximage(
 	t->validated = GL_FALSE;
 
 	/* Mesa core only clears texImage->Data but not image->mt */
-	radeonFreeTexImageData(ctx, texImage);
+	radeonFreeTextureImageBuffer(ctx, texImage);
 
 	if (!t->bo) {
 		teximage_assign_miptree(rmesa, texObj, texImage, face, level);
@@ -1036,7 +1036,7 @@ void radeon_image_target_texture_2d(struct gl_context *ctx, GLenum target,
 	if (image == NULL)
 		return;
 
-	radeonFreeTexImageData(ctx, texImage);
+	radeonFreeTextureImageBuffer(ctx, texImage);
 
 	texImage->Width = image->width;
 	texImage->Height = image->height;
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.h b/src/mesa/drivers/dri/radeon/radeon_texture.h
index 6fc06d9..388512a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.h
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.h
@@ -37,7 +37,7 @@
 void copy_rows(void* dst, GLuint dststride, const void* src, GLuint srcstride,
 	GLuint numrows, GLuint rowsize);
 struct gl_texture_image *radeonNewTextureImage(struct gl_context *ctx);
-void radeonFreeTexImageData(struct gl_context *ctx, struct gl_texture_image *timage);
+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);
diff --git a/src/mesa/drivers/dri/unichrome/via_tex.c b/src/mesa/drivers/dri/unichrome/via_tex.c
index fe5480f..f65ab07 100644
--- a/src/mesa/drivers/dri/unichrome/via_tex.c
+++ b/src/mesa/drivers/dri/unichrome/via_tex.c
@@ -923,7 +923,7 @@ void viaInitTextureFuncs(struct dd_function_table * functions)
    functions->NewTextureObject = viaNewTextureObject;
    functions->NewTextureImage = viaNewTextureImage;
    functions->DeleteTexture = _mesa_delete_texture_object;
-   functions->FreeTexImageData = viaFreeTextureImageData;
+   functions->FreeTextureImageBuffer = viaFreeTextureImageData;
 
 #if 0 && defined( USE_SSE_ASM )
    /*
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index b83a5d6..0cf7947 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -907,7 +907,7 @@ _mesa_initialize_context(struct gl_context *ctx,
 
    /*ASSERT(driverContext);*/
    assert(driverFunctions->NewTextureObject);
-   assert(driverFunctions->FreeTexImageData);
+   assert(driverFunctions->FreeTextureImageBuffer);
 
    ctx->API = api;
    ctx->Visual = *visual;
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index fcf40ec..3164ac8 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -479,7 +479,7 @@ struct dd_function_table {
    /** 
     * Called to free tImage->Data.
     */
-   void (*FreeTexImageData)( struct gl_context *ctx, struct gl_texture_image *tImage );
+   void (*FreeTextureImageBuffer)( struct gl_context *ctx, struct gl_texture_image *tImage );
 
    /** Map texture image data into user space */
    void (*MapTexture)( struct gl_context *ctx, struct gl_texture_object *tObj );
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index 8a811cb..611f375 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -1949,7 +1949,7 @@ generate_mipmap_uncompressed(struct gl_context *ctx, GLenum target,
 
       /* Free old image data */
       if (dstImage->Data)
-         ctx->Driver.FreeTexImageData(ctx, dstImage);
+         ctx->Driver.FreeTextureImageBuffer(ctx, dstImage);
 
       /* initialize new image */
       _mesa_init_teximage_fields(ctx, target, dstImage, dstWidth, dstHeight,
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index a005d29..8fdebad 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -595,7 +595,7 @@ _mesa_new_texture_image( struct gl_context *ctx )
 
 /**
  * Free texture image data.
- * This function is a fallback called via ctx->Driver.FreeTexImageData().
+ * This function is a fallback called via ctx->Driver.FreeTextureImageBuffer().
  *
  * \param texImage texture image.
  *
@@ -630,8 +630,8 @@ _mesa_delete_texture_image(struct gl_context *ctx,
    /* Free texImage->Data and/or any other driver-specific texture
     * image storage.
     */
-   ASSERT(ctx->Driver.FreeTexImageData);
-   ctx->Driver.FreeTexImageData( ctx, texImage );
+   ASSERT(ctx->Driver.FreeTextureImageBuffer);
+   ctx->Driver.FreeTextureImageBuffer( ctx, texImage );
 
    ASSERT(texImage->Data == NULL);
    if (texImage->ImageOffsets)
@@ -1211,7 +1211,7 @@ void
 _mesa_clear_texture_image(struct gl_context *ctx,
                           struct gl_texture_image *texImage)
 {
-   ctx->Driver.FreeTexImageData(ctx, texImage);
+   ctx->Driver.FreeTextureImageBuffer(ctx, texImage);
    clear_teximage_fields(texImage);
 }
 
@@ -2457,7 +2457,7 @@ teximage(struct gl_context *ctx, GLuint dims,
             gl_format texFormat;
 
             if (texImage->Data) {
-               ctx->Driver.FreeTexImageData( ctx, texImage );
+               ctx->Driver.FreeTextureImageBuffer( ctx, texImage );
             }
 
             ASSERT(texImage->Data == NULL);
@@ -2598,7 +2598,7 @@ _mesa_EGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image)
       _mesa_error(ctx, GL_OUT_OF_MEMORY, "glEGLImageTargetTexture2D");
    } else {
       if (texImage->Data)
-	 ctx->Driver.FreeTexImageData( ctx, texImage );
+	 ctx->Driver.FreeTextureImageBuffer( ctx, texImage );
 
       ASSERT(texImage->Data == NULL);
       ctx->Driver.EGLImageTargetTexture2D(ctx, target,
@@ -2804,7 +2804,7 @@ copyteximage(struct gl_context *ctx, GLuint dims,
             GLint srcX = x, srcY = y, dstX = 0, dstY = 0;
 
             /* Free old texture image */
-            ctx->Driver.FreeTexImageData(ctx, texImage);
+            ctx->Driver.FreeTextureImageBuffer(ctx, texImage);
 
             _mesa_init_teximage_fields(ctx, target, texImage, width, height, 1,
                                        border, internalFormat, texFormat);
@@ -3363,7 +3363,7 @@ compressedteximage(struct gl_context *ctx, GLuint dims,
             gl_format texFormat;
 
             if (texImage->Data) {
-               ctx->Driver.FreeTexImageData( ctx, texImage );
+               ctx->Driver.FreeTextureImageBuffer( ctx, texImage );
             }
             ASSERT(texImage->Data == NULL);
 
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index a3b2ba9..4053f22 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -142,7 +142,7 @@ st_DeleteTextureObject(struct gl_context *ctx,
 }
 
 
-/** called via ctx->Driver.FreeTexImageData() */
+/** called via ctx->Driver.FreeTextureImageBuffer() */
 static void
 st_FreeTextureImageData(struct gl_context * ctx, struct gl_texture_image *texImage)
 {
@@ -1880,7 +1880,7 @@ st_init_texture_functions(struct dd_function_table *functions)
    functions->NewTextureObject = st_NewTextureObject;
    functions->NewTextureImage = st_NewTextureImage;
    functions->DeleteTexture = st_DeleteTextureObject;
-   functions->FreeTexImageData = st_FreeTextureImageData;
+   functions->FreeTextureImageBuffer = st_FreeTextureImageData;
 
    functions->TextureMemCpy = do_memcpy;
 
diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c
index 82ca4af..c991da3 100644
--- a/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/src/mesa/state_tracker/st_gen_mipmap.c
@@ -445,7 +445,7 @@ st_generate_mipmap(struct gl_context *ctx, GLenum target,
 
       /* Free old image data */
       if (dstImage->Data)
-         ctx->Driver.FreeTexImageData(ctx, dstImage);
+         ctx->Driver.FreeTextureImageBuffer(ctx, dstImage);
 
       /* initialize new image */
       _mesa_init_teximage_fields(ctx, target, dstImage, dstWidth, dstHeight,
-- 
1.7.5.4



More information about the mesa-dev mailing list