[5/5] WineD3D: Implement buffer subrange mapping with GL_APPLE_flush_buffer_range

Stefan Dösinger stefan at codeweavers.com
Wed Dec 16 07:19:59 CST 2009

Am 16.12.2009 um 13:44 schrieb Henri Verbeet:

> 2009/12/16 Stefan Dösinger <stefan at codeweavers.com>:
>> The best way I see to merge those two tracking mechanisms is to organize them as a list, and upload all modified ranges in PreLoad(), or if the buffer is single buffered and dynamic, flush all the ranges after the last unmap, and clear the list in both PreLoad and unmap. That way we can share the data structure, although it doesn't perfectly fit either purpose. We can also share some of the code. The downside is that GL doesn't start flushing until the final unmap on dynamic buffers.
> A list should work, but it doesn't have to be a single list.
Actually, since we're not going to Unmap-flush and PreLoad() the buffer(its either-or), I can use the same data structure for the stack and list(or well, dynamic array). I just have to watch out not to remove elements in any place in unlock that affects DOUBLEBUFFER buffers.

Here is what I have so far. Completely untested, and the flushing is not yet integrated.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: buffer_map_range.diff
Type: application/octet-stream
Size: 12542 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20091216/33a52c27/attachment-0001.obj>
-------------- next part --------------

More information about the wine-devel mailing list