[PATCH v2 1/5] wined3d: Handle partial updates to uncompressed 3D textures.

Henri Verbeet hverbeet at gmail.com
Thu Mar 18 08:33:21 CDT 2021


On Wed, 17 Mar 2021 at 13:52, Jan Sikorski <jsikorski at codeweavers.com> wrote:
> @@ -2231,25 +2231,41 @@ static void wined3d_texture_gl_upload_bo(const struct wined3d_format *src_format
>              update_h = 1;
>          }
>
> -        for (y = 0; y < y_count; ++y)
> +        if (src_slice_pitch && !(src_slice_pitch % src_row_pitch))
>          {
That's still a potential divide by zero. The application would have to
set a non-zero slice pitch and a zero row pitch to trigger that, which
is perhaps questionable, but I'm not aware of it being illegal.

Note that the issue you're fixing isn't partial updates. Partial
updates should work fine as long as the update uses the default slice
pitch; conversely, even full updates will be mishandled with
non-default slice pitches.



More information about the wine-devel mailing list