reorderByKind

Reorders the pipeline by the stage kind.

Pipeline stages will be sorted and ordered by the PipelineStage.Kind in ordinal order. PipelineStage.Kind.CONSTANT will retain the same location in the pipeline, and no stages will be reordered beyond a constant stage.

Note that this method does not guarantee that the reordered pipeline fully adheres to the necessary pipeline ordering. This will need to be checked by using PipelineVerifier and StageKindOrderingDiagnostic.

Return

A new stage with the pipeline reordered according to its PipelineStage.Kind.