diff options
author | Brian Paul <[email protected]> | 2009-10-25 17:15:02 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-10-25 17:15:02 -0600 |
commit | 82bcc1c5d27b825db7f002c3c183bd1dc7833438 (patch) | |
tree | 49aadfecdaf239dd5acec719dda74fa7d309ed84 | |
parent | 07ad6393cb31d8f1f086f9c46705334ef9cf25f6 (diff) |
mesa: simplify texture_row_stride() helper
-rw-r--r-- | src/mesa/main/texstore.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index e6a63b86033..6887521f553 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; } |