winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2022
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
1171 discussions
Start a n
N
ew thread
Jacek Caban : winevulkan: Use separated implementations for all 32-bit Unix calls.
by Alexandre Julliard
18 Nov '22
18 Nov '22
Module: wine Branch: master Commit: eb062df5ba9bf259bec995cb0a0017544963311e URL:
https://gitlab.winehq.org/wine/wine/-/commit/eb062df5ba9bf259bec995cb0a0017…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sun Oct 23 20:19:00 2022 +0200 winevulkan: Use separated implementations for all 32-bit Unix calls. --- dlls/winevulkan/loader.c | 6 ++---- dlls/winevulkan/make_vulkan | 6 +++--- dlls/winevulkan/vulkan.c | 45 ++++++++++++++++++++++++++++++++++++++++ dlls/winevulkan/vulkan_private.h | 3 +++ dlls/winevulkan/vulkan_thunks.c | 6 +++--- 5 files changed, 56 insertions(+), 10 deletions(-) diff --git a/dlls/winevulkan/loader.c b/dlls/winevulkan/loader.c index cddcd0360ac..a86a35b0d40 100644 --- a/dlls/winevulkan/loader.c +++ b/dlls/winevulkan/loader.c @@ -35,7 +35,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(vulkan); DEFINE_DEVPROPKEY(DEVPROPKEY_GPU_LUID, 0x60b193cb, 0x5276, 0x4d0f, 0x96, 0xfc, 0xf1, 0x73, 0xab, 0xad, 0x3e, 0xc6, 2); DEFINE_DEVPROPKEY(WINE_DEVPROPKEY_GPU_VULKAN_UUID, 0x233a9ef3, 0xafc4, 0x4abd, 0xb5, 0x64, 0xc3, 0x2f, 0x21, 0xf1, 0x53, 0x5c, 2); -NTSTATUS (WINAPI *p_vk_direct_unix_call)(unixlib_handle_t handle, unsigned int code, void *args); +NTSTATUS (WINAPI *p_vk_direct_unix_call)(unixlib_handle_t handle, unsigned int code, void *args) = __wine_unix_call; unixlib_handle_t unix_handle; static HINSTANCE hinstance; @@ -239,9 +239,7 @@ static BOOL WINAPI wine_vk_init(INIT_ONCE *once, void *param, void **context) &unix_handle, sizeof(unix_handle), NULL)) return FALSE; - if (vk_unix_call(unix_init, &p_vk_direct_unix_call)) return FALSE; - if (!p_vk_direct_unix_call) p_vk_direct_unix_call = __wine_unix_call; - return TRUE; + return !vk_unix_call(unix_init, &p_vk_direct_unix_call); } static BOOL wine_vk_init_once(void) diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 8943be3e3e2..f8c87f27353 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -2686,9 +2686,9 @@ class VkGenerator(object): f.write("const unixlib_entry_t __wine_unix_call_funcs[] =\n") f.write("{\n") - f.write(" init_vulkan,\n") - f.write(" vk_is_available_instance_function,\n") - f.write(" vk_is_available_device_function,\n") + f.write(" init_vulkan32,\n") + f.write(" vk_is_available_instance_function32,\n") + f.write(" vk_is_available_device_function32,\n") for vk_func in self.registry.funcs.values(): if not vk_func.needs_exposing(): continue diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index 4f949d0b42d..ac586c4dbf6 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -410,6 +410,8 @@ static void wine_vk_device_free(struct wine_device *device) free(device); } +#ifdef _WIN64 + NTSTATUS init_vulkan(void *args) { vk_funcs = __wine_get_vulkan_driver(WINE_VULKAN_DRIVER_VERSION); @@ -424,6 +426,23 @@ NTSTATUS init_vulkan(void *args) return STATUS_SUCCESS; } +#endif /* _WIN64 */ + +NTSTATUS init_vulkan32(void *args) +{ + vk_funcs = __wine_get_vulkan_driver(WINE_VULKAN_DRIVER_VERSION); + if (!vk_funcs) + { + ERR("Failed to load Wine graphics driver supporting Vulkan.\n"); + return STATUS_UNSUCCESSFUL; + } + +#ifndef _WIN64 + *(void **)args = vk_direct_unix_call; +#endif + return STATUS_SUCCESS; +} + /* Helper function for converting between win32 and host compatible VkInstanceCreateInfo. * This function takes care of extensions handled at winevulkan layer, a Wine graphics * driver is responsible for handling e.g. surface extensions. @@ -1587,6 +1606,8 @@ void wine_vkDestroyDebugReportCallbackEXT(VkInstance handle, VkDebugReportCallba free(object); } +#ifdef _WIN64 + NTSTATUS vk_is_available_instance_function(void *arg) { struct is_available_instance_function_params *params = arg; @@ -1600,3 +1621,27 @@ NTSTATUS vk_is_available_device_function(void *arg) struct wine_device *device = wine_device_from_handle(params->device); return !!vk_funcs->p_vkGetDeviceProcAddr(device->device, params->name); } + +#endif /* _WIN64 */ + +NTSTATUS vk_is_available_instance_function32(void *arg) +{ + struct + { + UINT32 instance; + UINT32 name; + } *params = arg; + struct wine_instance *instance = wine_instance_from_handle(UlongToPtr(params->instance)); + return !!vk_funcs->p_vkGetInstanceProcAddr(instance->instance, UlongToPtr(params->name)); +} + +NTSTATUS vk_is_available_device_function32(void *arg) +{ + struct + { + UINT32 device; + UINT32 name; + } *params = arg; + struct wine_device *device = wine_device_from_handle(UlongToPtr(params->device)); + return !!vk_funcs->p_vkGetDeviceProcAddr(device->device, UlongToPtr(params->name)); +} diff --git a/dlls/winevulkan/vulkan_private.h b/dlls/winevulkan/vulkan_private.h index dc90f3a0c59..5fcfc2a5978 100644 --- a/dlls/winevulkan/vulkan_private.h +++ b/dlls/winevulkan/vulkan_private.h @@ -233,11 +233,14 @@ BOOL wine_vk_instance_extension_supported(const char *name) DECLSPEC_HIDDEN; BOOL wine_vk_is_type_wrapped(VkObjectType type) DECLSPEC_HIDDEN; NTSTATUS init_vulkan(void *args) DECLSPEC_HIDDEN; +NTSTATUS init_vulkan32(void *args) DECLSPEC_HIDDEN; NTSTATUS WINAPI vk_direct_unix_call(unixlib_handle_t handle, unsigned int code, void *arg) DECLSPEC_HIDDEN; NTSTATUS vk_is_available_instance_function(void *arg) DECLSPEC_HIDDEN; NTSTATUS vk_is_available_device_function(void *arg) DECLSPEC_HIDDEN; +NTSTATUS vk_is_available_instance_function32(void *arg) DECLSPEC_HIDDEN; +NTSTATUS vk_is_available_device_function32(void *arg) DECLSPEC_HIDDEN; struct conversion_context { diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index d1dac5fbe68..eb801be6fcd 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -42999,9 +42999,9 @@ C_ASSERT(ARRAYSIZE(__wine_unix_call_funcs) == unix_count); const unixlib_entry_t __wine_unix_call_funcs[] = { - init_vulkan, - vk_is_available_instance_function, - vk_is_available_device_function, + init_vulkan32, + vk_is_available_instance_function32, + vk_is_available_device_function32, thunk32_vkAcquireNextImage2KHR, thunk32_vkAcquireNextImageKHR, thunk32_vkAcquirePerformanceConfigurationINTEL,
1
0
0
0
Jacek Caban : winevulkan: Always convert 32-bit pointer arrays.
by Alexandre Julliard
18 Nov '22
18 Nov '22
Module: wine Branch: master Commit: 46f84ea226184d79401118b68f6b450fe2e531d0 URL:
https://gitlab.winehq.org/wine/wine/-/commit/46f84ea226184d79401118b68f6b45…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat Nov 12 16:51:43 2022 +0100 winevulkan: Always convert 32-bit pointer arrays. --- dlls/winevulkan/make_vulkan | 23 ++++++++--------- dlls/winevulkan/vulkan_thunks.c | 55 +++++++++++++++++++++++++++++++++++------ 2 files changed, 59 insertions(+), 19 deletions(-) diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 79cc1c8f4af..8943be3e3e2 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -1306,10 +1306,6 @@ class VkVariable(object): if not conv or not self.needs_ptr32_type() or (not self.is_pointer() and self.type == "size_t"): return prefix + self.name - # FIXME: Use conversion instead - if self.name in ["ppUsageCounts", "ppEnabledLayerNames", "ppEnabledExtensionNames"]: - return "UlongToPtr({0}{1})".format(prefix, self.name) - cast_type = "" if self.const: cast_type += "const " @@ -1533,6 +1529,9 @@ class VkMember(VkVariable): # returnedonly members don't needs input conversions if not self.is_pointer() and self.returnedonly: return False + # pointer arrays always need input conversion + if conv and self.is_dynamic_array() and self.pointer_array: + return True if self.is_handle(): if unwrap and self.handle.is_wrapped(): @@ -2457,21 +2456,21 @@ class ArrayConversionFunction(object): body += " convert_{0}_{1}({2}&in[i], &out[i]);\n".format( struct.name, conv_suffix, ctx_part) else: - body += " if (in[i])\n" - body += " {\n" - body += " out[i] = conversion_context_alloc(ctx, sizeof(*out[i]));\n" if struct.needs_conversion(self.conv, self.unwrap, self.direction, False): + body += " if (in[i])\n" + body += " {\n" + body += " out[i] = conversion_context_alloc(ctx, sizeof(*out[i]));\n" if self.conv: in_param = "({0} *)UlongToPtr(in[i])".format(win_type) else: in_param = "in[i]" body += " convert_{0}_{1}({2}{3}, out[i]);\n".format( struct.name, conv_suffix, ctx_part, in_param) + body += " }\n" + body += " else\n" + body += " out[i] = NULL;\n" else: - body += " *out[i] = *in[i];\n".format(win_type) - body += " }\n" - body += " else\n" - body += " out[i] = NULL;\n" + body += " out[i] = UlongToPtr(in[i]);\n".format(win_type) elif self.array.is_handle(): if self.array.pointer_array: LOGGER.error("Unhandled handle pointer arrays") @@ -2489,6 +2488,8 @@ class ArrayConversionFunction(object): body += " out[i] = " + handle.driver_handle(input) + ";\n" else: LOGGER.warning("Unhandled handle output conversion") + elif self.array.pointer_array: + body += " out[i] = UlongToPtr(in[i]);\n" else: body += " out[i] = in[i];\n" diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index 303f3c640c4..d1dac5fbe68 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -6485,7 +6485,25 @@ static inline const VkAccelerationStructureBuildGeometryInfoKHR *convert_VkAccel #endif /* USE_STRUCT_CONVERSION */ #if defined(USE_STRUCT_CONVERSION) -static inline void convert_VkMicromapBuildInfoEXT_win32_to_host(const VkMicromapBuildInfoEXT32 *in, VkMicromapBuildInfoEXT *out) +static inline const VkMicromapUsageEXT * const*convert_VkMicromapUsageEXT_pointer_array_win32_to_host(struct conversion_context *ctx, const PTR32 *in, uint32_t count) +{ + VkMicromapUsageEXT **out; + unsigned int i; + + if (!in || !count) return NULL; + + out = conversion_context_alloc(ctx, count * sizeof(*out)); + for (i = 0; i < count; i++) + { + out[i] = UlongToPtr(in[i]); + } + + return (void *)out; +} +#endif /* USE_STRUCT_CONVERSION */ + +#if defined(USE_STRUCT_CONVERSION) +static inline void convert_VkMicromapBuildInfoEXT_win32_to_host(struct conversion_context *ctx, const VkMicromapBuildInfoEXT32 *in, VkMicromapBuildInfoEXT *out) { if (!in) return; @@ -6497,7 +6515,7 @@ static inline void convert_VkMicromapBuildInfoEXT_win32_to_host(const VkMicromap out->dstMicromap = in->dstMicromap; out->usageCountsCount = in->usageCountsCount; out->pUsageCounts = (const VkMicromapUsageEXT *)UlongToPtr(in->pUsageCounts); - out->ppUsageCounts = UlongToPtr(in->ppUsageCounts); + out->ppUsageCounts = convert_VkMicromapUsageEXT_pointer_array_win32_to_host(ctx, (const PTR32 *)UlongToPtr(in->ppUsageCounts), in->usageCountsCount); out->data = in->data; out->scratchData = in->scratchData; out->triangleArray = in->triangleArray; @@ -6516,7 +6534,7 @@ static inline const VkMicromapBuildInfoEXT *convert_VkMicromapBuildInfoEXT_array out = conversion_context_alloc(ctx, count * sizeof(*out)); for (i = 0; i < count; i++) { - convert_VkMicromapBuildInfoEXT_win32_to_host(&in[i], &out[i]); + convert_VkMicromapBuildInfoEXT_win32_to_host(ctx, &in[i], &out[i]); } return out; @@ -9156,6 +9174,24 @@ static inline const VkDeviceQueueCreateInfo *convert_VkDeviceQueueCreateInfo_arr } #endif /* USE_STRUCT_CONVERSION */ +#if defined(USE_STRUCT_CONVERSION) +static inline const char * const*convert_char_pointer_array_win32_to_host(struct conversion_context *ctx, const PTR32 *in, uint32_t count) +{ + char **out; + unsigned int i; + + if (!in || !count) return NULL; + + out = conversion_context_alloc(ctx, count * sizeof(*out)); + for (i = 0; i < count; i++) + { + out[i] = UlongToPtr(in[i]); + } + + return (void *)out; +} +#endif /* USE_STRUCT_CONVERSION */ + #if !defined(USE_STRUCT_CONVERSION) static inline void convert_VkDeviceCreateInfo_win64_to_host(struct conversion_context *ctx, const VkDeviceCreateInfo *in, VkDeviceCreateInfo *out) { @@ -10985,9 +11021,9 @@ static inline void convert_VkDeviceCreateInfo_win32_to_host(struct conversion_co out->queueCreateInfoCount = in->queueCreateInfoCount; out->pQueueCreateInfos = convert_VkDeviceQueueCreateInfo_array_win32_to_host(ctx, (const VkDeviceQueueCreateInfo32 *)UlongToPtr(in->pQueueCreateInfos), in->queueCreateInfoCount); out->enabledLayerCount = in->enabledLayerCount; - out->ppEnabledLayerNames = UlongToPtr(in->ppEnabledLayerNames); + out->ppEnabledLayerNames = convert_char_pointer_array_win32_to_host(ctx, (const PTR32 *)UlongToPtr(in->ppEnabledLayerNames), in->enabledLayerCount); out->enabledExtensionCount = in->enabledExtensionCount; - out->ppEnabledExtensionNames = UlongToPtr(in->ppEnabledExtensionNames); + out->ppEnabledExtensionNames = convert_char_pointer_array_win32_to_host(ctx, (const PTR32 *)UlongToPtr(in->ppEnabledExtensionNames), in->enabledExtensionCount); out->pEnabledFeatures = (const VkPhysicalDeviceFeatures *)UlongToPtr(in->pEnabledFeatures); for (in_header = UlongToPtr(in->pNext); in_header; in_header = UlongToPtr(in_header->pNext)) @@ -14519,9 +14555,9 @@ static inline void convert_VkInstanceCreateInfo_win32_to_host(struct conversion_ out->flags = in->flags; out->pApplicationInfo = convert_VkApplicationInfo_array_win32_to_host(ctx, (const VkApplicationInfo32 *)UlongToPtr(in->pApplicationInfo), 1); out->enabledLayerCount = in->enabledLayerCount; - out->ppEnabledLayerNames = UlongToPtr(in->ppEnabledLayerNames); + out->ppEnabledLayerNames = convert_char_pointer_array_win32_to_host(ctx, (const PTR32 *)UlongToPtr(in->ppEnabledLayerNames), in->enabledLayerCount); out->enabledExtensionCount = in->enabledExtensionCount; - out->ppEnabledExtensionNames = UlongToPtr(in->ppEnabledExtensionNames); + out->ppEnabledExtensionNames = convert_char_pointer_array_win32_to_host(ctx, (const PTR32 *)UlongToPtr(in->ppEnabledExtensionNames), in->enabledExtensionCount); for (in_header = UlongToPtr(in->pNext); in_header; in_header = UlongToPtr(in_header->pNext)) { @@ -38175,13 +38211,16 @@ static NTSTATUS thunk32_vkGetMicromapBuildSizesEXT(void *args) } *params = args; VkMicromapBuildInfoEXT pBuildInfo_host; VkMicromapBuildSizesInfoEXT pSizeInfo_host; + struct conversion_context ctx; TRACE("%#x, %#x, %#x, %#x\n", params->device, params->buildType, params->pBuildInfo, params->pSizeInfo); - convert_VkMicromapBuildInfoEXT_win32_to_host((const VkMicromapBuildInfoEXT32 *)UlongToPtr(params->pBuildInfo), &pBuildInfo_host); + init_conversion_context(&ctx); + convert_VkMicromapBuildInfoEXT_win32_to_host(&ctx, (const VkMicromapBuildInfoEXT32 *)UlongToPtr(params->pBuildInfo), &pBuildInfo_host); convert_VkMicromapBuildSizesInfoEXT_win32_to_host((VkMicromapBuildSizesInfoEXT32 *)UlongToPtr(params->pSizeInfo), &pSizeInfo_host); wine_device_from_handle((VkDevice)UlongToPtr(params->device))->funcs.p_vkGetMicromapBuildSizesEXT(wine_device_from_handle((VkDevice)UlongToPtr(params->device))->device, params->buildType, &pBuildInfo_host, &pSizeInfo_host); convert_VkMicromapBuildSizesInfoEXT_host_to_win32(&pSizeInfo_host, (VkMicromapBuildSizesInfoEXT32 *)UlongToPtr(params->pSizeInfo)); + free_conversion_context(&ctx); return STATUS_SUCCESS; }
1
0
0
0
Jacek Caban : winevulkan: Use PTR32 for pointer-size variables in 32-bit structs.
by Alexandre Julliard
18 Nov '22
18 Nov '22
Module: wine Branch: master Commit: 3eccac388dc5549acb5694f46adcd5061a21efc1 URL:
https://gitlab.winehq.org/wine/wine/-/commit/3eccac388dc5549acb5694f46adcd5…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat Nov 12 15:19:13 2022 +0100 winevulkan: Use PTR32 for pointer-size variables in 32-bit structs. --- dlls/winevulkan/make_vulkan | 167 +- dlls/winevulkan/vulkan_thunks.c | 7436 +++++++++++++++++++-------------------- 2 files changed, 3844 insertions(+), 3759 deletions(-)
1
0
0
0
Jacek Caban : winevulkan: Introduce find_next_struct32.
by Alexandre Julliard
18 Nov '22
18 Nov '22
Module: wine Branch: master Commit: 3a5155a9d1d351ca3ddbf13984485e69e218769d URL:
https://gitlab.winehq.org/wine/wine/-/commit/3a5155a9d1d351ca3ddbf13984485e…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat Nov 12 01:33:24 2022 +0100 winevulkan: Introduce find_next_struct32. --- dlls/winevulkan/make_vulkan | 21 +- dlls/winevulkan/vulkan_private.h | 27 ++ dlls/winevulkan/vulkan_thunks.c | 778 +++++++++++++++++++-------------------- 3 files changed, 434 insertions(+), 392 deletions(-)
1
0
0
0
Eric Pouech : dbghelp: Add partial implementation of SymQueryInlineTrace.
by Alexandre Julliard
18 Nov '22
18 Nov '22
Module: wine Branch: master Commit: b6205f57faf0d4c9a09e83c3ca031103dbe8ec62 URL:
https://gitlab.winehq.org/wine/wine/-/commit/b6205f57faf0d4c9a09e83c3ca0311…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Fri Nov 18 08:59:13 2022 +0100 dbghelp: Add partial implementation of SymQueryInlineTrace. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> --- dlls/dbghelp/dbghelp.spec | 2 +- dlls/dbghelp/symbol.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/dlls/dbghelp/dbghelp.spec b/dlls/dbghelp/dbghelp.spec index 336a6f7aefd..fc2218f636b 100644 --- a/dlls/dbghelp/dbghelp.spec +++ b/dlls/dbghelp/dbghelp.spec @@ -153,7 +153,7 @@ @ stub SymNextW @ stub SymPrev @ stub SymPrevW -@ stub SymQueryInlineTrace +@ stdcall SymQueryInlineTrace(long int64 long int64 int64 ptr ptr) @ stdcall SymRefreshModuleList(long) @ stdcall SymRegisterCallback(long ptr ptr) @ stdcall SymRegisterCallback64(long ptr int64) diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c index 72634443cb7..e3352761c53 100644 --- a/dlls/dbghelp/symbol.c +++ b/dlls/dbghelp/symbol.c @@ -2803,6 +2803,55 @@ DWORD WINAPI SymAddrIncludeInlineTrace(HANDLE hProcess, DWORD64 addr) return depth; } +/****************************************************************** + * SymQueryInlineTrace (DBGHELP.@) + * + */ +BOOL WINAPI SymQueryInlineTrace(HANDLE hProcess, DWORD64 StartAddress, DWORD StartContext, + DWORD64 StartRetAddress, DWORD64 CurAddress, + LPDWORD CurContext, LPDWORD CurFrameIndex) +{ + struct module_pair pair; + struct symt_ht* sym_curr; + struct symt_ht* sym_start; + struct symt_ht* sym_startret; + DWORD depth; + + TRACE("(%p, %#I64x, 0x%lx, %#I64x, %I64x, %p, %p)\n", + hProcess, StartAddress, StartContext, StartRetAddress, CurAddress, CurContext, CurFrameIndex); + + if (!module_init_pair(&pair, hProcess, CurAddress)) return FALSE; + if (!(sym_curr = symt_find_symbol_at(pair.effective, CurAddress))) return FALSE; + if (!symt_check_tag(&sym_curr->symt, SymTagFunction)) return FALSE; + + sym_start = symt_find_symbol_at(pair.effective, StartAddress); + sym_startret = symt_find_symbol_at(pair.effective, StartRetAddress); + if (sym_start != sym_curr && sym_startret != sym_curr) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + if (sym_start != sym_curr || StartContext) + { + FIXME("(%p, %#I64x, 0x%lx, %#I64x, %I64x, %p, %p): semi-stub\n", + hProcess, StartAddress, StartContext, StartRetAddress, CurAddress, CurContext, CurFrameIndex); + return ERROR_CALL_NOT_IMPLEMENTED; + } + + depth = SymAddrIncludeInlineTrace(hProcess, CurAddress); + if (depth) + { + *CurContext = IFC_MODE_INLINE; /* deepest inline site */ + *CurFrameIndex = depth; + } + else + { + *CurContext = IFC_MODE_REGULAR; + *CurFrameIndex = 0; + } + return TRUE; +} + /****************************************************************** * SymSrvGetFileIndexInfo (DBGHELP.@) *
1
0
0
0
Eric Pouech : dbghelp: Implement SymAddrIncludeInlineTrace().
by Alexandre Julliard
18 Nov '22
18 Nov '22
Module: wine Branch: master Commit: c99bafb7750badb0013581f13bc5bd560d9b332e URL:
https://gitlab.winehq.org/wine/wine/-/commit/c99bafb7750badb0013581f13bc5bd…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Fri Nov 18 08:59:11 2022 +0100 dbghelp: Implement SymAddrIncludeInlineTrace(). Replacing symt_get_inlinesite_depth() with SymAddrIncludeInlineTrace() as they look very (very) similar. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> --- dlls/dbghelp/dbghelp_private.h | 1 - dlls/dbghelp/stack.c | 4 ++-- dlls/dbghelp/symbol.c | 45 +++++++++++++++++++++--------------------- 3 files changed, 24 insertions(+), 26 deletions(-) diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h index 22e9eec8805..177032d0ff4 100644 --- a/dlls/dbghelp/dbghelp_private.h +++ b/dlls/dbghelp/dbghelp_private.h @@ -953,7 +953,6 @@ static inline struct symt_function* extern struct symt_function* symt_find_inlined_site(struct module* module, DWORD64 addr, DWORD inline_ctx) DECLSPEC_HIDDEN; -extern DWORD symt_get_inlinesite_depth(HANDLE hProcess, DWORD64 addr) DECLSPEC_HIDDEN; /* Inline context encoding (different from what native does): * bits 31:30: 3 ignore (includes INLINE_FRAME_CONTEXT_IGNORE=0xFFFFFFFF) diff --git a/dlls/dbghelp/stack.c b/dlls/dbghelp/stack.c index 97bd885dcc7..8b573feee77 100644 --- a/dlls/dbghelp/stack.c +++ b/dlls/dbghelp/stack.c @@ -312,7 +312,7 @@ BOOL WINAPI StackWalkEx(DWORD MachineType, HANDLE hProcess, HANDLE hThread, if (IFC_MODE(frame->InlineFrameContext) == IFC_MODE_INLINE) { - DWORD depth = symt_get_inlinesite_depth(hProcess, addr); + DWORD depth = SymAddrIncludeInlineTrace(hProcess, addr); if (IFC_DEPTH(frame->InlineFrameContext) + 1 < depth) /* move to next inlined function? */ { TRACE("found inline ctx: depth=%lu current=%lu++\n", @@ -330,7 +330,7 @@ BOOL WINAPI StackWalkEx(DWORD MachineType, HANDLE hProcess, HANDLE hThread, if (frame->InlineFrameContext != INLINE_FRAME_CONTEXT_IGNORE) { addr = sw_xlat_addr(&csw, &frame->AddrPC); - frame->InlineFrameContext = symt_get_inlinesite_depth(hProcess, addr) == 0 ? IFC_MODE_REGULAR : IFC_MODE_INLINE; + frame->InlineFrameContext = SymAddrIncludeInlineTrace(hProcess, addr) == 0 ? IFC_MODE_REGULAR : IFC_MODE_INLINE; TRACE("setting IFC mode to %lx\n", frame->InlineFrameContext); } } diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c index 514991af386..72634443cb7 100644 --- a/dlls/dbghelp/symbol.c +++ b/dlls/dbghelp/symbol.c @@ -1265,27 +1265,6 @@ struct symt_function* symt_find_inlined_site(struct module* module, DWORD64 addr return NULL; } -DWORD symt_get_inlinesite_depth(HANDLE hProcess, DWORD64 addr) -{ - struct module_pair pair; - DWORD depth = 0; - - if (module_init_pair(&pair, hProcess, addr)) - { - struct symt_ht* symt = symt_find_symbol_at(pair.effective, addr); - if (symt_check_tag(&symt->symt, SymTagFunction)) - { - struct symt_function* inlined = symt_find_lowest_inlined((struct symt_function*)symt, addr); - if (inlined) - { - for ( ; &inlined->symt != &symt->symt; inlined = (struct symt_function*)symt_get_upper_inlined(inlined)) - ++depth; - } - } - } - return depth; -} - /****************************************************************** * sym_enum * @@ -2797,11 +2776,31 @@ BOOL WINAPI SymGetLineFromInlineContextW(HANDLE hProcess, DWORD64 addr, ULONG in /****************************************************************** * SymAddrIncludeInlineTrace (DBGHELP.@) * + * MSDN doesn't state that the maximum depth (of embedded inline sites) at <addr> + * is actually returned. (It just says non zero means that there are some inline site(s)). + * But this is what native actually returns. */ DWORD WINAPI SymAddrIncludeInlineTrace(HANDLE hProcess, DWORD64 addr) { - FIXME("(%p, %I64x): stub\n", hProcess, addr); - return 0; + struct module_pair pair; + DWORD depth = 0; + + TRACE("(%p, %#I64x)\n", hProcess, addr); + + if (module_init_pair(&pair, hProcess, addr)) + { + struct symt_ht* symt = symt_find_symbol_at(pair.effective, addr); + if (symt_check_tag(&symt->symt, SymTagFunction)) + { + struct symt_function* inlined = symt_find_lowest_inlined((struct symt_function*)symt, addr); + if (inlined) + { + for ( ; &inlined->symt != &symt->symt; inlined = (struct symt_function*)symt_get_upper_inlined(inlined)) + ++depth; + } + } + } + return depth; } /******************************************************************
1
0
0
0
Mohamad Al-Jaf : dbghelp: Add SymAddrIncludeInlineTrace stub.
by Alexandre Julliard
18 Nov '22
18 Nov '22
Module: wine Branch: master Commit: 51c81714f264ca657117fd115694b0e9f4893eb7 URL:
https://gitlab.winehq.org/wine/wine/-/commit/51c81714f264ca657117fd115694b0…
Author: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com> Date: Fri Nov 18 08:59:10 2022 +0100 dbghelp: Add SymAddrIncludeInlineTrace stub. Football Manager 2023 Editor calls this function. Signed-off-by: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com> --- dlls/dbghelp/dbghelp.spec | 2 +- dlls/dbghelp/symbol.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dlls/dbghelp/dbghelp.spec b/dlls/dbghelp/dbghelp.spec index 754fb456611..336a6f7aefd 100644 --- a/dlls/dbghelp/dbghelp.spec +++ b/dlls/dbghelp/dbghelp.spec @@ -38,7 +38,7 @@ @ stub SymAddSourceStreamW @ stdcall SymAddSymbol(ptr int64 str int64 long long) @ stdcall SymAddSymbolW(ptr int64 wstr int64 long long) -@ stub SymAddrIncludeInlineTrace +@ stdcall SymAddrIncludeInlineTrace(long int64) @ stdcall SymCleanup(long) @ stub SymCompareInlineTrace @ stub SymDeleteSymbol diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c index 18699e47984..514991af386 100644 --- a/dlls/dbghelp/symbol.c +++ b/dlls/dbghelp/symbol.c @@ -2794,6 +2794,16 @@ BOOL WINAPI SymGetLineFromInlineContextW(HANDLE hProcess, DWORD64 addr, ULONG in return internal_line_copy_toW64(&intl, line); } +/****************************************************************** + * SymAddrIncludeInlineTrace (DBGHELP.@) + * + */ +DWORD WINAPI SymAddrIncludeInlineTrace(HANDLE hProcess, DWORD64 addr) +{ + FIXME("(%p, %I64x): stub\n", hProcess, addr); + return 0; +} + /****************************************************************** * SymSrvGetFileIndexInfo (DBGHELP.@) *
1
0
0
0
Nikolay Sivov : ntdll: Do not set system locales that resolve to custom-unspecified.
by Alexandre Julliard
18 Nov '22
18 Nov '22
Module: wine Branch: master Commit: 57f251d05099eab9e69ffc5af9e218e9d7d571f1 URL:
https://gitlab.winehq.org/wine/wine/-/commit/57f251d05099eab9e69ffc5af9e218…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Nov 17 18:35:08 2022 +0300 ntdll: Do not set system locales that resolve to custom-unspecified. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/ntdll/locale.c | 14 ++++---------- dlls/ntdll/unix/env.c | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/dlls/ntdll/locale.c b/dlls/ntdll/locale.c index 105de1feec4..73c0c2c5520 100644 --- a/dlls/ntdll/locale.c +++ b/dlls/ntdll/locale.c @@ -94,6 +94,7 @@ invalid: void locale_init(void) { + const NLS_LOCALE_LCID_INDEX *entry; USHORT utf8[2] = { 0, CP_UTF8 }; WCHAR locale[LOCALE_NAME_MAX_LENGTH]; LARGE_INTEGER unused; @@ -112,16 +113,9 @@ void locale_init(void) locale_table = (const NLS_LOCALE_HEADER *)((char *)header + header->locales); locale_strings = (const WCHAR *)((char *)locale_table + locale_table->strings_offset); - if (system_lcid == LOCALE_CUSTOM_UNSPECIFIED) - { - ansi_cp = oem_cp = CP_UTF8; - } - else - { - const NLS_LOCALE_LCID_INDEX *entry = find_lcid_entry( locale_table, system_lcid ); - ansi_cp = get_locale_data( locale_table, entry->idx )->idefaultansicodepage; - oem_cp = get_locale_data( locale_table, entry->idx )->idefaultcodepage; - } + entry = find_lcid_entry( locale_table, system_lcid ); + ansi_cp = get_locale_data( locale_table, entry->idx )->idefaultansicodepage; + oem_cp = get_locale_data( locale_table, entry->idx )->idefaultcodepage; NtQueryDefaultLocale( TRUE, &user_resource_lcid ); user_resource_neutral_lcid = PRIMARYLANGID( user_resource_lcid ); diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c index 062da7600b1..ad5a7c412d6 100644 --- a/dlls/ntdll/unix/env.c +++ b/dlls/ntdll/unix/env.c @@ -859,7 +859,7 @@ static void init_locale(void) if ((header = read_nls_file( "locale.nls" ))) { locale_table = (const NLS_LOCALE_HEADER *)((char *)header + header->locales); - if ((locale = get_win_locale( locale_table, system_locale ))) + if ((locale = get_win_locale( locale_table, system_locale )) && locale->idefaultlanguage != LOCALE_CUSTOM_UNSPECIFIED) system_lcid = locale->idefaultlanguage; if ((locale = get_win_locale( locale_table, user_locale ))) user_lcid = locale->idefaultlanguage;
1
0
0
0
Alex Henrie : spoolss: Use standard C functions for memory allocation in router.c.
by Alexandre Julliard
18 Nov '22
18 Nov '22
Module: wine Branch: master Commit: 01dae0013c647832aa23c8d5f22e037d97fb0265 URL:
https://gitlab.winehq.org/wine/wine/-/commit/01dae0013c647832aa23c8d5f22e03…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Thu Nov 17 22:04:44 2022 -0700 spoolss: Use standard C functions for memory allocation in router.c. --- dlls/spoolss/router.c | 45 +++++++++++++-------------------------------- 1 file changed, 13 insertions(+), 32 deletions(-) diff --git a/dlls/spoolss/router.c b/dlls/spoolss/router.c index 4930a7eb18d..4d6d7c43559 100644 --- a/dlls/spoolss/router.c +++ b/dlls/spoolss/router.c @@ -19,6 +19,7 @@ */ #include <stdarg.h> +#include <stdlib.h> #include "windef.h" #include "winbase.h" @@ -31,7 +32,6 @@ #include "spoolss.h" #include "wine/debug.h" -#include "wine/heap.h" WINE_DEFAULT_DEBUG_CHANNEL(spoolss); @@ -153,25 +153,6 @@ static CRITICAL_SECTION backend_cs = { &backend_cs_debug, -1, 0, 0, 0, 0 }; static WCHAR localsplW[] = L"localspl.dll"; -/****************************************************************** - * strdupW [internal] - * - * create a copy of a unicode-string - * - */ - -static LPWSTR strdupW(LPCWSTR p) -{ - LPWSTR ret; - DWORD len; - - if(!p) return NULL; - len = (lstrlenW(p) + 1) * sizeof(WCHAR); - ret = heap_alloc(len); - memcpy(ret, p, len); - return ret; -} - /****************************************************************** * backend_unload_all [internal] * @@ -183,10 +164,10 @@ void backend_unload_all(void) while (used_backends > 0) { used_backends--; FreeLibrary(backend[used_backends]->dll); - heap_free(backend[used_backends]->dllname); - heap_free(backend[used_backends]->name); - heap_free(backend[used_backends]->regroot); - heap_free(backend[used_backends]); + free(backend[used_backends]->dllname); + free(backend[used_backends]->name); + free(backend[used_backends]->regroot); + free(backend[used_backends]); backend[used_backends] = NULL; } LeaveCriticalSection(&backend_cs); @@ -217,15 +198,15 @@ static backend_t * backend_load(LPWSTR dllname, LPWSTR name, LPWSTR regroot) EnterCriticalSection(&backend_cs); id = used_backends; - backend[id] = heap_alloc_zero(sizeof(backend_t)); + backend[id] = calloc(1, sizeof(backend_t)); if (!backend[id]) { LeaveCriticalSection(&backend_cs); return NULL; } - backend[id]->dllname = strdupW(dllname); - backend[id]->name = strdupW(name); - backend[id]->regroot = strdupW(regroot); + backend[id]->dllname = wcsdup(dllname); + backend[id]->name = wcsdup(name); + backend[id]->regroot = wcsdup(regroot); backend[id]->dll = LoadLibraryW(dllname); if (backend[id]->dll) { @@ -244,10 +225,10 @@ static backend_t * backend_load(LPWSTR dllname, LPWSTR name, LPWSTR regroot) } FreeLibrary(backend[id]->dll); } - heap_free(backend[id]->dllname); - heap_free(backend[id]->name); - heap_free(backend[id]->regroot); - heap_free(backend[id]); + free(backend[id]->dllname); + free(backend[id]->name); + free(backend[id]->regroot); + free(backend[id]); backend[id] = NULL; LeaveCriticalSection(&backend_cs); WARN("failed to init %s: %lu\n", debugstr_w(dllname), GetLastError());
1
0
0
0
Alex Henrie : schedsvc: Remove unused function heap_strdupW.
by Alexandre Julliard
18 Nov '22
18 Nov '22
Module: wine Branch: master Commit: 6a5dcc5273bc169c6c060de3dadf6c930847d10d URL:
https://gitlab.winehq.org/wine/wine/-/commit/6a5dcc5273bc169c6c060de3dadf6c…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Thu Nov 17 21:57:42 2022 -0700 schedsvc: Remove unused function heap_strdupW. --- dlls/schedsvc/schedsvc_private.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/dlls/schedsvc/schedsvc_private.h b/dlls/schedsvc/schedsvc_private.h index 1eada2bca96..62b25f97794 100644 --- a/dlls/schedsvc/schedsvc_private.h +++ b/dlls/schedsvc/schedsvc_private.h @@ -32,14 +32,4 @@ void check_task_time(void) DECLSPEC_HIDDEN; void load_at_tasks(void) DECLSPEC_HIDDEN; void check_missed_task_time(void) DECLSPEC_HIDDEN; -static inline WCHAR *heap_strdupW(const WCHAR *src) -{ - WCHAR *dst; - unsigned len; - if (!src) return NULL; - len = (lstrlenW(src) + 1) * sizeof(WCHAR); - if ((dst = heap_alloc(len))) memcpy(dst, src, len); - return dst; -} - #endif /* __WINE_SCHEDSVC_PRIVATE_H__ */
1
0
0
0
← Newer
1
...
46
47
48
49
50
51
52
...
118
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
Results per page:
10
25
50
100
200