  We reconsider the relation of superconformal indices of superconformal field
theories of class S with five-dimensional N=2 supersymmetric Yang-Mills theory
compactified on the product space of a round three-sphere and a Riemann
surface. We formulate the five-dimensional theory in supersymmetric backgrounds
preseving N=2 and N=1 supersymmetries and discuss a subtle point in the
previous paper concerned with the partial twisting on the Riemann surface. We
further compute the partition function by localization of the five-dimensional
theory on a squashed three-sphere in N=2 and N=1 supersymmetric backgrounds and
on an ellipsoid three-sphere in an N=1 supersymmetric background.
