mesa/st: remove unused TexData
authorDave Airlie <airlied@gmail.com>
Wed, 4 Mar 2015 22:19:23 +0000 (08:19 +1000)
committerDave Airlie <airlied@gmail.com>
Sun, 8 Mar 2015 23:48:49 +0000 (09:48 +1000)
this isn't hooked up to anything at all from what I can see.

Seems like a left over from commit 5d67d4fbebb(st/mesa: remove
st_TexImage(), use core Mesa code instead).

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/mesa/state_tracker/st_cb_texture.c
src/mesa/state_tracker/st_texture.h

index a8b19a1f3232bda551870ad00c6b89042a220358..5c520b44f8d792d8bd623e4f750d4eea44b574e6 100644 (file)
@@ -178,9 +178,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;
@@ -501,7 +498,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 */
@@ -1521,23 +1517,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);
 }
 
index 6b7f8c750cc998dac55b90331a8201a5d0bbf89d..3fa55ae38dbc094c5b06fc88352fbaee50506769 100644 (file)
@@ -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;