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

@@ -342,7 +342,17 @@ HRESULT vkd3d_create_instance(const struct vkd3d_instance_create_info *create_in
struct vkd3d_instance *object;
HRESULT hr;
TRACE("create_info %p.\n", create_info);
TRACE("create_info %p, instance %p.\n", create_info, instance);
if (!create_info || !instance)
return E_INVALIDARG;
if (create_info->type != VKD3D_STRUCTURE_TYPE_INSTANCE_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;