I like to see a flag for glMapBufferRange that will allow the usage of this buffer while mapped. The use case will be almost the same as for AMD_pinned_memory (streaming buffers without overhead) but with less pitfalls imo.
The main difference to AMD_pinned_memory is the implicit memory mangement.
Solved AMD_pinned_memory pitfalls:
- OS dependent alignment done by driver
- Usage after free: The pointer will be invalid after the glUnmap call and the memory will be deleted when it isn’t needed any more by GL. glFinish isn’t needed any more
- No dependencies to other drivers which may also do magic on this memory block
- Current content has to be read back to cpu ram without GL_MAP_INVALIDATE_BUFFER_BIT, also with GL_MAP_INVALIDATE_RANGE_BIT.
-> Only done once in initialization
- Using of cpu memory is slow
-> Should only be used for streaming. So PCI-E is always the bottleneck