=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: wined3d: Shadow buffers in sysmem when software vertexprocessing is used.

Alexandre Julliard julliard at winehq.org
Tue Jan 15 13:46:18 CST 2013


Module: wine
Branch: master
Commit: 151407e5bfbd393ed83526649e1b2a62878c7690
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=151407e5bfbd393ed83526649e1b2a62878c7690

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Tue Jan 15 14:03:18 2013 +0100

wined3d: Shadow buffers in sysmem when software vertexprocessing is used.

---

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

diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index c8217e6..415b5e5 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -1207,6 +1207,15 @@ 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);
 
+    if (device->create_parms.flags & WINED3DCREATE_SOFTWARE_VERTEXPROCESSING)
+    {
+        /* SWvp always returns the same pointer in buffer maps and retains data in DISCARD maps.
+         * Keep a system memory copy of the buffer to provide the same behavior to the application.
+         * Still use a VBO to support OpenGL 3 core contexts. */
+        TRACE("Using doublebuffer mode because of software vertex processing\n");
+        buffer->flags |= WINED3D_BUFFER_DOUBLEBUFFER;
+    }
+
     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 +




More information about the wine-cvs mailing list