I think this code could be separated into new layer, so that it's shared by all drivers. Like really, really all of them. Vulkan have this idea built...