[Bug 58680] New: vkEnumerateDeviceExtensionProperties could be more permissive about its arguments
http://bugs.winehq.org/show_bug.cgi?id=58680 Bug ID: 58680 Summary: vkEnumerateDeviceExtensionProperties could be more permissive about its arguments Product: Wine Version: 10.14 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winevulkan Assignee: wine-bugs(a)winehq.org Reporter: eric.brunet(a)lps.ens.fr Distribution: --- Created attachment 79273 --> http://bugs.winehq.org/attachment.cgi?id=79273 patch that makes some program work in -------------------------- dlls/winevulkan/vulkan.c, --------------------------- the function ------------------------------------------------------------------ VkResult wine_vkEnumerateDeviceExtensionProperties(VkPhysicalDevice client_physical_device, const char *layer_name, uint32_t *count, VkExtensionProperties *properties) ------------------------------------------------------------------ starts by making an error when layer_name is not NULL: ---------------------------------------------------------------------------- /* This shouldn't get called with layer_name set, the ICD loader prevents it. */ if (layer_name) { ERR("Layer enumeration not supported from ICD.\n"); return VK_ERROR_LAYER_NOT_PRESENT; } ---------------------------------------------------------------------------- I have seen a closed-source windows program that calls this function with an empty string for the parameter layer_name, receives the VK_ERROR_LAYER_NOT_PRESENT failure code, and crashes at startup. Now, I know nothing about 3D, GPU, vulkan, etc., but surely the semantics of layer_name being NULL or a pointer to an empty string must be the same. I could get my program running with the very simple patch I attach to this bug, which changes the test into ------------------------ if (layer_name && *layer_name) ------------------------- so that the NULL string does not trigger the test. It would be great if this patch could go into the next release. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla