Commit 7dfc5693 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3d8: Always allow read and write map access to non-DEFAULT buffers.

parent 9d9dd8b3
...@@ -309,6 +309,9 @@ HRESULT vertexbuffer_init(struct d3d8_vertexbuffer *buffer, struct d3d8_device * ...@@ -309,6 +309,9 @@ HRESULT vertexbuffer_init(struct d3d8_vertexbuffer *buffer, struct d3d8_device *
desc.usage = usage & WINED3DUSAGE_MASK; desc.usage = usage & WINED3DUSAGE_MASK;
desc.bind_flags = 0; desc.bind_flags = 0;
desc.access = wined3daccess_from_d3dpool(pool, usage) | map_access_from_usage(usage); 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.misc_flags = 0;
desc.structure_byte_stride = 0; desc.structure_byte_stride = 0;
...@@ -628,6 +631,9 @@ HRESULT indexbuffer_init(struct d3d8_indexbuffer *buffer, struct d3d8_device *de ...@@ -628,6 +631,9 @@ HRESULT indexbuffer_init(struct d3d8_indexbuffer *buffer, struct d3d8_device *de
desc.usage = (usage & WINED3DUSAGE_MASK) | WINED3DUSAGE_STATICDECL; desc.usage = (usage & WINED3DUSAGE_MASK) | WINED3DUSAGE_STATICDECL;
desc.bind_flags = 0; desc.bind_flags = 0;
desc.access = wined3daccess_from_d3dpool(pool, usage) | map_access_from_usage(usage); 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.misc_flags = 0;
desc.structure_byte_stride = 0; desc.structure_byte_stride = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment