Stefan Dösinger : wined3d: Release the stateblock before destroying the swapchain.