mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
mesa: simplify texture_row_stride() helper
This commit is contained in:
parent
07ad6393cb
commit
82bcc1c5d2
1 changed files with 1 additions and 10 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue