> Instead of combining create/map and
> unmap/destroy it would be better to make map more powerful.

If I understand correctly, you are proposing to add a subrectangle
parameter to map/unmap, so that you can collect multiple rectangle
updates in a single upload happening at transfer destruction time.

This is interesting: I think a better effect can be obtained by
merging the functions as described and also adding a
"validate_subrect" and "flush_subrect" ranges that would respectively
read back and upload a transfer subrectangle to/from the GPU object
(and of course, destruction would no longer implicitly flush and
creation no longer implicitly validate unless possibly told to so with
a specific flag).

> At map/unmap time if you know the
> subset of data being read/written you can optimize the amount of data
> being transferred, especially in the write-only case where you can
> keep track of the dirty ranges and possibly combine them to fewer
> uploads. If you combine create+map and unmap+destroy you end up
> limiting yourself for no reason other than minor convenience.

I think adding an explicit validate_subrect and flush_subrect allows
to do this, and is actually better since it also allows efficient
implementation of glFlushMappedBufferRange.

However, I'm not sure whether, in the OpenGL case, this would be an
optimization and not a pessimization.

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to