mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
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:
committed by
Alexandre Julliard
parent
c7d7c58451
commit
f5b532921a
@@ -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;
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -30,6 +30,13 @@ HRESULT vkd3d_create_device(const struct vkd3d_device_create_info *create_info,
|
||||
|
||||
if (!create_info || !device)
|
||||
return E_INVALIDARG;
|
||||
if (create_info->type != VKD3D_STRUCTURE_TYPE_DEVICE_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 (!create_info->instance && !create_info->instance_create_info)
|
||||
{
|
||||
ERR("Instance or instance create info is required.\n");
|
||||
|
Reference in New Issue
Block a user