On Mon, 11 May 2020 at 20:26, Paul Gofman pgofman@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.