This is the explanation for the d3d11 patch I submitted to wine-patches. Stefan said Henri might have an interest so I should post the explanation here
Comments are welcome :)
---------- Forwarded message ---------- From: Martell Malone martellmalone@gmail.com Date: Mon, Feb 2, 2015 at 7:12 PM Subject: Re: Add d3d11_CreateDeviceAndSwapChain To: Stefan Dösinger stefandoesinger@gmail.com
Whoops that sent without my comments
In the d3d code we use use 8 byte extran indentation for continued lines:
void function() { <4> FIXME("bla long text bla\n", <4> <8> param1, param2); }
I have sent an updated patch to reflect this.
I'm curious, does this improve the behavior of some application? E.g. game
X now falls back to d3d9 without crashing due to the stub?
My main focus for writing this was for the mingw-w64 project that imports the headers and libs from wine. We were just casually missing 1 of the 3 most important functions so I sent in this patch :)
There are 2 ways to create a device and swapchain however. You can do them seperatly or this function does them both at once. I assume that this returns the correct error like CreateDevice so that if the application has a fallback it can use it. So thats highly possible.
Kind Regards Martell
On Mon, Feb 2, 2015 at 7:06 PM, Martell Malone martellmalone@gmail.com wrote:
Hi Stefan,
On Mon, Feb 2, 2015 at 6:33 PM, Stefan Dösinger <stefandoesinger@gmail.com
wrote:
Hi,
I'm curious, does this improve the behavior of some application? E.g. game X now falls back to d3d9 without crashing due to the stub?
+HRESULT WINAPI D3D11CreateDeviceAndSwapChain(IDXGIAdapter *adapter,
D3D_DRIVER_TYPE driver, HMODULE swrast, UINT flags,
const D3D_FEATURE_LEVEL
*feature_levels, UINT levels, UINT sdk_version,
const
DXGI_SWAP_CHAIN_DESC *swapchain_desc, IDXGISwapChain ** swapchain,
ID3D11Device **device,
D3D_FEATURE_LEVEL *feature_level, ID3D11DeviceContext **context)
+{
- FIXME("stub: adapter %p, driver_type %s, swrast %p, flags %#x,
feature_levels %p, levels %#x, sdk_version %d, "
"swapchain_desc %p, swapchain %p, device %p, feature_level
%p, context %p\n", adapter, debug_d3d_driver_type(driver_type), swrast,
flags, feature_levels, levels, sdk_version, swapchain_desc,
swapchain, device, feature_level, context);
- return E_OUTOFMEMORY;
sdk_version is an UINT, you need to print it with %u.
In the d3d code we use use 8 byte extran indentation for continued lines:
void function() { <4> FIXME("bla long text bla\n", <4> <8> param1, param2); }
Cheers, Stefan