Here's the latest version of this series with only a few minor changes. It adapts to the API changes for surface_get_capabilities and changes how the allocator is found for fences.