Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06735863 authored by Jack Palevich's avatar Jack Palevich
Browse files

Fix ETC1 texture decoding.

etc1_decode_image requires the stride argument to be in bytes, but the
surface->stride field is in pixels. Convert by multiplying by pixel size.
parent 3107535d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1152,7 +1152,7 @@ void glCompressedTexImage2D(
        if (etc1_decode_image(
                (const etc1_byte*)data,
                (etc1_byte*)surface->data,
                width, height, 3, surface->stride) != 0) {
                width, height, 3, surface->stride*3) != 0) {
            ogles_error(c, GL_INVALID_OPERATION);
        }
        return;