mesa: simplify texture_row_stride() helper
authorBrian Paul <brianp@vmware.com>
Sun, 25 Oct 2009 23:15:02 +0000 (17:15 -0600)
committerBrian Paul <brianp@vmware.com>
Sun, 25 Oct 2009 23:15:02 +0000 (17:15 -0600)
src/mesa/main/texstore.c

index e6a63b86033c8358dd8b294394a017af336921e9..6887521f553d9a06e5a3c5d4cacd7fbbd50edc61 100644 (file)
@@ -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;
 }