mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
st/mesa: don't use gl_texture_image::RowStride
It's always the same as the texture width.
This commit is contained in:
parent
aff65241c8
commit
cf2439e246
1 changed files with 7 additions and 5 deletions
|
|
@ -1685,16 +1685,18 @@ copy_image_data_to_texture(struct st_context *st,
|
|||
pipe_resource_reference(&stImage->pt, NULL);
|
||||
}
|
||||
else if (stImage->TexData) {
|
||||
/* Copy from malloc'd memory */
|
||||
/* XXX this should be re-examined/tested with a compressed format */
|
||||
GLuint blockSize = util_format_get_blocksize(stObj->pt->format);
|
||||
GLuint srcRowStride = stImage->base.Width * blockSize;
|
||||
GLuint srcSliceStride = stImage->base.Height * srcRowStride;
|
||||
st_texture_image_data(st,
|
||||
stObj->pt,
|
||||
stImage->base.Face,
|
||||
dstLevel,
|
||||
stImage->TexData,
|
||||
stImage->base.RowStride *
|
||||
util_format_get_blocksize(stObj->pt->format),
|
||||
stImage->base.RowStride *
|
||||
stImage->base.Height *
|
||||
util_format_get_blocksize(stObj->pt->format));
|
||||
srcRowStride,
|
||||
srcSliceStride);
|
||||
_mesa_align_free(stImage->TexData);
|
||||
stImage->TexData = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue