[TC] I’m not sure I completely agree with this being a use case. From my understanding, the problem we’re trying to solve here isn’t a generic graphics memory manager but rather a memory manager to facilitate cross-device sharing of 2D image buffers. GPU drivers will still have their own allocators for textures which will probably be in a tiled or other proprietary format no other device can understand anyway. The use case where we (GPU driver vendors) might want uncached memory is for one-time texture upload. If we have a texture we know we’re only going to write to once (with the CPU), there is no benefit in using cached memory. In fact, there’s a potential performance drop if you used cached memory because the texture upload will cause useful cache lines to be evicted and replaced with useless lines for the texture. However, I don’t see any use case where we’d then want to share that CPU-uploaded texture with another device, in which case we would use our own (uncached) allocator, not this “cross-device” allocator. There’s also a school of thought (so I’m told) that for one-time texture upload you still want to use cached memory because more modern cores have smaller write buffers (so you want to use the cache for better combining of writes) and are good at detecting large sequential writes and thus don’t use the whole cache for those anyway. So, other than one-time texture upload, are there other graphics use cases you know of where it might be more optimal to use uncached memory? What about video decoder use-cases?
The memory mangaer should be used for all internal GPU memory management as well if desired.
If we have any hope of ever making open source ARM GPU drivers get upstream they can't all just go reinventing the wheel. They need to be based on a common layer.
Dave.