[3/3] d3d9/tests: Test if IDirect3DSwapChain9Ex is available without IDirect3D9Ex

Henri Verbeet hverbeet at gmail.com
Mon Sep 2 04:37:08 CDT 2013


On 30 August 2013 17:09, Michael Müller <michael at fds-team.de> wrote:
>
> +    /* Get the implicit swapchain */
> +    hr = IDirect3DDevice9_GetSwapChain(device, 0, &swapchain);
> +    ok(SUCCEEDED(hr), "Failed to get the implicit swapchain (%08x)\n", hr);
> +    if (SUCCEEDED(hr))
> +    {
> +        hr = IDirect3DSwapChain9_QueryInterface(swapchain, &IID_IDirect3DSwapChain9Ex, (void **) &swapchainEx);
> +        ok(hr == E_NOINTERFACE,
> +           "IDirect3DSwapChain9::QueryInterface for IID_IDirect3DSwapChain9Ex returned %08x, expected E_NOINTERFACE\n",
> +           hr);
> +        ok(swapchainEx == NULL, "QueryInterface returned interface %p, expected NULL\n", swapchainEx);
> +        if(swapchainEx) IDirect3DSwapChain9Ex_Release(swapchainEx);
> +    }
> +    if(swapchain) IDirect3DSwapChain9_Release(swapchain);
It probably wouldn't hurt to have a test for the other case as well.
I.e., that you can get an IDirect3DSwapChain9Ex interface from a
device created from an IDirect3D9Ex interface.



More information about the wine-devel mailing list