[PATCH 08/10] winevulkan/winex11: Implement vkCreateInstance.

Henri Verbeet hverbeet at gmail.com
Wed Feb 21 06:22:36 CST 2018


On 20 February 2018 at 09:59, Roderick Colenbrander
<thunderbird2k at gmail.com> wrote:
> @@ -80,6 +80,7 @@ AC_ARG_WITH(sane,      AS_HELP_STRING([--without-sane],[do not use SANE (scanner
>  AC_ARG_WITH(tiff,      AS_HELP_STRING([--without-tiff],[do not use TIFF]))
>  AC_ARG_WITH(udev,      AS_HELP_STRING([--without-udev],[do not use udev (plug and play support)]))
>  AC_ARG_WITH(v4l,       AS_HELP_STRING([--without-v4l],[do not use v4l1 (v4l support)]))
> +AC_ARG_WITH(vulkan,    AS_HELP_STRING([--without-vulkan],[do not use vulkan]))
[do not use Vulkan], I suppose.

> +                 [libvulkan ${notice_platform}development files not found, vulkan won't be supported.])
"Vulkan"

> +static void *wine_vk_alloc_dispatchable_object(size_t size)
> +{
> +    struct wine_vk_dispatchable_object *object = heap_alloc(size);
> +
> +    if (!object)
> +        return NULL;
> +
> +    /* Set special header for ICD loader. */
> +    ((struct wine_vk_base*)object)->loader_magic = VULKAN_ICD_MAGIC_VALUE;
> +
> +    return object;
> +}
struct wine_vk_dispatchable_object doesn't seem to add a lot. I.e.:

    struct wine_vk_base *object;

    if (!(object = heap_alloc(size)))
        return NULL;

    object->loader_magic = VULKAN_ICD_MAGIC_VALUE;

    return object;

>  static VkResult WINAPI wine_vkCreateInstance(const VkInstanceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator,
>          VkInstance *pInstance)
>  {
> -    TRACE("%p %p %p\n", pCreateInfo, pAllocator, pInstance);
> -    return vk_funcs->p_vkCreateInstance(pCreateInfo, pAllocator, pInstance);
> +    VkInstance instance = NULL;
I think "struct VkInstance_T *instance;" may be clearer, but perhaps
it doesn't matter all that much.



More information about the wine-devel mailing list