libs/vkd3d: Add structure type fields to public API structures.

Adds flexibility for future API extensions.

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-04-03 11:49:13 +02:00
committed by Alexandre Julliard
parent c7d7c58451
commit f5b532921a
7 changed files with 58 additions and 1 deletions

View File

@@ -805,6 +805,16 @@ HRESULT vkd3d_create_image_resource(ID3D12Device *device,
TRACE("device %p, create_info %p, resource %p.\n", device, create_info, resource);
if (!create_info || !resource)
return E_INVALIDARG;
if (create_info->type != VKD3D_STRUCTURE_TYPE_IMAGE_RESOURCE_CREATE_INFO)
{
WARN("Invalid structure type %#x.\n", create_info->type);
return E_INVALIDARG;
}
if (create_info->next)
WARN("Unhandled next %p.\n", create_info->next);
if (!(object = vkd3d_malloc(sizeof(*object))))
return E_OUTOFMEMORY;