Matteo Bruni : ddraw: Drop map read access from the internal buffers used for user-pointer draws.

Alexandre Julliard julliard at winehq.org
Mon Jan 28 16:17:02 CST 2019


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

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Fri Jan 25 18:15:08 2019 +0100

ddraw: Drop map read access from the internal buffers used for user-pointer draws.

Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ddraw/device.c        | 4 ++--
 dlls/ddraw/executebuffer.c | 5 ++---
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 48803f8..4b58b75 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -3471,7 +3471,7 @@ static HRESULT d3d_device_prepare_vertex_buffer(struct d3d_device *device, UINT
         desc.byte_width = size;
         desc.usage = WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_WRITEONLY;
         desc.bind_flags = WINED3D_BIND_VERTEX_BUFFER;
-        desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W;
+        desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_W;
         desc.misc_flags = 0;
         desc.structure_byte_stride = 0;
 
@@ -3663,7 +3663,7 @@ static HRESULT d3d_device_prepare_index_buffer(struct d3d_device *device, UINT m
         desc.byte_width = size;
         desc.usage = WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_WRITEONLY | WINED3DUSAGE_STATICDECL;
         desc.bind_flags = WINED3D_BIND_INDEX_BUFFER;
-        desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W;
+        desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_W;
         desc.misc_flags = 0;
         desc.structure_byte_stride = 0;
 
diff --git a/dlls/ddraw/executebuffer.c b/dlls/ddraw/executebuffer.c
index 2ba29a7..4b4af63 100644
--- a/dlls/ddraw/executebuffer.c
+++ b/dlls/ddraw/executebuffer.c
@@ -131,8 +131,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer,
                     desc.byte_width = new_size * sizeof(*indices);
                     desc.usage = WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_WRITEONLY | WINED3DUSAGE_STATICDECL;
                     desc.bind_flags = WINED3D_BIND_INDEX_BUFFER;
-                    desc.access = WINED3D_RESOURCE_ACCESS_GPU
-                            | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W;
+                    desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_W;
                     desc.misc_flags = 0;
                     desc.structure_byte_stride = 0;
 
@@ -639,7 +638,7 @@ static HRESULT WINAPI d3d_execute_buffer_SetExecuteData(IDirect3DExecuteBuffer *
 
         desc.byte_width = new_size * sizeof(D3DTLVERTEX);
         desc.usage = WINED3DUSAGE_STATICDECL;
-        desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W;
+        desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_W;
 
         if (FAILED(hr = wined3d_buffer_create(buffer->d3ddev->wined3d_device, &desc,
                 NULL, NULL, &ddraw_null_wined3d_parent_ops, &dst_buffer)))




More information about the wine-cvs mailing list