On Wed, 17 Mar 2021 at 13:52, Jan Sikorski jsikorski@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.