From 980f6f1b37ca88529b3e000235156eab93254fac Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 21 Sep 2011 18:54:53 -0600 Subject: mesa: move gl_texture_image::Width/Height/DepthScale fields to swrast These fields were only used for swrast so move them into swrast_texture_image. Reviewed-by: Ian Romanick --- src/mesa/main/mtypes.h | 3 --- src/mesa/main/teximage.c | 13 ------------- 2 files changed, 16 deletions(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index a3f0deba048..dc4dd07f19b 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1254,9 +1254,6 @@ struct gl_texture_image GLuint HeightLog2; /**< = log2(Height2) */ GLuint DepthLog2; /**< = log2(Depth2) */ GLuint MaxLog2; /**< = MAX(WidthLog2, HeightLog2) */ - GLfloat WidthScale; /**< used for mipmap LOD computation */ - GLfloat HeightScale; /**< used for mipmap LOD computation */ - GLfloat DepthScale; /**< used for mipmap LOD computation */ GLboolean IsClientData; /**< Data owned by client? */ struct gl_texture_object *TexObject; /**< Pointer back to parent object */ diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 50e7b4c0794..4f7f2ed60de 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -1172,19 +1172,6 @@ _mesa_init_teximage_fields(struct gl_context *ctx, GLenum target, img->ImageOffsets[i] = i * width * height; } - /* Compute Width/Height/DepthScale for mipmap lod computation */ - if (target == GL_TEXTURE_RECTANGLE_NV) { - /* scale = 1.0 since texture coords directly map to texels */ - img->WidthScale = 1.0; - img->HeightScale = 1.0; - img->DepthScale = 1.0; - } - else { - img->WidthScale = (GLfloat) img->Width; - img->HeightScale = (GLfloat) img->Height; - img->DepthScale = (GLfloat) img->Depth; - } - img->TexFormat = format; } -- cgit v1.2.3