One of the resounding things that came out of the discussions at XDC was the mobile guys saying that they don't want to have to do contiguous memory allocation in their GPU driver. Instead, they wanted a central allocator (such as ION) that would understand all the constraints and be able to allocate an image. Both NVIDIA and Intel badly wanted to do the allocation inside their driver stack in the case of single-vendor interactions so that they could handle all their "magic".
Two options were discussed for resolving this:
- Require the client to go around to each of the drivers until it finds one that can allocate its image
- Have a central allocator (similar to gralloc) that understands everything
In the end, we settled on the second option (central allocator) with the understanding that it would have a bunch of pluggable back-ends and would internally walk around to the different back-ends until it found one that could allocate.
This answers the question for the final allocation step, but there are several more steps involved:
- Convert GL/Vulkan/CL/v4l image specification to allocator spec (VkFormat -> allocator format, etc.)
- Get allocation capabilities
- Intersect capabilities and union constraints
- Allocate memory (central)
- Lay out the image (highly vendor-specific except for the 2D case)
One of the resounding things that came out of the discussions at XDC was the mobile guys saying that they don't want to have to do contiguous memory allocation in their GPU driver. Instead, they wanted a central allocator (such as ION) that would understand all the constraints and be able to allocate an image. Both NVIDIA and Intel badly wanted to do the allocation inside their driver stack in the case of single-vendor interactions so that they could handle all their "magic".
Two options were discussed for resolving this:
In the end, we settled on the second option (central allocator) with the understanding that it would have a bunch of pluggable back-ends and would internally walk around to the different back-ends until it found one that could allocate.
This answers the question for the final allocation step, but there are several more steps involved: