function executeCommandsInViewport(firstViewport, scene, passState) {
  const view = scene._view;
  const { renderTranslucentDepthForPick } = scene._environmentState;

  if (!firstViewport) {
    scene.frameState.commandList.length = 0;
  }

  updateAndRenderPrimitives(scene);

  view.createPotentiallyVisibleSet(scene);

  if (firstViewport) {
    executeComputeCommands(scene);
    if (!renderTranslucentDepthForPick) {
      executeShadowMapCastCommands(scene);
    }
  }

  executeCommands(scene, passState);
}
Execute the draw commands to render the scene into the viewport.
If this is the first viewport rendered, the framebuffers will be cleared to the background color.

@param {boolean} firstViewport <code>true</code> if this is the first viewport rendered.
@param {Scene} scene
@param {PassState} passState

@private