mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
st/mesa: fix incorrect RowStride computation
Fixes incorrect stride when getting a compressed tex image.
This commit is contained in:
parent
56f99ee640
commit
7b640f9f70
1 changed files with 4 additions and 1 deletions
|
|
@ -931,7 +931,10 @@ st_get_tex_image(GLcontext * ctx, GLenum target, GLint level,
|
|||
PIPE_TRANSFER_READ, 0, 0,
|
||||
stImage->base.Width,
|
||||
stImage->base.Height);
|
||||
texImage->RowStride = stImage->transfer->stride / util_format_get_blocksize(stImage->pt->format);
|
||||
/* compute stride in texels from stride in bytes */
|
||||
texImage->RowStride = stImage->transfer->stride
|
||||
* util_format_get_blockwidth(stImage->pt->format)
|
||||
/ util_format_get_blocksize(stImage->pt->format);
|
||||
}
|
||||
else {
|
||||
/* Otherwise, the image should actually be stored in
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue