Henri Verbeet : wined3d: Do not evict the system memory copy in buffer_create_buffer_object().
Alexandre Julliard
julliard at winehq.org
Mon Jan 30 15:39:18 CST 2017
Module: wine
Branch: master
Commit: 451e137c1b491da467cfaa34b55d0d301a3002f7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=451e137c1b491da467cfaa34b55d0d301a3002f7
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Mon Jan 30 13:04:37 2017 +0100
wined3d: Do not evict the system memory copy in buffer_create_buffer_object().
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/buffer.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index b31394b..f0029b0 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -267,8 +267,6 @@ static BOOL buffer_create_buffer_object(struct wined3d_buffer *buffer, struct wi
else
wined3d_buffer_validate_location(buffer, WINED3D_LOCATION_BUFFER);
- wined3d_buffer_evict_sysmem(buffer);
-
return TRUE;
fail:
@@ -911,7 +909,14 @@ void wined3d_buffer_load(struct wined3d_buffer *buffer, struct wined3d_context *
return;
}
- wined3d_buffer_prepare_location(buffer, context, WINED3D_LOCATION_BUFFER);
+ if (!wined3d_buffer_prepare_location(buffer, context, WINED3D_LOCATION_BUFFER))
+ {
+ ERR("Failed to prepare buffer location.\n");
+ return;
+ }
+
+ if (buffer->resource.heap_memory)
+ wined3d_buffer_evict_sysmem(buffer);
/* Reading the declaration makes only sense if we have valid state information
* (i.e., if this function is called during draws). */
More information about the wine-cvs
mailing list