The render pass viewport and stencil is set to whatever is specified in the command. But for subsequent commands that don't have an opinion about these values, the old viewport and scissor rects remain in play. These must be reset to the size of the onscreen render target (the defaults that they begin with).