d3d11: Introduce a function to convert D3D10 map types to wined3d map flags.
Signed-off-by: Chip Davis <cdavis@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bd9e3dde1e
commit
43a4037d33
|
@ -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();
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue