If I'm not forgetting anything, I think there are currently two unresolved issues in this MR:
- Label ID allocation; we want to avoid using any label IDs already used by the original shader. - The issue Giovanni identified about the intermediate state of e.g. IF/ELSE/ENDIF inside loops. One thing that's not clear to me is whether that ends up resulting in invalid SPIR-V, or just vsir that looks a bit funny. I think we end up with essentially the same SPIR-V as before, so in that sense it may be fine, right?