2009/12/16 Stefan Dösinger stefan@codeweavers.com:
Am 16.12.2009 um 11:33 schrieb Henri Verbeet:
2009/12/15 Stefan Dösinger stefan@codeweavers.com:
@@ -85,6 +85,21 @@ static void buffer_create_buffer_object(struct wined3d_buffer *This)
...
- This->maps = HeapAlloc(GetProcessHeap(), 0, sizeof(*This->maps));
This is the wrong place for that. Either do it in buffer_init(), or in buffer_Map(). Keeping track of maps should also be in a separate patch, and you should integrate "lock_count".
No, I think its the right place because tracking the maps only makes sense with a VBO, and if we have a dynamic VBO we have to keep track of the maps(even with ARB). So I think its just right to allocate and free this together with the VBO.
What you're doing (or should be doing) is extending the "lock_count/dirty_start/dirty_end" scheme to something more detailed. I don't think using two different schemes depending on whether the buffer is dynamic or not is a good idea.