On Thu, Feb 6, 2014 at 11:08 PM, Eric Anholt <[email protected]> wrote: > Marek Olšák <[email protected]> writes: > >> From: Marek Olšák <[email protected]> >> >> OpenGL allows a buffer to be mapped only once, but we also map buffers >> internally, e.g. in the software primitive restart fallback, for PBOs, >> vbo_get_minmax_index, etc. This has always been a problem, but it will >> be a bigger problem with persistent buffer mappings, which will prevent >> all Mesa functions from mapping buffers for internal purposes. >> >> This adds a driver inteface to core Mesa which supports multiple buffer >> mappings and allows 2 mappings: one for the GL user and one for Mesa. >> >> Note that Gallium supports an unlimited number of buffer and texture >> mappings, so it's not really an issue for Gallium. >> >> This is just the interface change. Please review. If you don't like it, >> feel free to propose how you would do it. Thank you. > > Having an index makes sense to me -- you have to either have that in the > caller, or have the MBR hook return a pointer to private storage that > gets passed in to Unmap, which sucks more. > > My only question is whether we want to make Offset/Length/Pointer be > GL-only properties that are managed by glMapBuffer() and > glMapBufferRange() for us, then have drivers like intel store whatever > the need in their own private area.
Offset/Length/Pointer are used by the vbo module and other code. It's not easy to get rid of them. Marek _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
