<div dir="ltr"><div>This is the explanation for the d3d11 patch I submitted to wine-patches.<br></div>Stefan said Henri might have an interest so I should post the explanation here<br><div><br></div><div>Comments are welcome :)<br></div><div><br><div><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Martell Malone</b> <span dir="ltr"><<a href="mailto:martellmalone@gmail.com" target="_blank">martellmalone@gmail.com</a>></span><br>Date: Mon, Feb 2, 2015 at 7:12 PM<br>Subject: Re: Add d3d11_CreateDeviceAndSwapChain<br>To: Stefan Dösinger <<a href="mailto:stefandoesinger@gmail.com" target="_blank">stefandoesinger@gmail.com</a>><br><br><br><div dir="ltr"><div><div><div><div><div><div>Whoops that sent without my comments<span><br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">In the d3d code we use use 8 byte extran indentation for continued lines:<br>
<br>
void function()<br>
{<br>
<4> FIXME("bla long text bla\n",<br>
<4> <8>     param1, param2);<br>
}<br></blockquote><div> </div></span>
I have sent an updated patch to reflect this.<span><br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">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?<br></blockquote><br></span></div>My main focus for writing this was for the mingw-w64 project that imports the headers and libs from wine.<br></div><div>We were just casually missing 1 of the 3 most important functions so I sent in this patch :)<br><br></div>There are 2 ways to create a device and swapchain however. You can do them seperatly or this function does them both at once.<br></div>I assume that this returns the correct error like CreateDevice so that if the application has a fallback it can use it.<br></div>So thats highly possible.<br><br></div>Kind Regards<span><font color="#888888"><br></font></span></div><span><font color="#888888">Martell<br></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 2, 2015 at 7:06 PM, Martell Malone <span dir="ltr"><<a href="mailto:martellmalone@gmail.com" target="_blank">martellmalone@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Stefan,<br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 2, 2015 at 6:33 PM, Stefan Dösinger <span dir="ltr"><<a href="mailto:stefandoesinger@gmail.com" target="_blank">stefandoesinger@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
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?<br>
<br>
> +HRESULT WINAPI D3D11CreateDeviceAndSwapChain(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver, HMODULE swrast, UINT flags,<br>
> +                                             const D3D_FEATURE_LEVEL *feature_levels, UINT levels, UINT sdk_version,<br>
> +                                             const DXGI_SWAP_CHAIN_DESC *swapchain_desc, IDXGISwapChain ** swapchain,<br>
> +                                             ID3D11Device **device, D3D_FEATURE_LEVEL *feature_level, ID3D11DeviceContext **context)<br>
> +{<br>
> +    FIXME("stub: adapter %p, driver_type %s, swrast %p, flags %#x, feature_levels %p, levels %#x, sdk_version %d, "<br>
> +          "swapchain_desc %p, swapchain %p, device %p, feature_level %p, context %p\n", adapter, debug_d3d_driver_type(driver_type), swrast,<br>
> +          flags, feature_levels, levels, sdk_version, swapchain_desc, swapchain, device, feature_level, context);<br>
> +    return E_OUTOFMEMORY;<br>
sdk_version is an UINT, you need to print it with %u.<br>
<br>
In the d3d code we use use 8 byte extran indentation for continued lines:<br>
<br>
void function()<br>
{<br>
<4> FIXME("bla long text bla\n",<br>
<4> <8>     param1, param2);<br>
}<br>
<br>
Cheers,<br>
Stefan<br>
<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></div><br></div></div></div>