From: Vilya Harvey Date: Tue, 3 Mar 2020 16:19:29 +0000 (+0000) Subject: zink. Don't set incorrect sType in VkImportMemoryFdInfoKHR struct X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6ceda485605b627c5d2f8974a40e092ce00cc08e;p=mesa.git zink. Don't set incorrect sType in VkImportMemoryFdInfoKHR struct imfi.sType was being set to an invalid value, triggering a warning in Clang. The only valid value for imfi.sType is VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR which is the value it is being given at initialisation time, a few lines earlier. The incorrect value, VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT, is supposed to be used in imfi.handleType instead - and indeed, handleType *is* being set to this value a few lines later. Reviewed-by: Erik Faye-Lund Tested-by: Marge Bot Part-of: --- diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c index 80367b0b3b8..3d1462bfd3f 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -247,7 +247,6 @@ resource_create(struct pipe_screen *pscreen, }; if (whandle && whandle->type == WINSYS_HANDLE_TYPE_FD) { - imfi.sType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT; imfi.pNext = NULL; imfi.handleType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT; imfi.fd = whandle->handle;