=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wined3d: Use WINED3D_LOCATION_DISCARDED before initializing buffers with data.

Alexandre Julliard julliard at winehq.org
Wed Jun 20 17:13:13 CDT 2018


Module: wine
Branch: master
Commit: 537007525a8909a2295bd7cd123f0eb6ce1b77cb
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=537007525a8909a2295bd7cd123f0eb6ce1b77cb

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Tue Jun 19 17:15:00 2018 +0200

wined3d: Use WINED3D_LOCATION_DISCARDED before initializing buffers with data.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/buffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index e06d156..4b14d68 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -1354,7 +1354,7 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
     }
     buffer->buffer_type_hint = buffer_type_hint_from_bind_flags(gl_info, bind_flags);
     buffer->bind_flags = bind_flags;
-    buffer->locations = WINED3D_LOCATION_SYSMEM;
+    buffer->locations = data ? WINED3D_LOCATION_DISCARDED : WINED3D_LOCATION_SYSMEM;
 
     if (!wined3d_resource_allocate_sysmem(&buffer->resource))
         return E_OUTOFMEMORY;




More information about the wine-cvs mailing list