From 3178e9095b222aec312b6b718d7942ebc893d2b4 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Sat, 30 Jul 2022 15:55:42 -0500 Subject: [PATCH] wined3d: Add a dirty region to the destination texture in wined3d_device_context_blt() if applicable. --- dlls/d3d8/tests/visual.c | 2 +- dlls/wined3d/texture.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c index b51760544c4..1f6e91609db 100644 --- a/dlls/d3d8/tests/visual.c +++ b/dlls/d3d8/tests/visual.c @@ -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); diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 09b26933353..88404c9f8a8 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -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; }