d3dx10: Implement D3DX10CreateDeviceAndSwapChain.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alistair Leslie-Hughes 2016-08-05 20:56:33 +02:00 committed by Alexandre Julliard
parent f110a82dd0
commit deafe568d2
3 changed files with 21 additions and 1 deletions

View File

@ -19,7 +19,7 @@
@ stub D3DX10CreateAsyncTextureInfoProcessor(ptr ptr) @ stub D3DX10CreateAsyncTextureInfoProcessor(ptr ptr)
@ stub D3DX10CreateAsyncTextureProcessor(ptr ptr ptr) @ stub D3DX10CreateAsyncTextureProcessor(ptr ptr ptr)
@ stdcall D3DX10CreateDevice(ptr long long long ptr) @ stdcall D3DX10CreateDevice(ptr long long long ptr)
@ stub D3DX10CreateDeviceAndSwapChain(ptr long long long ptr ptr ptr) @ stdcall D3DX10CreateDeviceAndSwapChain(ptr long long long ptr ptr ptr)
@ stdcall D3DX10CreateEffectFromFileA(str ptr ptr str long long ptr ptr ptr ptr ptr ptr) @ stdcall D3DX10CreateEffectFromFileA(str ptr ptr str long long ptr ptr ptr ptr ptr ptr)
@ stdcall D3DX10CreateEffectFromFileW(wstr ptr ptr str long long ptr ptr ptr ptr ptr ptr) @ stdcall D3DX10CreateEffectFromFileW(wstr ptr ptr str long long ptr ptr ptr ptr ptr ptr)
@ stdcall D3DX10CreateEffectFromMemory(ptr long str ptr ptr str long long ptr ptr ptr ptr ptr ptr) @ stdcall D3DX10CreateEffectFromMemory(ptr long str ptr ptr str long long ptr ptr ptr ptr ptr ptr)

View File

@ -187,6 +187,23 @@ HRESULT WINAPI D3DX10CreateDevice(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE drive
return hr; return hr;
} }
HRESULT WINAPI D3DX10CreateDeviceAndSwapChain(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE driver_type,
HMODULE swrast, unsigned int flags, DXGI_SWAP_CHAIN_DESC *desc, IDXGISwapChain **swapchain,
ID3D10Device **device)
{
HRESULT hr;
TRACE("adapter %p, driver_type %d, swrast %p, flags %#x, desc %p, swapchain %p, device %p.\n",
adapter, driver_type, swrast, flags, desc, swapchain, device);
if (SUCCEEDED(hr = D3D10CreateDeviceAndSwapChain1(adapter, driver_type, swrast, flags, D3D10_FEATURE_LEVEL_10_1,
D3D10_1_SDK_VERSION, desc, swapchain, (ID3D10Device1 **)device)))
return hr;
return D3D10CreateDeviceAndSwapChain1(adapter, driver_type, swrast, flags, D3D10_FEATURE_LEVEL_10_0,
D3D10_1_SDK_VERSION, desc, swapchain, (ID3D10Device1 **)device);
}
HRESULT WINAPI D3DX10CreateTextureFromMemory(ID3D10Device *device, const void *src_data, HRESULT WINAPI D3DX10CreateTextureFromMemory(ID3D10Device *device, const void *src_data,
SIZE_T src_data_size, D3DX10_IMAGE_LOAD_INFO *loadinfo, ID3DX10ThreadPump *pump, SIZE_T src_data_size, D3DX10_IMAGE_LOAD_INFO *loadinfo, ID3DX10ThreadPump *pump,
ID3D10Resource **texture, HRESULT *hresult) ID3D10Resource **texture, HRESULT *hresult)

View File

@ -68,4 +68,7 @@ interface ID3DX10ThreadPump : IUnknown
cpp_quote("HRESULT WINAPI D3DX10UnsetAllDeviceObjects(ID3D10Device *device);") cpp_quote("HRESULT WINAPI D3DX10UnsetAllDeviceObjects(ID3D10Device *device);")
cpp_quote("HRESULT WINAPI D3DX10CreateDevice(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE driver_type,") cpp_quote("HRESULT WINAPI D3DX10CreateDevice(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE driver_type,")
cpp_quote(" HMODULE swrast, unsigned int flags, ID3D10Device **device);") cpp_quote(" HMODULE swrast, unsigned int flags, ID3D10Device **device);")
cpp_quote("HRESULT WINAPI D3DX10CreateDeviceAndSwapChain(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE driver_type,")
cpp_quote(" HMODULE swrast, unsigned int flags, DXGI_SWAP_CHAIN_DESC *desc, IDXGISwapChain **swapchain,")
cpp_quote(" ID3D10Device **device);")
cpp_quote("HRESULT WINAPI D3DX10GetFeatureLevel1(ID3D10Device *device, ID3D10Device1 **device1);") cpp_quote("HRESULT WINAPI D3DX10GetFeatureLevel1(ID3D10Device *device, ID3D10Device1 **device1);")