Commit 8623bd3b authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Replace the CPU access flags in struct wined3d_buffer_desc with resource access flags.

parent 82825d9c
......@@ -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;
......
......@@ -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);
......
......@@ -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;
};
......
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