Related to #648 Roughly, the states could be defined of the following set: - open - recording a compute pass - recording a render pass - closed/finished - invalid