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: Convert dispatchable handle arrays in 32-bit thunks.
by Alexandre Julliard
17 Nov '22
17 Nov '22
Module: wine Branch: master Commit: 3ceae1dcaf32e1cfcfd1f327b7226d31b006c7a9 URL:
https://gitlab.winehq.org/wine/wine/-/commit/3ceae1dcaf32e1cfcfd1f327b7226d…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Nov 11 23:14:44 2022 +0100 winevulkan: Convert dispatchable handle arrays in 32-bit thunks. --- dlls/winevulkan/make_vulkan | 5 ++-- dlls/winevulkan/vulkan_thunks.c | 54 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 54 insertions(+), 5 deletions(-) diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index aa0f14f5ac8..26a4f986c49 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -1697,6 +1697,8 @@ class VkParam(VkVariable): if unwrap and self.handle.is_wrapped(): return True + if conv and self.handle.is_dispatchable(): + return True return False @@ -2373,12 +2375,11 @@ class ArrayConversionFunction(object): body += " }\n" body += " else\n" body += " out[i] = NULL;\n" - elif self.array.is_handle() and self.direction == Direction.INPUT: + elif self.array.is_handle() and self.direction == Direction.INPUT and self.unwrap: if self.array.pointer_array: LOGGER.error("Unhandled handle pointer arrays") body += " out[i] = " + self.array.handle.driver_handle("in[i]") + ";\n" else: - LOGGER.warning("Unhandled conversion operand type") body += " out[i] = in[i];\n" body += " }\n" diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index bc14e4e26de..25cfc4bed82 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -5873,6 +5873,24 @@ static inline void convert_VkCommandBufferAllocateInfo_win32_to_unwrapped_host(c } #endif /* USE_STRUCT_CONVERSION */ +#if defined(USE_STRUCT_CONVERSION) +static inline VkCommandBuffer *convert_VkCommandBuffer_array_win32_to_unwrapped_host(struct conversion_context *ctx, const VkCommandBuffer *in, uint32_t count) +{ + VkCommandBuffer *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] = in[i]; + } + + return out; +} +#endif /* USE_STRUCT_CONVERSION */ + #if defined(USE_STRUCT_CONVERSION) static inline void convert_VkDescriptorSetAllocateInfo_win32_to_host(struct conversion_context *ctx, const VkDescriptorSetAllocateInfo32 *in, VkDescriptorSetAllocateInfo *out) { @@ -16162,6 +16180,20 @@ static inline void convert_VkPerformanceCounterDescriptionKHR_array_host_to_win3 } #endif /* USE_STRUCT_CONVERSION */ +#if defined(USE_STRUCT_CONVERSION) +static inline void convert_VkPhysicalDevice_array_unwrapped_host_to_win32(const VkPhysicalDevice *in, VkPhysicalDevice *out, uint32_t count) +{ + unsigned int i; + + if (!in) return; + + for (i = 0; i < count; i++) + { + out[i] = in[i]; + } +} +#endif /* USE_STRUCT_CONVERSION */ + #if defined(USE_STRUCT_CONVERSION) static inline void convert_VkMappedMemoryRange_win32_to_host(const VkMappedMemoryRange32 *in, VkMappedMemoryRange *out) { @@ -24680,11 +24712,16 @@ static NTSTATUS thunk32_vkAllocateCommandBuffers(void *args) VkResult result; } *params = args; VkCommandBufferAllocateInfo pAllocateInfo_host; + VkCommandBuffer *pCommandBuffers_host; + struct conversion_context ctx; TRACE("%p, %p, %p\n", params->device, params->pAllocateInfo, params->pCommandBuffers); + init_conversion_context(&ctx); convert_VkCommandBufferAllocateInfo_win32_to_unwrapped_host(params->pAllocateInfo, &pAllocateInfo_host); - params->result = wine_vkAllocateCommandBuffers(params->device, &pAllocateInfo_host, params->pCommandBuffers); + pCommandBuffers_host = convert_VkCommandBuffer_array_win32_to_unwrapped_host(&ctx, params->pCommandBuffers, params->pAllocateInfo->commandBufferCount); + params->result = wine_vkAllocateCommandBuffers(params->device, &pAllocateInfo_host, pCommandBuffers_host); + free_conversion_context(&ctx); return STATUS_SUCCESS; } @@ -36023,10 +36060,16 @@ static NTSTATUS thunk32_vkEnumeratePhysicalDevices(void *args) VkPhysicalDevice *pPhysicalDevices; VkResult result; } *params = args; + VkPhysicalDevice *pPhysicalDevices_host; + struct conversion_context ctx; TRACE("%p, %p, %p\n", params->instance, params->pPhysicalDeviceCount, params->pPhysicalDevices); - params->result = wine_vkEnumeratePhysicalDevices(params->instance, params->pPhysicalDeviceCount, params->pPhysicalDevices); + init_conversion_context(&ctx); + pPhysicalDevices_host = (params->pPhysicalDevices && *params->pPhysicalDeviceCount) ? conversion_context_alloc(&ctx, sizeof(*pPhysicalDevices_host) * *params->pPhysicalDeviceCount) : NULL; + params->result = wine_vkEnumeratePhysicalDevices(params->instance, params->pPhysicalDeviceCount, pPhysicalDevices_host); + convert_VkPhysicalDevice_array_unwrapped_host_to_win32(pPhysicalDevices_host, params->pPhysicalDevices, *params->pPhysicalDeviceCount); + free_conversion_context(&ctx); return STATUS_SUCCESS; } @@ -36092,10 +36135,15 @@ static NTSTATUS thunk32_vkFreeCommandBuffers(void *args) uint32_t commandBufferCount; const VkCommandBuffer *pCommandBuffers; } *params = args; + const VkCommandBuffer *pCommandBuffers_host; + struct conversion_context ctx; TRACE("%p, 0x%s, %u, %p\n", params->device, wine_dbgstr_longlong(params->commandPool), params->commandBufferCount, params->pCommandBuffers); - wine_vkFreeCommandBuffers(params->device, params->commandPool, params->commandBufferCount, params->pCommandBuffers); + init_conversion_context(&ctx); + pCommandBuffers_host = convert_VkCommandBuffer_array_win32_to_unwrapped_host(&ctx, params->pCommandBuffers, params->commandBufferCount); + wine_vkFreeCommandBuffers(params->device, params->commandPool, params->commandBufferCount, pCommandBuffers_host); + free_conversion_context(&ctx); return STATUS_SUCCESS; }
1
0
0
0
Jacek Caban : winevulkan: Convert all 32-bit structs containing pointer or pointer-size members.
by Alexandre Julliard
17 Nov '22
17 Nov '22
Module: wine Branch: master Commit: 89310c035d07e8f2ca512f0c63454f7f91b2d132 URL:
https://gitlab.winehq.org/wine/wine/-/commit/89310c035d07e8f2ca512f0c63454f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Nov 11 21:00:44 2022 +0100 winevulkan: Convert all 32-bit structs containing pointer or pointer-size members. --- dlls/winevulkan/make_vulkan | 20 +- dlls/winevulkan/vulkan_thunks.c | 420 +++++++++++++++++++++++++++++++++++++--- 2 files changed, 405 insertions(+), 35 deletions(-)
1
0
0
0
Jacek Caban : winevulkan: Convert all 32-bit structs containing pNext pointer.
by Alexandre Julliard
17 Nov '22
17 Nov '22
Module: wine Branch: master Commit: af2f0c790bc19f391008ef0c1ef1ae80ecd450d9 URL:
https://gitlab.winehq.org/wine/wine/-/commit/af2f0c790bc19f391008ef0c1ef1ae…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Nov 11 18:38:06 2022 +0100 winevulkan: Convert all 32-bit structs containing pNext pointer. --- dlls/winevulkan/make_vulkan | 9 + dlls/winevulkan/vulkan_thunks.c | 24742 ++++++++++++++++++++++++++++---------- 2 files changed, 18241 insertions(+), 6510 deletions(-)
1
0
0
0
Jacek Caban : winevulkan: Align conversion_context_alloc result.
by Alexandre Julliard
17 Nov '22
17 Nov '22
Module: wine Branch: master Commit: daf1883b14304b4650d16250e7269406644ba625 URL:
https://gitlab.winehq.org/wine/wine/-/commit/daf1883b14304b4650d16250e72694…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Nov 17 10:47:53 2022 +0100 winevulkan: Align conversion_context_alloc result. --- dlls/winevulkan/vulkan_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winevulkan/vulkan_private.h b/dlls/winevulkan/vulkan_private.h index 9c151ab32d8..524318c7308 100644 --- a/dlls/winevulkan/vulkan_private.h +++ b/dlls/winevulkan/vulkan_private.h @@ -264,7 +264,7 @@ static inline void *conversion_context_alloc(struct conversion_context *pool, si if (pool->used + size <= sizeof(pool->buffer)) { void *ret = pool->buffer + pool->used; - pool->used += size; + pool->used += (size + sizeof(UINT64) - 1) & ~(sizeof(UINT64) - 1); return ret; } else
1
0
0
0
Rémi Bernon : opengl32: Implement wow64 thunk for wglMakeCurrent (et al.).
by Alexandre Julliard
17 Nov '22
17 Nov '22
Module: wine Branch: master Commit: c24d7a23ad066e444cc3555d5f159b7b77c466b4 URL:
https://gitlab.winehq.org/wine/wine/-/commit/c24d7a23ad066e444cc3555d5f159b…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Nov 14 22:51:46 2022 +0100 opengl32: Implement wow64 thunk for wglMakeCurrent (et al.). Keeping the 32bit TEB context and private data in sync. --- dlls/opengl32/make_opengl | 4 +++ dlls/opengl32/unix_thunks.c | 76 +++------------------------------------ dlls/opengl32/unix_wgl.c | 87 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+), 72 deletions(-) diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index 312e7acc964..7803dd21287 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -170,7 +170,11 @@ my %manual_win_thunks = my %manual_wow64_thunks = ( "glPathGlyphIndexRangeNV" => 1, + "wglCreateContext" => 1, + "wglDeleteContext" => 1, "wglGetProcAddress" => 1, + "wglMakeContextCurrentARB" => 1, + "wglMakeCurrent" => 1, ); # diff --git a/dlls/opengl32/unix_thunks.c b/dlls/opengl32/unix_thunks.c index c710d2141ec..5accad6fc0b 100644 --- a/dlls/opengl32/unix_thunks.c +++ b/dlls/opengl32/unix_thunks.c @@ -27222,38 +27222,6 @@ static NTSTATUS wow64_wgl_wglCopyContext( void *args ) return status; } -static NTSTATUS wow64_wgl_wglCreateContext( void *args ) -{ - struct - { - PTR32 hDc; - PTR32 ret; - } *params32 = args; - struct wglCreateContext_params params = - { - .hDc = ULongToPtr(params32->hDc), - }; - FIXME( "params32 %p, params %p stub!\n", params32, ¶ms ); - return STATUS_NOT_IMPLEMENTED; -} - -static NTSTATUS wow64_wgl_wglDeleteContext( void *args ) -{ - struct - { - PTR32 oldContext; - BOOL ret; - } *params32 = args; - struct wglDeleteContext_params params = - { - .oldContext = ULongToPtr(params32->oldContext), - }; - NTSTATUS status; - status = wgl_wglDeleteContext( ¶ms ); - params32->ret = params.ret; - return status; -} - static NTSTATUS wow64_wgl_wglDescribePixelFormat( void *args ) { struct @@ -27294,25 +27262,6 @@ static NTSTATUS wow64_wgl_wglGetPixelFormat( void *args ) return status; } -static NTSTATUS wow64_wgl_wglMakeCurrent( void *args ) -{ - struct - { - PTR32 hDc; - PTR32 newContext; - BOOL ret; - } *params32 = args; - struct wglMakeCurrent_params params = - { - .hDc = ULongToPtr(params32->hDc), - .newContext = ULongToPtr(params32->newContext), - }; - NTSTATUS status; - status = wgl_wglMakeCurrent( ¶ms ); - params32->ret = params.ret; - return status; -} - static NTSTATUS wow64_wgl_wglSetPixelFormat( void *args ) { struct @@ -60879,27 +60828,6 @@ static NTSTATUS wow64_ext_wglGetPixelFormatAttribivARB( void *args ) return status; } -static NTSTATUS wow64_ext_wglMakeContextCurrentARB( void *args ) -{ - struct - { - PTR32 hDrawDC; - PTR32 hReadDC; - PTR32 hglrc; - BOOL ret; - } *params32 = args; - struct wglMakeContextCurrentARB_params params = - { - .hDrawDC = ULongToPtr(params32->hDrawDC), - .hReadDC = ULongToPtr(params32->hReadDC), - .hglrc = ULongToPtr(params32->hglrc), - }; - NTSTATUS status; - status = ext_wglMakeContextCurrentARB( ¶ms ); - params32->ret = params.ret; - return status; -} - static NTSTATUS wow64_ext_wglQueryCurrentRendererIntegerWINE( void *args ) { struct @@ -61073,8 +61001,12 @@ static NTSTATUS wow64_ext_wglSetPixelFormatWINE( void *args ) return status; } +extern NTSTATUS wow64_wgl_wglCreateContext( void *args ) DECLSPEC_HIDDEN; +extern NTSTATUS wow64_wgl_wglDeleteContext( void *args ) DECLSPEC_HIDDEN; extern NTSTATUS wow64_wgl_wglGetProcAddress( void *args ) DECLSPEC_HIDDEN; +extern NTSTATUS wow64_wgl_wglMakeCurrent( void *args ) DECLSPEC_HIDDEN; extern NTSTATUS wow64_ext_glPathGlyphIndexRangeNV( void *args ) DECLSPEC_HIDDEN; +extern NTSTATUS wow64_ext_wglMakeContextCurrentARB( void *args ) DECLSPEC_HIDDEN; const unixlib_entry_t __wine_unix_call_wow64_funcs[] = { diff --git a/dlls/opengl32/unix_wgl.c b/dlls/opengl32/unix_wgl.c index 7fd044182d7..7ba2045e384 100644 --- a/dlls/opengl32/unix_wgl.c +++ b/dlls/opengl32/unix_wgl.c @@ -1060,6 +1060,93 @@ typedef ULONG PTR32; extern NTSTATUS ext_glPathGlyphIndexRangeNV( void *args ) DECLSPEC_HIDDEN; +static inline void update_teb32_context(void) +{ + TEB *teb = NtCurrentTeb(); + void *teb32; + + if (!teb->WowTebOffset) return; + teb32 = (char *)teb + teb->WowTebOffset; + + ((TEB32 *)teb32)->glCurrentRC = (UINT_PTR)teb->glCurrentRC; + ((TEB32 *)teb32)->glReserved1[0] = (UINT_PTR)teb->glReserved1[0]; + ((TEB32 *)teb32)->glReserved1[1] = (UINT_PTR)teb->glReserved1[1]; +} + +NTSTATUS wow64_wgl_wglCreateContext( void *args ) +{ + struct + { + PTR32 hDc; + PTR32 ret; + } *params32 = args; + struct wglCreateContext_params params = + { + .hDc = ULongToPtr(params32->hDc), + }; + NTSTATUS status; + if ((status = wgl_wglCreateContext( ¶ms ))) return status; + params32->ret = (UINT_PTR)params.ret; + return STATUS_SUCCESS; +} + +NTSTATUS wow64_wgl_wglDeleteContext( void *args ) +{ + struct + { + PTR32 oldContext; + BOOL ret; + } *params32 = args; + struct wglDeleteContext_params params = + { + .oldContext = ULongToPtr(params32->oldContext), + }; + NTSTATUS status; + if (!(status = wgl_wglDeleteContext( ¶ms ))) update_teb32_context(); + params32->ret = params.ret; + return status; +} + +NTSTATUS wow64_wgl_wglMakeCurrent( void *args ) +{ + struct + { + PTR32 hDc; + PTR32 newContext; + BOOL ret; + } *params32 = args; + struct wglMakeCurrent_params params = + { + .hDc = ULongToPtr(params32->hDc), + .newContext = ULongToPtr(params32->newContext), + }; + NTSTATUS status; + if (!(status = wgl_wglMakeCurrent( ¶ms ))) update_teb32_context(); + params32->ret = params.ret; + return status; +} + +NTSTATUS wow64_ext_wglMakeContextCurrentARB( void *args ) +{ + struct + { + PTR32 hDrawDC; + PTR32 hReadDC; + PTR32 hglrc; + BOOL ret; + } *params32 = args; + struct wglMakeContextCurrentARB_params params = + { + .hDrawDC = ULongToPtr(params32->hDrawDC), + .hReadDC = ULongToPtr(params32->hReadDC), + .hglrc = ULongToPtr(params32->hglrc), + }; + NTSTATUS status; + if (!(status = ext_wglMakeContextCurrentARB( ¶ms ))) update_teb32_context(); + params32->ret = params.ret; + return status; +} + NTSTATUS wow64_wgl_wglGetProcAddress( void *args ) { struct
1
0
0
0
Rémi Bernon : opengl32: Implement wow64 thunk for wglGetProcAddress.
by Alexandre Julliard
17 Nov '22
17 Nov '22
Module: wine Branch: master Commit: e9db6bca44921b47bb5454a295f1fa208a6cebaa URL:
https://gitlab.winehq.org/wine/wine/-/commit/e9db6bca44921b47bb5454a295f1fa…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Nov 14 22:51:31 2022 +0100 opengl32: Implement wow64 thunk for wglGetProcAddress. --- dlls/opengl32/make_opengl | 1 + dlls/opengl32/unix_thunks.c | 16 +--------------- dlls/opengl32/unix_wgl.c | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index f0cdd136bcf..312e7acc964 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -170,6 +170,7 @@ my %manual_win_thunks = my %manual_wow64_thunks = ( "glPathGlyphIndexRangeNV" => 1, + "wglGetProcAddress" => 1, ); # diff --git a/dlls/opengl32/unix_thunks.c b/dlls/opengl32/unix_thunks.c index b424bac922b..c710d2141ec 100644 --- a/dlls/opengl32/unix_thunks.c +++ b/dlls/opengl32/unix_thunks.c @@ -27294,21 +27294,6 @@ static NTSTATUS wow64_wgl_wglGetPixelFormat( void *args ) return status; } -static NTSTATUS wow64_wgl_wglGetProcAddress( void *args ) -{ - struct - { - PTR32 lpszProc; - PTR32 ret; - } *params32 = args; - struct wglGetProcAddress_params params = - { - .lpszProc = ULongToPtr(params32->lpszProc), - }; - FIXME( "params32 %p, params %p stub!\n", params32, ¶ms ); - return STATUS_NOT_IMPLEMENTED; -} - static NTSTATUS wow64_wgl_wglMakeCurrent( void *args ) { struct @@ -61088,6 +61073,7 @@ static NTSTATUS wow64_ext_wglSetPixelFormatWINE( void *args ) return status; } +extern NTSTATUS wow64_wgl_wglGetProcAddress( void *args ) DECLSPEC_HIDDEN; extern NTSTATUS wow64_ext_glPathGlyphIndexRangeNV( void *args ) DECLSPEC_HIDDEN; const unixlib_entry_t __wine_unix_call_wow64_funcs[] = diff --git a/dlls/opengl32/unix_wgl.c b/dlls/opengl32/unix_wgl.c index 0daaf597ff3..7fd044182d7 100644 --- a/dlls/opengl32/unix_wgl.c +++ b/dlls/opengl32/unix_wgl.c @@ -542,6 +542,9 @@ static PROC WINAPI wrap_wglGetProcAddress( LPCSTR name ) *func_ptr = driver_func; } + /* Return the index into the extension registry instead of a useless + * function pointer, PE side will returns its own function pointers. + */ return (void *)(UINT_PTR)(found - extension_registry); } @@ -1057,6 +1060,23 @@ typedef ULONG PTR32; extern NTSTATUS ext_glPathGlyphIndexRangeNV( void *args ) DECLSPEC_HIDDEN; +NTSTATUS wow64_wgl_wglGetProcAddress( void *args ) +{ + struct + { + PTR32 lpszProc; + PTR32 ret; + } *params32 = args; + struct wglGetProcAddress_params params = + { + .lpszProc = ULongToPtr(params32->lpszProc), + }; + NTSTATUS status; + if ((status = wgl_wglGetProcAddress( ¶ms ))) return status; + params32->ret = (UINT_PTR)params.ret; + return STATUS_SUCCESS; +} + NTSTATUS wow64_ext_glPathGlyphIndexRangeNV( void *args ) { struct
1
0
0
0
Rémi Bernon : opengl32: Manually write glPathGlyphIndexRangeNV wow64 thunk.
by Alexandre Julliard
17 Nov '22
17 Nov '22
Module: wine Branch: master Commit: 076ac8484ea00a5336f0e149f70a94adbaebc0c1 URL:
https://gitlab.winehq.org/wine/wine/-/commit/076ac8484ea00a5336f0e149f70a94…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Oct 7 18:12:51 2022 +0200 opengl32: Manually write glPathGlyphIndexRangeNV wow64 thunk. --- dlls/opengl32/make_opengl | 40 +++++++++++++++++++++++++++++++++------- dlls/opengl32/unix_thunks.c | 27 ++------------------------- dlls/opengl32/unix_wgl.c | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 32 deletions(-) diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index 9eff8e83bcc..f0cdd136bcf 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -167,6 +167,10 @@ my %manual_win_thunks = "wglGetProcAddress" => 1, "wglSwapBuffers" => 1, ); +my %manual_wow64_thunks = + ( + "glPathGlyphIndexRangeNV" => 1, + ); # # Used to convert some types @@ -258,7 +262,7 @@ sub generate_unix_thunk($$$) my $func_ret = get_func_ret( $func, 0 ); my $ret = ""; - $ret .= "static NTSTATUS $prefix\_$name( void *args )\n"; + $ret .= "NTSTATUS $prefix\_$name( void *args )\n"; $ret .= "{\n"; $ret .= " struct $name\_params *params = args;\n" unless !$call_args && is_void_func( $func ); # special case for functions that take an HDC as first parameter @@ -1058,18 +1062,21 @@ foreach (sort keys %wgl_functions) { next if defined $manual_win_functions{$_}; next if needs_wrapper( $_, $wgl_functions{$_} ); + print OUT "static " unless defined $manual_wow64_thunks{$_}; print OUT generate_unix_thunk($_, $wgl_functions{$_}, "wgl"); } foreach (sort keys %norm_functions) { next if defined $manual_win_functions{$_}; next if needs_wrapper( $_, $norm_functions{$_} ); + print OUT "static " unless defined $manual_wow64_thunks{$_}; print OUT generate_unix_thunk($_, $norm_functions{$_}, "gl"); } foreach (sort keys %ext_functions) { next if defined $manual_win_functions{$_}; next if needs_wrapper( $_, $ext_functions{$_} ); + print OUT "static " unless defined $manual_wow64_thunks{$_}; print OUT generate_unix_thunk($_, $ext_functions{$_}, "ext"); } @@ -1099,29 +1106,48 @@ print OUT "typedef ULONG PTR32;\n\n"; foreach (sort keys %wgl_functions) { next if defined $manual_win_functions{$_}; - next if !needs_wow64_thunk($_, $wgl_functions{$_}); + next if !needs_wow64_thunk($_, $wgl_functions{$_}) || defined $manual_wow64_thunks{$_}; print OUT generate_wow64_thunk($_, $wgl_functions{$_}, "wgl"); } foreach (sort keys %norm_functions) { next if defined $manual_win_functions{$_}; - next if !needs_wow64_thunk($_, $norm_functions{$_}); + next if !needs_wow64_thunk($_, $norm_functions{$_}) || defined $manual_wow64_thunks{$_}; print OUT generate_wow64_thunk($_, $norm_functions{$_}, "gl"); } foreach (sort keys %ext_functions) { next if defined $manual_win_functions{$_}; - next if !needs_wow64_thunk($_, $ext_functions{$_}); + next if !needs_wow64_thunk($_, $ext_functions{$_}) || defined $manual_wow64_thunks{$_}; print OUT generate_wow64_thunk($_, $ext_functions{$_}, "ext"); } +foreach (sort keys %wgl_functions) +{ + next if defined $manual_win_functions{$_}; + next unless defined $manual_wow64_thunks{$_}; + print OUT "extern NTSTATUS wow64_wgl_$_( void *args ) DECLSPEC_HIDDEN;\n"; +} +foreach (sort keys %norm_functions) +{ + next if defined $manual_win_functions{$_}; + next unless defined $manual_wow64_thunks{$_}; + print OUT "extern NTSTATUS wow64_gl_$_( void *args ) DECLSPEC_HIDDEN;\n"; +} +foreach (sort keys %ext_functions) +{ + next if defined $manual_win_functions{$_}; + next unless defined $manual_wow64_thunks{$_}; + print OUT "extern NTSTATUS wow64_ext_$_( void *args ) DECLSPEC_HIDDEN;\n"; +} + print OUT "\nconst unixlib_entry_t __wine_unix_call_wow64_funcs[] =\n"; print OUT "{\n"; print OUT " &thread_attach,\n"; foreach (sort keys %wgl_functions) { next if defined $manual_win_functions{$_}; - if (needs_wow64_thunk($_, $wgl_functions{$_})) + if (needs_wow64_thunk($_, $wgl_functions{$_}) || defined $manual_wow64_thunks{$_}) { printf OUT " &wow64_wgl_%s,\n", $_; } @@ -1133,7 +1159,7 @@ foreach (sort keys %wgl_functions) foreach (sort keys %norm_functions) { next if defined $manual_win_functions{$_}; - if (needs_wow64_thunk($_, $norm_functions{$_})) + if (needs_wow64_thunk($_, $norm_functions{$_}) || defined $manual_wow64_thunks{$_}) { printf OUT " &wow64_gl_%s,\n", $_; } @@ -1145,7 +1171,7 @@ foreach (sort keys %norm_functions) foreach (sort keys %ext_functions) { next if defined $manual_win_functions{$_}; - if (needs_wow64_thunk($_, $ext_functions{$_})) + if (needs_wow64_thunk($_, $ext_functions{$_}) || defined $manual_wow64_thunks{$_}) { printf OUT " &wow64_ext_%s,\n", $_; } diff --git a/dlls/opengl32/unix_thunks.c b/dlls/opengl32/unix_thunks.c index c46618d4694..b424bac922b 100644 --- a/dlls/opengl32/unix_thunks.c +++ b/dlls/opengl32/unix_thunks.c @@ -14753,7 +14753,7 @@ static NTSTATUS ext_glPathGlyphIndexArrayNV( void *args ) return STATUS_SUCCESS; } -static NTSTATUS ext_glPathGlyphIndexRangeNV( void *args ) +NTSTATUS ext_glPathGlyphIndexRangeNV( void *args ) { struct glPathGlyphIndexRangeNV_params *params = args; const struct opengl_funcs *funcs = NtCurrentTeb()->glTable; @@ -48613,30 +48613,6 @@ static NTSTATUS wow64_ext_glPathGlyphIndexArrayNV( void *args ) return status; } -static NTSTATUS wow64_ext_glPathGlyphIndexRangeNV( void *args ) -{ - struct - { - GLenum fontTarget; - PTR32 fontName; - GLbitfield fontStyle; - GLuint pathParameterTemplate; - GLfloat emScale; - PTR32 baseAndCount; - GLenum ret; - } *params32 = args; - struct glPathGlyphIndexRangeNV_params params = - { - .fontTarget = params32->fontTarget, - .fontName = ULongToPtr(params32->fontName), - .fontStyle = params32->fontStyle, - .pathParameterTemplate = params32->pathParameterTemplate, - .emScale = params32->emScale, - }; - FIXME( "params32 %p, params %p stub!\n", params32, ¶ms ); - return STATUS_NOT_IMPLEMENTED; -} - static NTSTATUS wow64_ext_glPathGlyphRangeNV( void *args ) { struct @@ -61112,6 +61088,7 @@ static NTSTATUS wow64_ext_wglSetPixelFormatWINE( void *args ) return status; } +extern NTSTATUS wow64_ext_glPathGlyphIndexRangeNV( void *args ) DECLSPEC_HIDDEN; const unixlib_entry_t __wine_unix_call_wow64_funcs[] = { diff --git a/dlls/opengl32/unix_wgl.c b/dlls/opengl32/unix_wgl.c index 54f4b0709dd..0daaf597ff3 100644 --- a/dlls/opengl32/unix_wgl.c +++ b/dlls/opengl32/unix_wgl.c @@ -1050,3 +1050,38 @@ NTSTATUS WINAPI thread_attach( void *args ) NtCurrentTeb()->glTable = &null_opengl_funcs; return STATUS_SUCCESS; } + +#ifdef _WIN64 + +typedef ULONG PTR32; + +extern NTSTATUS ext_glPathGlyphIndexRangeNV( void *args ) DECLSPEC_HIDDEN; + +NTSTATUS wow64_ext_glPathGlyphIndexRangeNV( void *args ) +{ + struct + { + GLenum fontTarget; + PTR32 fontName; + GLbitfield fontStyle; + GLuint pathParameterTemplate; + GLfloat emScale; + GLuint baseAndCount[2]; + GLenum ret; + } *params32 = args; + struct glPathGlyphIndexRangeNV_params params = + { + .fontTarget = params32->fontTarget, + .fontName = ULongToPtr(params32->fontName), + .fontStyle = params32->fontStyle, + .pathParameterTemplate = params32->pathParameterTemplate, + .emScale = params32->emScale, + .baseAndCount = {params32->baseAndCount[0], params32->baseAndCount[1]}, + }; + NTSTATUS status; + if ((status = ext_glPathGlyphIndexRangeNV( ¶ms ))) return status; + params32->ret = params.ret; + return status; +} + +#endif
1
0
0
0
Rémi Bernon : opengl32: Generate wow64 thunks.
by Alexandre Julliard
17 Nov '22
17 Nov '22
Module: wine Branch: master Commit: 531b8bc48326d3fb047c5b335cd5eb77a4ce4244 URL:
https://gitlab.winehq.org/wine/wine/-/commit/531b8bc48326d3fb047c5b335cd5eb…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sat Nov 5 01:22:12 2022 +0100 opengl32: Generate wow64 thunks. --- dlls/opengl32/make_opengl | 170 +- dlls/opengl32/unix_thunks.c | 36969 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 37136 insertions(+), 3 deletions(-)
1
0
0
0
Brendan Shanks : configure: On macOS, build the loader targeting 10.7 when preloader is used.
by Alexandre Julliard
17 Nov '22
17 Nov '22
Module: wine Branch: master Commit: 63bf2677ed22d26ff1f5ff1886fde08b1f5fb00c URL:
https://gitlab.winehq.org/wine/wine/-/commit/63bf2677ed22d26ff1f5ff1886fde0…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Mon Nov 7 15:48:51 2022 -0800 configure: On macOS, build the loader targeting 10.7 when preloader is used. Building the loader targeting 10.7 (to generate an LC_UNIXTHREAD binary) seems to fix an issue in the Mac driver with 10.13 and earlier where window layers wouldn't update correctly. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52354
--- configure | 1 + configure.ac | 2 ++ 2 files changed, 3 insertions(+) diff --git a/configure b/configure index 71dfee4444e..5f1863246ea 100755 --- a/configure +++ b/configure @@ -9946,6 +9946,7 @@ then : fi test "$wine_binary" = wine || as_fn_append CONFIGURE_TARGETS " loader/wine-preloader" WINELOADER_PROGRAMS="$WINELOADER_PROGRAMS $wine_binary-preloader" + WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -mmacosx-version-min=10.7" else as_fn_append wine_warnings "|can't build Wine preloader; many programs won't work" fi diff --git a/configure.ac b/configure.ac index cc3f42ecbf0..4e852da5ee7 100644 --- a/configure.ac +++ b/configure.ac @@ -711,6 +711,8 @@ case $host_os in [WINEPRELOADER_LDFLAGS="-Wl,-no_pie $WINEPRELOADER_LDFLAGS"]) test "$wine_binary" = wine || WINE_IGNORE_FILE(loader/wine-preloader) WINELOADER_PROGRAMS="$WINELOADER_PROGRAMS $wine_binary-preloader" + dnl If preloader is used, the loader needs to be an LC_UNIXTHREAD binary to avoid AppKit/Core Animation problems. + WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -mmacosx-version-min=10.7" else WINE_WARNING([can't build Wine preloader; many programs won't work]) fi
1
0
0
0
Zebediah Figura : setupapi: Fill the required size in SetupDiGetDeviceInterfaceDetail() also on success.
by Alexandre Julliard
17 Nov '22
17 Nov '22
Module: wine Branch: master Commit: d15262e464ba3536567ad73f68d95e6b7f88f3aa URL:
https://gitlab.winehq.org/wine/wine/-/commit/d15262e464ba3536567ad73f68d95e…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed Nov 16 19:31:35 2022 -0600 setupapi: Fill the required size in SetupDiGetDeviceInterfaceDetail() also on success. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53387
--- dlls/setupapi/devinst.c | 24 ++++++++++++++---------- dlls/setupapi/tests/devinst.c | 4 ++-- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index 930ed670e84..896e77d9b38 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -2976,15 +2976,15 @@ BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO devinfo) */ BOOL WINAPI SetupDiGetDeviceInterfaceDetailA(HDEVINFO devinfo, SP_DEVICE_INTERFACE_DATA *iface_data, SP_DEVICE_INTERFACE_DETAIL_DATA_A *DeviceInterfaceDetailData, - DWORD DeviceInterfaceDetailDataSize, DWORD *RequiredSize, SP_DEVINFO_DATA *device_data) + DWORD DeviceInterfaceDetailDataSize, DWORD *ret_size, SP_DEVINFO_DATA *device_data) { struct device_iface *iface; DWORD bytesNeeded = FIELD_OFFSET(SP_DEVICE_INTERFACE_DETAIL_DATA_A, DevicePath[1]); BOOL ret = FALSE; - TRACE("devinfo %p, iface_data %p, detail_data %p, size %ld, needed %p, device_data %p.\n", + TRACE("devinfo %p, iface_data %p, detail_data %p, size %ld, ret_size %p, device_data %p.\n", devinfo, iface_data, DeviceInterfaceDetailData, DeviceInterfaceDetailDataSize, - RequiredSize, device_data); + ret_size, device_data); if (!(iface = get_device_iface(devinfo, iface_data))) return FALSE; @@ -3004,6 +3004,10 @@ BOOL WINAPI SetupDiGetDeviceInterfaceDetailA(HDEVINFO devinfo, SP_DEVICE_INTERFA if (iface->symlink) bytesNeeded += WideCharToMultiByte(CP_ACP, 0, iface->symlink, -1, NULL, 0, NULL, NULL) - 1; + + if (ret_size) + *ret_size = bytesNeeded; + if (DeviceInterfaceDetailDataSize >= bytesNeeded) { if (iface->symlink) @@ -3019,8 +3023,6 @@ BOOL WINAPI SetupDiGetDeviceInterfaceDetailA(HDEVINFO devinfo, SP_DEVICE_INTERFA } else { - if (RequiredSize) - *RequiredSize = bytesNeeded; SetLastError(ERROR_INSUFFICIENT_BUFFER); } @@ -3035,16 +3037,16 @@ BOOL WINAPI SetupDiGetDeviceInterfaceDetailA(HDEVINFO devinfo, SP_DEVICE_INTERFA */ BOOL WINAPI SetupDiGetDeviceInterfaceDetailW(HDEVINFO devinfo, SP_DEVICE_INTERFACE_DATA *iface_data, SP_DEVICE_INTERFACE_DETAIL_DATA_W *DeviceInterfaceDetailData, - DWORD DeviceInterfaceDetailDataSize, DWORD *RequiredSize, SP_DEVINFO_DATA *device_data) + DWORD DeviceInterfaceDetailDataSize, DWORD *ret_size, SP_DEVINFO_DATA *device_data) { struct device_iface *iface; DWORD bytesNeeded = offsetof(SP_DEVICE_INTERFACE_DETAIL_DATA_W, DevicePath) + sizeof(WCHAR); /* include NULL terminator */ BOOL ret = FALSE; - TRACE("devinfo %p, iface_data %p, detail_data %p, size %ld, needed %p, device_data %p.\n", + TRACE("devinfo %p, iface_data %p, detail_data %p, size %ld, ret_size %p, device_data %p.\n", devinfo, iface_data, DeviceInterfaceDetailData, DeviceInterfaceDetailDataSize, - RequiredSize, device_data); + ret_size, device_data); if (!(iface = get_device_iface(devinfo, iface_data))) return FALSE; @@ -3064,6 +3066,10 @@ BOOL WINAPI SetupDiGetDeviceInterfaceDetailW(HDEVINFO devinfo, SP_DEVICE_INTERFA if (iface->symlink) bytesNeeded += sizeof(WCHAR) * lstrlenW(iface->symlink); + + if (ret_size) + *ret_size = bytesNeeded; + if (DeviceInterfaceDetailDataSize >= bytesNeeded) { if (iface->symlink) @@ -3075,8 +3081,6 @@ BOOL WINAPI SetupDiGetDeviceInterfaceDetailW(HDEVINFO devinfo, SP_DEVICE_INTERFA } else { - if (RequiredSize) - *RequiredSize = bytesNeeded; SetLastError(ERROR_INSUFFICIENT_BUFFER); } diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c index 2a33da2d72a..be0831f6882 100644 --- a/dlls/setupapi/tests/devinst.c +++ b/dlls/setupapi/tests/devinst.c @@ -1257,14 +1257,14 @@ static void test_device_iface_detail(void) ret = SetupDiGetDeviceInterfaceDetailA(set, &iface, detail, expected_size, &size, NULL); ok(ret, "Failed to get interface detail, error %#lx.\n", GetLastError()); ok(!strcasecmp(path, detail->DevicePath), "Got unexpected path %s.\n", detail->DevicePath); - todo_wine ok(size == expected_size, "Expected size %lu, got %lu.\n", expected_size, size); + ok(size == expected_size, "Expected size %lu, got %lu.\n", expected_size, size); SetLastError(0xdeadbeef); size = 0xdeadbeef; ret = SetupDiGetDeviceInterfaceDetailA(set, &iface, detail, expected_size * 2, &size, NULL); ok(ret, "Failed to get interface detail, error %#lx.\n", GetLastError()); ok(!strcasecmp(path, detail->DevicePath), "Got unexpected path %s.\n", detail->DevicePath); - todo_wine ok(size == expected_size, "Expected size %lu, got %lu.\n", expected_size, size); + ok(size == expected_size, "Expected size %lu, got %lu.\n", expected_size, size); expected_size = FIELD_OFFSET(SP_DEVICE_INTERFACE_DETAIL_DATA_W, DevicePath[strlen(path) + 1]);
1
0
0
0
← Newer
1
...
52
53
54
55
56
57
58
...
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