diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index 6f410fd040f..0cd741d0558 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -1388,13 +1388,13 @@ static void test_depth_stencil_reset(void) present_parameters.AutoDepthStencilFormat = D3DFMT_D24S8; hr = IDirect3DDevice8_Reset(device, &present_parameters); - todo_wine ok(hr == D3D_OK, "IDirect3DDevice8_Reset failed with 0x%08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice8_Reset failed with 0x%08x\n", hr); if (FAILED(hr)) goto cleanup; hr = IDirect3DDevice8_GetDepthStencilSurface(device, &surface); - todo_wine ok(hr == D3D_OK, "GetDepthStencilSurface failed with 0x%08x\n", hr); - todo_wine ok(surface != NULL, "Depth stencil should not be NULL\n"); + ok(hr == D3D_OK, "GetDepthStencilSurface failed with 0x%08x\n", hr); + ok(surface != NULL, "Depth stencil should not be NULL\n"); if (surface) IDirect3DSurface8_Release(surface); cleanup: diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index fe4318ede4a..2f5bbc83705 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -1079,13 +1079,13 @@ static void test_reset(void) d3dpp.AutoDepthStencilFormat = D3DFMT_D24S8; hr = IDirect3DDevice9_Reset(pDevice, &d3dpp); - todo_wine ok(hr == D3D_OK, "IDirect3DDevice9_Reset failed with 0x%08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice9_Reset failed with 0x%08x\n", hr); if (FAILED(hr)) goto cleanup; hr = IDirect3DDevice9_GetDepthStencilSurface(pDevice, &surface); - todo_wine ok(hr == D3D_OK, "GetDepthStencilSurface failed with 0x%08x\n", hr); - todo_wine ok(surface != NULL, "Depth stencil should not be NULL\n"); + ok(hr == D3D_OK, "GetDepthStencilSurface failed with 0x%08x\n", hr); + ok(surface != NULL, "Depth stencil should not be NULL\n"); if (surface) IDirect3DSurface9_Release(surface); cleanup: diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 90940f89fff..253afa884a4 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -7612,8 +7612,25 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE ERR("Cannot change the device window yet\n"); } if (pPresentationParameters->EnableAutoDepthStencil && !This->auto_depth_stencil_buffer) { - WARN("Auto depth stencil enabled, but no auto depth stencil present, returning WINED3DERR_INVALIDCALL\n"); - return WINED3DERR_INVALIDCALL; + HRESULT hrc; + + TRACE("Creating the depth stencil buffer\n"); + + hrc = IWineD3DDeviceParent_CreateDepthStencilSurface(This->device_parent, + This->parent, + pPresentationParameters->BackBufferWidth, + pPresentationParameters->BackBufferHeight, + pPresentationParameters->AutoDepthStencilFormat, + pPresentationParameters->MultiSampleType, + pPresentationParameters->MultiSampleQuality, + FALSE, + &This->auto_depth_stencil_buffer); + + if (FAILED(hrc)) { + ERR("Failed to create the depth stencil buffer\n"); + IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain); + return WINED3DERR_INVALIDCALL; + } } /* Reset the depth stencil */