From: Brian Paul Date: Mon, 24 Oct 2011 02:17:53 +0000 (-0600) Subject: mesa: remove dead code from teximage.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b487fc50b0f977719729a540230e72d406063860;p=mesa.git mesa: remove dead code from teximage.c --- diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index c4089f4a9e7..798201a60b0 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -594,13 +594,6 @@ _mesa_delete_texture_image(struct gl_context *ctx, */ ASSERT(ctx->Driver.FreeTextureImageBuffer); ctx->Driver.FreeTextureImageBuffer( ctx, texImage ); - -#if 0 - ASSERT(texImage->Data == NULL); - if (texImage->ImageOffsets) - free(texImage->ImageOffsets); - free(texImage); -#endif } @@ -1042,13 +1035,6 @@ clear_teximage_fields(struct gl_texture_image *img) img->Width = 0; img->Height = 0; img->Depth = 0; -#if 0 - img->RowStride = 0; - if (img->ImageOffsets) { - free(img->ImageOffsets); - img->ImageOffsets = NULL; - } -#endif img->Width2 = 0; img->Height2 = 0; img->Depth2 = 0; @@ -1118,21 +1104,6 @@ _mesa_init_teximage_fields(struct gl_context *ctx, GLenum target, img->MaxLog2 = MAX2(img->WidthLog2, img->HeightLog2); -#if 0 - /* RowStride and ImageOffsets[] describe how to address texels in 'Data' */ - img->RowStride = width; - /* Allocate the ImageOffsets array and initialize to typical values. - * We allocate the array for 1D/2D textures too in order to avoid special- - * case code in the texstore routines. - */ - if (img->ImageOffsets) - free(img->ImageOffsets); - img->ImageOffsets = (GLuint *) malloc(depth * sizeof(GLuint)); - for (i = 0; i < depth; i++) { - img->ImageOffsets[i] = i * width * height; - } -#endif - img->TexFormat = format; }