mesa: move gl_texture_image::_IsPowerOfTwo into swrast

It's only used by swrast.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Brian Paul
2011-09-21 18:54:53 -06:00
parent de414f4915
commit eaf376ba35
6 changed files with 32 additions and 19 deletions

View File

@@ -1159,13 +1159,6 @@ _mesa_init_teximage_fields(struct gl_context *ctx, GLenum target,
img->MaxLog2 = MAX2(img->WidthLog2, img->HeightLog2);
if ((width == 1 || _mesa_is_pow_two(img->Width2)) &&
(height == 1 || _mesa_is_pow_two(img->Height2)) &&
(depth == 1 || _mesa_is_pow_two(img->Depth2)))
img->_IsPowerOfTwo = GL_TRUE;
else
img->_IsPowerOfTwo = GL_FALSE;
/* RowStride and ImageOffsets[] describe how to address texels in 'Data' */
img->RowStride = width;
/* Allocate the ImageOffsets array and initialize to typical values.