This resolves the issue which !294 addresses, without the complexity and performance cost. Unlike !294 it doesn't fix Vulkan image layout mismatches, but I have an alternative fix for those too.