Commit d867c6aa authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

wined3d: Pass structure byte stride to wined3d_buffer_create().

parent 39a15ee4
......@@ -444,9 +444,7 @@ static HRESULT d3d_buffer_init(struct d3d_buffer *buffer, struct d3d_device *dev
wined3d_desc.bind_flags = buffer->desc.BindFlags;
wined3d_desc.cpu_access_flags = buffer->desc.CPUAccessFlags;
wined3d_desc.misc_flags = buffer->desc.MiscFlags;
if (buffer->desc.StructureByteStride)
FIXME("Ignoring structure byte stride %u.\n", buffer->desc.StructureByteStride);
wined3d_desc.structure_byte_stride = buffer->desc.StructureByteStride;
wined3d_mutex_lock();
wined3d_private_store_init(&buffer->private_store);
......
......@@ -1467,15 +1467,13 @@ HRESULT CDECL wined3d_buffer_create(struct wined3d_device *device, const struct
TRACE("device %p, desc %p, data %p, parent %p, parent_ops %p, buffer %p.\n",
device, desc, data, parent, parent_ops, buffer);
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
if (!object)
if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
return E_OUTOFMEMORY;
FIXME("Ignoring access flags (pool).\n");
hr = buffer_init(object, device, desc->byte_width, desc->usage, WINED3DFMT_UNKNOWN,
WINED3D_POOL_MANAGED, desc->bind_flags, data, parent, parent_ops);
if (FAILED(hr))
if (FAILED(hr = buffer_init(object, device, desc->byte_width, desc->usage, WINED3DFMT_UNKNOWN,
WINED3D_POOL_MANAGED, desc->bind_flags, data, parent, parent_ops)))
{
WARN("Failed to initialize buffer, hr %#x.\n", hr);
HeapFree(GetProcessHeap(), 0, object);
......
......@@ -1916,11 +1916,12 @@ struct wined3d_blt_fx
struct wined3d_buffer_desc
{
UINT byte_width;
unsigned int byte_width;
DWORD usage;
UINT bind_flags;
UINT cpu_access_flags;
UINT misc_flags;
unsigned int bind_flags;
unsigned int cpu_access_flags;
unsigned int misc_flags;
unsigned int structure_byte_stride;
};
struct wined3d_rasterizer_state_desc
......
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