[PATCH 4/5] wined3d: Set GL_UNPACK_ALIGNMENT to 1 when uploading surfaces from user memory.

Henri Verbeet hverbeet at gmail.com
Tue Feb 10 15:05:49 CST 2015

On 10 February 2015 at 20:14, Matteo Bruni <mbruni at codeweavers.com> wrote:
>          gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_ROW_LENGTH, src_pitch / format->byte_count);
> +        if (src_pitch & (surface_alignment - 1))
> +            gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
What's a bit awkward about this is that if the pitch isn't a multiple
of the pixel byte width it's still not going to work. But I guess this
is the best we can do.

More information about the wine-devel mailing list