[PATCH v4] wined3d: Allow setting user memory for mipmapped texture in wined3d_texture_update_desc().

Henri Verbeet hverbeet at gmail.com
Wed May 13 09:49:19 CDT 2020


On Mon, 11 May 2020 at 20:26, Paul Gofman <pgofman at codeweavers.com> wrote:
> +    if (set_user_memory_only)
> +    {
> +        if (!texture->row_pitch)
> +            wined3d_format_calculate_pitch(texture->resource.format, 1, texture->resource.width,
> +                    texture->resource.height, &texture->row_pitch, &texture->slice_pitch);
That's not the correct pitch calculation. (Incorrect alignment.) I
would recommend simply using wined3d_texture_get_pitch().

> +
> +        set_user_memory_only = pitch == texture->row_pitch;
> +    }
It also seems best to compare the slice pitches as well, even if in
practice they may not ever be different unless the row pitches also
are.



More information about the wine-devel mailing list