Commit 5df46227 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

wined3d: Pass a struct wined3d_output pointer to wined3d_check_device_format_conversion().

parent 2e7db80b
......@@ -361,14 +361,20 @@ static HRESULT WINAPI d3d9_CheckDeviceFormatConversion(IDirect3D9Ex *iface, UINT
D3DDEVTYPE device_type, D3DFORMAT src_format, D3DFORMAT dst_format)
{
struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);
unsigned int output_idx;
HRESULT hr;
TRACE("iface %p, adapter %u, device_type %#x, src_format %#x, dst_format %#x.\n",
iface, adapter, device_type, src_format, dst_format);
output_idx = adapter;
if (output_idx >= d3d9->wined3d_output_count)
return D3DERR_INVALIDCALL;
wined3d_mutex_lock();
hr = wined3d_check_device_format_conversion(d3d9->wined3d, adapter, device_type,
wined3dformat_from_d3dformat(src_format), wined3dformat_from_d3dformat(dst_format));
hr = wined3d_check_device_format_conversion(d3d9->wined3d_outputs[output_idx],
device_type, wined3dformat_from_d3dformat(src_format),
wined3dformat_from_d3dformat(dst_format));
wined3d_mutex_unlock();
return hr;
......
......@@ -1772,11 +1772,12 @@ UINT CDECL wined3d_calculate_format_pitch(const struct wined3d *wined3d, UINT ad
return row_pitch;
}
HRESULT CDECL wined3d_check_device_format_conversion(const struct wined3d *wined3d, UINT adapter_idx,
enum wined3d_device_type device_type, enum wined3d_format_id src_format, enum wined3d_format_id dst_format)
HRESULT CDECL wined3d_check_device_format_conversion(const struct wined3d_output *output,
enum wined3d_device_type device_type, enum wined3d_format_id src_format,
enum wined3d_format_id dst_format)
{
FIXME("wined3d %p, adapter_idx %u, device_type %s, src_format %s, dst_format %s stub!\n",
wined3d, adapter_idx, debug_d3ddevicetype(device_type), debug_d3dformat(src_format),
FIXME("output %p, device_type %s, src_format %s, dst_format %s stub!\n",
output, debug_d3ddevicetype(device_type), debug_d3dformat(src_format),
debug_d3dformat(dst_format));
return WINED3D_OK;
......@@ -1838,7 +1839,7 @@ HRESULT CDECL wined3d_check_device_type(const struct wined3d *wined3d, UINT adap
if (backbuffer_format == WINED3DFMT_UNKNOWN)
backbuffer_format = display_format;
if (FAILED(wined3d_check_device_format_conversion(wined3d, adapter_idx,
if (FAILED(wined3d_check_device_format_conversion(&wined3d->adapters[adapter_idx]->outputs[0],
device_type, backbuffer_format, display_format)))
{
TRACE("Format conversion from %s to %s not supported.\n",
......
......@@ -4,7 +4,7 @@
@ cdecl wined3d_calculate_format_pitch(ptr long long long)
@ cdecl wined3d_check_depth_stencil_match(ptr long long long long long)
@ cdecl wined3d_check_device_format(ptr long long long long long long long)
@ cdecl wined3d_check_device_format_conversion(ptr long long long long)
@ cdecl wined3d_check_device_format_conversion(ptr long long long)
@ cdecl wined3d_check_device_multisample_type(ptr long long long long long ptr)
@ cdecl wined3d_check_device_type(ptr long long long long long)
@ cdecl wined3d_create(long)
......
......@@ -2253,7 +2253,7 @@ HRESULT __cdecl wined3d_check_depth_stencil_match(const struct wined3d *wined3d,
HRESULT __cdecl wined3d_check_device_format(const struct wined3d *wined3d, UINT adaper_idx,
enum wined3d_device_type device_type, enum wined3d_format_id adapter_format_id, DWORD usage,
unsigned int bind_flags, enum wined3d_resource_type resource_type, enum wined3d_format_id check_format_id);
HRESULT __cdecl wined3d_check_device_format_conversion(const struct wined3d *wined3d, UINT adapter_idx,
HRESULT __cdecl wined3d_check_device_format_conversion(const struct wined3d_output *output,
enum wined3d_device_type device_type, enum wined3d_format_id source_format_id,
enum wined3d_format_id target_format_id);
HRESULT __cdecl wined3d_check_device_multisample_type(const struct wined3d *wined3d, UINT adapter_idx,
......
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