Signed-off-by: Chip Davis cdavis@codeweavers.com --- dlls/d3d11/buffer.c | 2 +- dlls/d3d11/d3d11_private.h | 1 + dlls/d3d11/texture.c | 6 +++--- dlls/d3d11/utils.c | 5 +++++ 4 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d11/buffer.c b/dlls/d3d11/buffer.c index f2b950f357f..b33be57d439 100644 --- a/dlls/d3d11/buffer.c +++ b/dlls/d3d11/buffer.c @@ -310,7 +310,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_buffer_Map(ID3D10Buffer *iface, D3D10_MAP
wined3d_mutex_lock(); hr = wined3d_resource_map(wined3d_buffer_get_resource(buffer->wined3d_buffer), 0, - &wined3d_map_desc, NULL, wined3d_map_flags_from_d3d11_map_type(map_type)); + &wined3d_map_desc, NULL, wined3d_map_flags_from_d3d10_map_type(map_type)); *data = wined3d_map_desc.data; wined3d_mutex_unlock();
diff --git a/dlls/d3d11/d3d11_private.h b/dlls/d3d11/d3d11_private.h index 1e8d86fede0..48c76959fae 100644 --- a/dlls/d3d11/d3d11_private.h +++ b/dlls/d3d11/d3d11_private.h @@ -69,6 +69,7 @@ DWORD wined3d_usage_from_d3d11(enum D3D11_USAGE usage) DECLSPEC_HIDDEN; struct wined3d_resource *wined3d_resource_from_d3d11_resource(ID3D11Resource *resource) DECLSPEC_HIDDEN; struct wined3d_resource *wined3d_resource_from_d3d10_resource(ID3D10Resource *resource) DECLSPEC_HIDDEN; DWORD wined3d_map_flags_from_d3d11_map_type(D3D11_MAP map_type) DECLSPEC_HIDDEN; +DWORD wined3d_map_flags_from_d3d10_map_type(D3D10_MAP map_type) DECLSPEC_HIDDEN; DWORD wined3d_clear_flags_from_d3d11_clear_flags(UINT clear_flags) DECLSPEC_HIDDEN; unsigned int wined3d_access_from_d3d11(D3D11_USAGE usage, UINT cpu_access) DECLSPEC_HIDDEN;
diff --git a/dlls/d3d11/texture.c b/dlls/d3d11/texture.c index 36d07beb23d..1682aa05d99 100644 --- a/dlls/d3d11/texture.c +++ b/dlls/d3d11/texture.c @@ -356,7 +356,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture1d_Map(ID3D10Texture1D *iface, UIN
wined3d_mutex_lock(); if (SUCCEEDED(hr = wined3d_resource_map(wined3d_texture_get_resource(texture->wined3d_texture), sub_resource_idx, - &wined3d_map_desc, NULL, wined3d_map_flags_from_d3d11_map_type(map_type)))) + &wined3d_map_desc, NULL, wined3d_map_flags_from_d3d10_map_type(map_type)))) { *data = wined3d_map_desc.data; } @@ -858,7 +858,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture2d_Map(ID3D10Texture2D *iface, UIN
wined3d_mutex_lock(); if (SUCCEEDED(hr = wined3d_resource_map(wined3d_texture_get_resource(texture->wined3d_texture), sub_resource_idx, - &wined3d_map_desc, NULL, wined3d_map_flags_from_d3d11_map_type(map_type)))) + &wined3d_map_desc, NULL, wined3d_map_flags_from_d3d10_map_type(map_type)))) { mapped_texture->pData = wined3d_map_desc.data; mapped_texture->RowPitch = wined3d_map_desc.row_pitch; @@ -1355,7 +1355,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture3d_Map(ID3D10Texture3D *iface, UIN
wined3d_mutex_lock(); if (SUCCEEDED(hr = wined3d_resource_map(wined3d_texture_get_resource(texture->wined3d_texture), sub_resource_idx, - &wined3d_map_desc, NULL, wined3d_map_flags_from_d3d11_map_type(map_type)))) + &wined3d_map_desc, NULL, wined3d_map_flags_from_d3d10_map_type(map_type)))) { mapped_texture->pData = wined3d_map_desc.data; mapped_texture->RowPitch = wined3d_map_desc.row_pitch; diff --git a/dlls/d3d11/utils.c b/dlls/d3d11/utils.c index 065436cb4f5..0e483fd4bbe 100644 --- a/dlls/d3d11/utils.c +++ b/dlls/d3d11/utils.c @@ -756,6 +756,11 @@ DWORD wined3d_map_flags_from_d3d11_map_type(D3D11_MAP map_type) } }
+DWORD wined3d_map_flags_from_d3d10_map_type(D3D10_MAP map_type) +{ + return wined3d_map_flags_from_d3d11_map_type((D3D11_MAP)map_type); +} + DWORD wined3d_clear_flags_from_d3d11_clear_flags(UINT clear_flags) { DWORD wined3d_clear_flags = 0;