Matteo Bruni : d3d8: Always allow read and write map access to non-DEFAULT buffers.
Alexandre Julliard
julliard at winehq.org
Tue May 14 15:43:02 CDT 2019
Module: wine
Branch: master
Commit: 7dfc56937d95cbfac0dc0c2c2e2ef3a610825292
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7dfc56937d95cbfac0dc0c2c2e2ef3a610825292
Author: Matteo Bruni <mbruni at codeweavers.com>
Date: Mon May 13 20:34:19 2019 +0200
d3d8: Always allow read and write map access to non-DEFAULT buffers.
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/d3d8/buffer.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dlls/d3d8/buffer.c b/dlls/d3d8/buffer.c
index 822730f..8598766 100644
--- a/dlls/d3d8/buffer.c
+++ b/dlls/d3d8/buffer.c
@@ -309,6 +309,9 @@ HRESULT vertexbuffer_init(struct d3d8_vertexbuffer *buffer, struct d3d8_device *
desc.usage = usage & WINED3DUSAGE_MASK;
desc.bind_flags = 0;
desc.access = wined3daccess_from_d3dpool(pool, usage) | map_access_from_usage(usage);
+ /* Buffers are always readable. */
+ if (pool != D3DPOOL_DEFAULT)
+ desc.access |= WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W;
desc.misc_flags = 0;
desc.structure_byte_stride = 0;
@@ -628,6 +631,9 @@ HRESULT indexbuffer_init(struct d3d8_indexbuffer *buffer, struct d3d8_device *de
desc.usage = (usage & WINED3DUSAGE_MASK) | WINED3DUSAGE_STATICDECL;
desc.bind_flags = 0;
desc.access = wined3daccess_from_d3dpool(pool, usage) | map_access_from_usage(usage);
+ /* Buffers are always readable. */
+ if (pool != D3DPOOL_DEFAULT)
+ desc.access |= WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W;
desc.misc_flags = 0;
desc.structure_byte_stride = 0;
More information about the wine-cvs
mailing list