But yes, keeping track of the resource state might ultimately be nicer.
Not sure if what I did is what you intended: what do you think of the version I just pushed?
In the future more users could switch to the new `*_with_states()` functions and spare some boilerplate. In theory with this solution it is possible that some GPU time is wasted transitioning resources that will never be used again, but that looks like something we can afford. At least no new synchronization points should be added, I think.