mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-01 17:40:25 +01:00
st/mesa: rename srcImageStride -> srcRowStride and fix-up formatting
This commit is contained in:
parent
c7d1d34c58
commit
e79086865b
1 changed files with 8 additions and 8 deletions
|
|
@ -700,22 +700,22 @@ st_TexImage(GLcontext * ctx,
|
|||
* conversion and copy:
|
||||
*/
|
||||
if (compressed_src) {
|
||||
const GLuint srcImageStride = _mesa_format_row_stride(texImage->TexFormat, width);
|
||||
if(dstRowStride == srcImageStride)
|
||||
const GLuint srcRowStride =
|
||||
_mesa_format_row_stride(texImage->TexFormat, width);
|
||||
if (dstRowStride == srcRowStride) {
|
||||
memcpy(texImage->Data, pixels, imageSize);
|
||||
else
|
||||
{
|
||||
}
|
||||
else {
|
||||
char *dst = texImage->Data;
|
||||
const char *src = pixels;
|
||||
GLuint i, bw, bh, lines;
|
||||
_mesa_get_format_block_size(texImage->TexFormat, &bw, &bh);
|
||||
lines = (height + bh - 1) / bh;
|
||||
|
||||
for(i = 0; i < lines; ++i)
|
||||
{
|
||||
memcpy(dst, src, srcImageStride);
|
||||
for (i = 0; i < lines; ++i) {
|
||||
memcpy(dst, src, srcRowStride);
|
||||
dst += dstRowStride;
|
||||
src += srcImageStride;
|
||||
src += srcRowStride;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue