Commit 6cf2dc67 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

wined3d: Upload textures if NO_DIRTY_UPDATE flag is set when locking dynamic textures.

parent 49f9e545
......@@ -5521,7 +5521,7 @@ static void add_dirty_rect_test(void)
fill_surface(surface_dynamic, 0x00ffff00, D3DLOCK_NO_DIRTY_UPDATE);
add_dirty_rect_test_draw(device);
color = getPixelColor(device, 320, 240);
todo_wine ok(color_match(color, 0x00ffff00, 1),
ok(color_match(color, 0x00ffff00, 1),
"Expected color 0x00ffff00, got 0x%08x.\n", color);
hr = IDirect3DDevice8_Present(device, NULL, NULL, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to present, hr %#x.\n", hr);
......
......@@ -17595,7 +17595,7 @@ static void add_dirty_rect_test(void)
fill_surface(surface_dynamic, 0x00ffff00, D3DLOCK_NO_DIRTY_UPDATE);
add_dirty_rect_test_draw(device);
color = getPixelColor(device, 320, 240);
todo_wine ok(color_match(color, 0x00ffff00, 1),
ok(color_match(color, 0x00ffff00, 1),
"Expected color 0x00ffff00, got 0x%08x.\n", color);
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to present, hr %#x.\n", hr);
......@@ -1752,7 +1752,8 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
return E_OUTOFMEMORY;
}
if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY)))
if (!(flags & WINED3D_MAP_READONLY)
&& (!(flags & WINED3D_MAP_NO_DIRTY_UPDATE) || (resource->usage & WINED3DUSAGE_DYNAMIC)))
wined3d_texture_invalidate_location(texture, sub_resource_idx, ~texture->resource.map_binding);
wined3d_texture_get_memory(texture, sub_resource_idx, &data, texture->resource.map_binding);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment