[PATCH 08/10] winevulkan/winex11: Implement vkCreateInstance.
Józef Kucia
joseph.kucia at gmail.com
Wed Feb 21 03:59:40 CST 2018
On Tue, Feb 20, 2018 at 7:29 AM, Roderick Colenbrander
<thunderbird2k at gmail.com> wrote:
> + /* Set special header for ICD loader. */
> + ((struct wine_vk_base*)object)->loader_magic = VULKAN_ICD_MAGIC_VALUE;
Missing space before pointer "*".
> +
> + return object;
> +}
> +
> static void *wine_vk_get_global_proc_addr(const char *name)
> {
> int i;
> @@ -88,11 +103,55 @@ static BOOL wine_vk_init(HINSTANCE hinst)
> return TRUE;
> }
>
> +/* Helper function used for freeing an instance structure. This function supports full
> + * and partial object cleanups and can thus be used for vkCreateInstance failures.
> + */
> +static void wine_vk_instance_free(struct VkInstance_T *instance)
> +{
> + if (!instance)
> + return;
> +
> + if (instance->instance)
> + vk_funcs->p_vkDestroyInstance(instance->instance, NULL /* pAllocator */);
> +
> + heap_free(instance);
> +}
> +
> 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;
> + VkResult res;
> +
> + TRACE("pCreateInfo %p, pAllocater %p, pInstance %p\n", pCreateInfo, pAllocator, pInstance);
Typo: "pAllocater".
> static VkResult X11DRV_vkCreateInstance(const VkInstanceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator,
> VkInstance *pInstance)
> {
> - FIXME("stub: %p %p %p\n", pCreateInfo, pAllocator, pInstance);
> - return VK_ERROR_INCOMPATIBLE_DRIVER;
> + TRACE("pCreateInfo %p, pAllocater %p, pInstance %p\n", pCreateInfo, pAllocator, pInstance);
Typo: "pAllocater".
More information about the wine-devel
mailing list