wined3d: Add a dirty region to the destination texture in wined3d_device_context_blt() if applicable.

This commit is contained in:
Zebediah Figura 2022-07-30 15:55:42 -05:00 committed by Alexandre Julliard
parent fdd8c0748b
commit 3178e9095b
2 changed files with 4 additions and 1 deletions

View file

@ -5726,7 +5726,7 @@ static void add_dirty_rect_test(void)
ok(hr == S_OK, "Failed to update texture, hr %#lx.\n", hr);
add_dirty_rect_test_draw(device);
color = getPixelColor(device, 320, 240);
todo_wine ok(color_match(color, 0x00ff00ff, 1), "Got unexpected color 0x%08x.\n", color);
ok(color_match(color, 0x00ff00ff, 1), "Got unexpected color 0x%08x.\n", color);
/* Tests with managed textures. */
fill_surface(surface_managed0, 0x00ff0000, 0);

View file

@ -4171,6 +4171,9 @@ HRESULT CDECL wined3d_device_context_blt(struct wined3d_device_context *context,
wined3d_device_context_emit_blt_sub_resource(&dst_texture->resource.device->cs->c, &dst_texture->resource,
dst_sub_resource_idx, &dst_box, &src_texture->resource, src_sub_resource_idx, &src_box, flags, fx, filter);
if (dst_texture->dirty_regions)
wined3d_texture_add_dirty_region(dst_texture, dst_sub_resource_idx, &dst_box);
return WINED3D_OK;
}