Can you move this to the gfx crate? I'd like to keep most of the code that actually touches Azure in there. Otherwise this patch looks good.