From 82bcc1c5d27b825db7f002c3c183bd1dc7833438 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sun, 25 Oct 2009 17:15:02 -0600 Subject: mesa: simplify texture_row_stride() helper --- src/mesa/main/texstore.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/mesa/main/texstore.c') diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index e6a63b8603..6887521f55 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -3223,17 +3223,8 @@ texture_size(const struct gl_texture_image *texImage) static GLuint texture_row_stride(const struct gl_texture_image *texImage) { - GLuint stride; - - if (_mesa_is_format_compressed(texImage->TexFormat)) { - stride = _mesa_compressed_row_stride(texImage->TexFormat, + GLuint stride = _mesa_format_row_stride(texImage->TexFormat, texImage->Width); - } - else { - GLuint texelBytes = _mesa_get_format_bytes(texImage->TexFormat); - stride = texImage->RowStride * texelBytes; - } - return stride; } -- cgit v1.2.3