wined3d: Use WINED3D_LOCATION_DISCARDED before initializing buffers with data.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2018-06-19 17:15:00 +02:00 committed by Alexandre Julliard
parent ec04b2e382
commit 537007525a
1 changed files with 1 additions and 1 deletions

View File

@ -1354,7 +1354,7 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
}
buffer->buffer_type_hint = buffer_type_hint_from_bind_flags(gl_info, bind_flags);
buffer->bind_flags = bind_flags;
buffer->locations = WINED3D_LOCATION_SYSMEM;
buffer->locations = data ? WINED3D_LOCATION_DISCARDED : WINED3D_LOCATION_SYSMEM;
if (!wined3d_resource_allocate_sysmem(&buffer->resource))
return E_OUTOFMEMORY;