Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/d3d11/buffer.c | 4 +++- dlls/wined3d/buffer.c | 5 +---- include/wine/wined3d.h | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/dlls/d3d11/buffer.c b/dlls/d3d11/buffer.c index ffa95a1..544e5a8 100644 --- a/dlls/d3d11/buffer.c +++ b/dlls/d3d11/buffer.c @@ -452,7 +452,9 @@ static HRESULT d3d_buffer_init(struct d3d_buffer *buffer, struct d3d_device *dev wined3d_desc.byte_width = buffer->desc.ByteWidth; wined3d_desc.usage = wined3d_usage_from_d3d11(0, buffer->desc.Usage); wined3d_desc.bind_flags = buffer->desc.BindFlags; - wined3d_desc.cpu_access_flags = buffer->desc.CPUAccessFlags; + if (~buffer->desc.CPUAccessFlags & (D3D11_CPU_ACCESS_WRITE | D3D11_CPU_ACCESS_READ)) + FIXME("Ignoring CPU access flags %#x.\n", buffer->desc.CPUAccessFlags); + wined3d_desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_CPU | WINED3D_RESOURCE_ACCESS_MAP; wined3d_desc.misc_flags = buffer->desc.MiscFlags; wined3d_desc.structure_byte_stride = buffer->desc.StructureByteStride;
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index 4baa123..53462a6 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -1426,11 +1426,8 @@ HRESULT CDECL wined3d_buffer_create(struct wined3d_device *device, const struct if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)))) return E_OUTOFMEMORY;
- FIXME("Ignoring access flags (pool).\n"); - if (FAILED(hr = buffer_init(object, device, desc->byte_width, desc->usage, WINED3DFMT_UNKNOWN, - WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_CPU | WINED3D_RESOURCE_ACCESS_MAP, - desc->bind_flags, data, parent, parent_ops))) + desc->access, desc->bind_flags, data, parent, parent_ops))) { WARN("Failed to initialize buffer, hr %#x.\n", hr); HeapFree(GetProcessHeap(), 0, object); diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index c27cf48..72168e5 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -1969,9 +1969,9 @@ struct wined3d_blt_fx struct wined3d_buffer_desc { unsigned int byte_width; - DWORD usage; + unsigned int usage; unsigned int bind_flags; - unsigned int cpu_access_flags; + unsigned int access; unsigned int misc_flags; unsigned int structure_byte_stride; };