[Mesa-dev] [PATCH] mesa/st: remove unused TexData
Dave Airlie
airlied at gmail.com
Wed Mar 4 14:26:00 PST 2015
this isn't hooked up to anything at all from what I can see.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/mesa/state_tracker/st_cb_texture.c | 21 ---------------------
src/mesa/state_tracker/st_texture.h | 6 ------
2 files changed, 27 deletions(-)
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 0525e87..6b72680 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -177,9 +177,6 @@ st_FreeTextureImageBuffer(struct gl_context *ctx,
pipe_resource_reference(&stImage->pt, NULL);
}
- _mesa_align_free(stImage->TexData);
- stImage->TexData = NULL;
-
free(stImage->transfer);
stImage->transfer = NULL;
stImage->num_transfers = 0;
@@ -500,7 +497,6 @@ st_AllocTextureImageBuffer(struct gl_context *ctx,
DBG("%s\n", __FUNCTION__);
- assert(!stImage->TexData);
assert(!stImage->pt); /* xxx this might be wrong */
/* Look if the parent texture object has space for this image */
@@ -1520,23 +1516,6 @@ copy_image_data_to_texture(struct st_context *st,
pipe_resource_reference(&stImage->pt, NULL);
}
- else if (stImage->TexData) {
- /* Copy from malloc'd memory */
- /* XXX this should be re-examined/tested with a compressed format */
- GLuint blockSize = util_format_get_blocksize(stObj->pt->format);
- GLuint srcRowStride = stImage->base.Width * blockSize;
- GLuint srcSliceStride = stImage->base.Height * srcRowStride;
- st_texture_image_data(st,
- stObj->pt,
- stImage->base.Face,
- dstLevel,
- stImage->TexData,
- srcRowStride,
- srcSliceStride);
- _mesa_align_free(stImage->TexData);
- stImage->TexData = NULL;
- }
-
pipe_resource_reference(&stImage->pt, stObj->pt);
}
diff --git a/src/mesa/state_tracker/st_texture.h b/src/mesa/state_tracker/st_texture.h
index 6b7f8c7..3fa55ae 100644
--- a/src/mesa/state_tracker/st_texture.h
+++ b/src/mesa/state_tracker/st_texture.h
@@ -55,13 +55,7 @@ struct st_texture_image
{
struct gl_texture_image base;
- /** Used to store texture data that doesn't fit in the parent
- * object's mipmap buffer.
- */
- GLubyte *TexData;
-
/* If stImage->pt != NULL, image data is stored here.
- * Else if stImage->TexData != NULL, image is stored there.
* Else there is no image data.
*/
struct pipe_resource *pt;
--
2.1.0
More information about the mesa-dev
mailing list