function getCubeFacesWithNdx(gl, options) {
    var faces = getCubeFaceOrder(gl, options);
    // work around bug in NVidia drivers. We have to upload the first face first else the driver crashes :(
    var facesWithNdx = faces.map(function(face, ndx) {
      return { face: face, ndx: ndx };
    });
    facesWithNdx.sort(function(a, b) {
      return a.face - b.face;
    });
    return facesWithNdx;
  }
Gets an array of FaceInfos
There's a bug in some NVidia drivers that will crash the driver if
`gl.TEXTURE_CUBE_MAP_POSITIVE_X` is not uploaded first. So, we take
the user's desired order from his faces to WebGL and make sure we
do the faces in WebGL order

@param {WebGLRenderingContext} gl the WebGLRenderingContext
@param {module:twgl.TextureOptions} options A TextureOptions object with whatever parameters you want set.
@return {FaceInfo[]} cubemap face infos. Arguably the `face` property of each element is redundent but
   it's needed internally to sort the array of `ndx` properties by `face`.