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

Henri Verbeet hverbeet at gmail.com
Wed Dec 16 04:33:52 CST 2009

2009/12/15 Stefan Dösinger <stefan at 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".

> +struct map_range
A "wined3d_" prefix wouldn't hurt.

> +    LONG maps_size;
Does a signed variable really make sense here?

> +    /* TODO: GL_ARB_map_buffer_range */
> +    return gl_info->supported[APPLE_FLUSH_BUFFER_RANGE];
As a general rule, I think it makes sense to add support for ARB
extensions (when available) before vendor specific extensions.

More information about the wine-devel mailing list