From 72394d9ae39bbdd95dae5714527ed38e3d82b146 Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Wed, 13 Nov 2024 17:19:31 +0100 Subject: [PATCH] vkd3d: Use WARN rather than ERR in vkd3d_instance_init(). ERR is used to indicate internal inconsistencies in vkd3d. Here that's not the case, we simply have to forward the error condition to the caller. This fixes failures on the CI with llvmpipe, because the build we use is compiled without support for VK_KHR_surface and related extensions. --- gitlab/build.yml | 3 --- libs/vkd3d/device.c | 8 ++++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/gitlab/build.yml b/gitlab/build.yml index 98599ca0..1bc75b4b 100644 --- a/gitlab/build.yml +++ b/gitlab/build.yml @@ -63,9 +63,6 @@ build-llvmpipe-32: build-llvmpipe-64-mesa24: extends: .build-linux - allow_failure: - exit_codes: - - 2 variables: VK_DRIVER_FILES: '/opt/mesa24/share/vulkan/icd.d/lvp_icd.x86_64.json' LD_LIBRARY_PATH: '/opt/mesa24/lib/x86_64-linux-gnu' diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index f2009a64..e92373a3 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -597,7 +597,7 @@ static HRESULT vkd3d_instance_init(struct vkd3d_instance *instance, } if (!create_info->pfn_create_thread != !create_info->pfn_join_thread) { - ERR("Invalid create/join thread function pointers.\n"); + WARN("Invalid create/join thread function pointers.\n"); return E_INVALIDARG; } if (create_info->wchar_size != 2 && create_info->wchar_size != 4) @@ -615,7 +615,7 @@ static HRESULT vkd3d_instance_init(struct vkd3d_instance *instance, if (FAILED(hr = vkd3d_init_vk_global_procs(instance, create_info->pfn_vkGetInstanceProcAddr))) { - ERR("Failed to initialise Vulkan global procs, hr %s.\n", debugstr_hresult(hr)); + WARN("Failed to initialise Vulkan global procs, hr %s.\n", debugstr_hresult(hr)); return hr; } @@ -697,7 +697,7 @@ static HRESULT vkd3d_instance_init(struct vkd3d_instance *instance, vkd3d_free(extensions); if (vr < 0) { - ERR("Failed to create Vulkan instance, vr %d.\n", vr); + WARN("Failed to create Vulkan instance, vr %d.\n", vr); if (instance->libvulkan) vkd3d_dlclose(instance->libvulkan); return hresult_from_vk_result(vr); @@ -705,7 +705,7 @@ static HRESULT vkd3d_instance_init(struct vkd3d_instance *instance, if (FAILED(hr = vkd3d_load_vk_instance_procs(&instance->vk_procs, vk_global_procs, vk_instance))) { - ERR("Failed to load instance procs, hr %s.\n", debugstr_hresult(hr)); + WARN("Failed to load instance procs, hr %s.\n", debugstr_hresult(hr)); if (instance->vk_procs.vkDestroyInstance) instance->vk_procs.vkDestroyInstance(vk_instance, NULL); if (instance->libvulkan)