direct3d11: only set successful state when at the end