Add row-major indices as option to gridsample.