Henri Verbeet : wined3d: Release the stateblock before destroying the GL context.