wined3d: Upload textures if NO_DIRTY_UPDATE flag is set when locking dynamic textures.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
49f9e545fb
commit
6cf2dc67e1
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue