Stefan Dösinger : wined3d: Give GL_ARB_map_buffer_range another try.

Alexandre Julliard julliard at
Fri Jun 17 13:13:47 CDT 2011

Module: wine
Branch: master
Commit: 68b15bc5ffe6ddf5d08cbc13479eaf718ad5e39f

Author: Stefan Dösinger <stefan at>
Date:   Tue Apr 19 21:24:26 2011 +0200

wined3d: Give GL_ARB_map_buffer_range another try.

Nvidia's 270.xx.yy driver series fix the glMapBuffer alignment issues that caused major
performance problems. If the user is using an older driver we now drop the VBO instead of using
doublebuffered loading, which means that we fall back to the current behavior(no dynamic VBO) as
needed. Dynamic VBOs are needed on Nvidia drivers for GL_ARB_instanced_arrays.


 dlls/wined3d/buffer.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index d9d9a2a..58352c9 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -1212,8 +1212,7 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
     TRACE("size %#x, usage %#x, format %s, memory @ %p, iface @ %p.\n", buffer->resource.size, buffer->resource.usage,
             debug_d3dformat(buffer->resource.format->id), buffer->resource.allocatedMemory, buffer);
-    /* GL_ARB_map_buffer_range is disabled for now due to numerous bugs and no gains */
-    dynamic_buffer_ok = gl_info->supported[APPLE_FLUSH_BUFFER_RANGE];
+    dynamic_buffer_ok = gl_info->supported[APPLE_FLUSH_BUFFER_RANGE] || gl_info->supported[ARB_MAP_BUFFER_RANGE];
     /* Observations show that drawStridedSlow is faster on dynamic VBs than converting +
      * drawStridedFast (half-life 2 and others).

More information about the wine-cvs mailing list