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
June 2024
----- 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
613 discussions
Start a n
N
ew thread
Elizabeth Figura : wined3d: Invalidate the vertex shader when WINED3D_FFP_PSIZE is toggled.
by Alexandre Julliard
05 Jun '24
05 Jun '24
Module: wine Branch: master Commit: 392a724fc9fb59d4b82adbca3652962832db87e8 URL:
https://gitlab.winehq.org/wine/wine/-/commit/392a724fc9fb59d4b82adbca365296…
Author: Elizabeth Figura <zfigura(a)codeweavers.com> Date: Fri May 3 16:20:30 2024 -0500 wined3d: Invalidate the vertex shader when WINED3D_FFP_PSIZE is toggled. --- dlls/d3d9/tests/visual.c | 2 +- dlls/wined3d/glsl_shader.c | 4 +++- dlls/wined3d/wined3d_private.h | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 600a6296c70..d1020339db0 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -12332,7 +12332,7 @@ static void test_pointsize(void) ok(color != 0xff00ffff, "Got unexpected color 0x%08x at (64, 64).\n", color); } - todo_wine_if (j == 10) + todo_wine_if (j == 10 || (j == 11 && i == 10)) { color = get_readback_color(&rb, 63, 64); ok(color == 0xff00ffff, "Got unexpected color 0x%08x at (63, 64).\n", color); diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index ea79e0361e0..463dbf47fd6 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -11759,6 +11759,7 @@ static void glsl_vertex_pipe_vdecl(struct wined3d_context *context, struct wined3d_context_gl *context_gl = wined3d_context_gl(context); const struct wined3d_gl_info *gl_info = context_gl->gl_info; BOOL specular = !!(context->stream_info.use_map & (1u << WINED3D_FFP_SPECULAR)); + BOOL point_size = !!(context->stream_info.use_map & (1u << WINED3D_FFP_PSIZE)); BOOL diffuse = !!(context->stream_info.use_map & (1u << WINED3D_FFP_DIFFUSE)); BOOL normal = !!(context->stream_info.use_map & (1u << WINED3D_FFP_NORMAL)); const BOOL legacy_clip_planes = needs_legacy_glsl_syntax(gl_info); @@ -11799,7 +11800,7 @@ static void glsl_vertex_pipe_vdecl(struct wined3d_context *context, * normal presence changes. */ if (!shader_glsl_full_ffp_varyings(gl_info) || (state->render_states[WINED3D_RS_COLORVERTEX] && (diffuse != context->last_was_diffuse || specular != context->last_was_specular)) - || normal != context->last_was_normal) + || normal != context->last_was_normal || point_size != context->last_was_point_size) context->shader_update_mask |= 1u << WINED3D_SHADER_TYPE_VERTEX; if (use_ps(state) @@ -11824,6 +11825,7 @@ static void glsl_vertex_pipe_vdecl(struct wined3d_context *context, context->last_was_diffuse = diffuse; context->last_was_specular = specular; context->last_was_normal = normal; + context->last_was_point_size = point_size; } static void glsl_vertex_pipe_vs(struct wined3d_context *context, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 67ddf6f88cd..85badd3b2c3 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1907,12 +1907,12 @@ struct wined3d_context DWORD update_unordered_access_view_bindings : 1; DWORD update_compute_unordered_access_view_bindings : 1; DWORD update_primitive_type : 1; - DWORD update_patch_vertex_count : 1; DWORD last_was_rhw : 1; /* True iff last draw_primitive was in xyzrhw mode. */ DWORD last_was_vshader : 1; DWORD last_was_diffuse : 1; DWORD last_was_specular : 1; DWORD last_was_normal : 1; + DWORD last_was_point_size : 1; DWORD last_was_ffp_blit : 1; DWORD last_was_blit : 1; DWORD last_was_dual_source_blend : 1; @@ -1927,7 +1927,8 @@ struct wined3d_context DWORD destroyed : 1; DWORD destroy_delayed : 1; DWORD update_multisample_state : 1; - DWORD padding : 24; + DWORD update_patch_vertex_count : 1; + DWORD padding : 23; DWORD clip_distance_mask : 8; /* WINED3D_MAX_CLIP_DISTANCES, 8 */
1
0
0
0
Rémi Bernon : gdi32: Use an internal NtUser call for D3DKMTOpenAdapterFromGdiDisplayName.
by Alexandre Julliard
05 Jun '24
05 Jun '24
Module: wine Branch: master Commit: 6b8cdda502a5fd726529af0cdb14c57467cde14b URL:
https://gitlab.winehq.org/wine/wine/-/commit/6b8cdda502a5fd726529af0cdb14c5…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Jun 4 12:46:47 2024 +0200 gdi32: Use an internal NtUser call for D3DKMTOpenAdapterFromGdiDisplayName. Fixes a deadlock with display_device_init mutex and display_lock when trying to open the D3DKMT adapter while holding the mutex in the caller. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=56764
--- dlls/gdi32/Makefile.in | 2 +- dlls/gdi32/objects.c | 78 ++----------------------------------------------- dlls/win32u/sysparams.c | 31 ++++++++++++++++++++ include/ntuser.h | 8 +++++ 4 files changed, 42 insertions(+), 77 deletions(-) diff --git a/dlls/gdi32/Makefile.in b/dlls/gdi32/Makefile.in index 8c5a299933d..80a5ad0858b 100644 --- a/dlls/gdi32/Makefile.in +++ b/dlls/gdi32/Makefile.in @@ -2,7 +2,7 @@ EXTRADEFS = -D_GDI32_ MODULE = gdi32.dll IMPORTLIB = gdi32 IMPORTS = user32 advapi32 win32u -DELAYIMPORTS = setupapi winspool +DELAYIMPORTS = winspool SOURCES = \ dc.c \ diff --git a/dlls/gdi32/objects.c b/dlls/gdi32/objects.c index 070ce9c3885..0c7eacae2e5 100644 --- a/dlls/gdi32/objects.c +++ b/dlls/gdi32/objects.c @@ -886,89 +886,15 @@ UINT WINAPI SetDIBColorTable( HDC hdc, UINT start, UINT count, const RGBQUAD *co return NtGdiDoPalette( hdc, start, count, (void *)colors, NtGdiSetDIBColorTable, FALSE ); } -static HANDLE get_display_device_init_mutex( void ) -{ - HANDLE mutex = CreateMutexW( NULL, FALSE, L"display_device_init" ); - - WaitForSingleObject( mutex, INFINITE ); - return mutex; -} - -static void release_display_device_init_mutex( HANDLE mutex ) -{ - ReleaseMutex( mutex ); - CloseHandle( mutex ); -} - /*********************************************************************** * D3DKMTOpenAdapterFromGdiDisplayName (GDI32.@) */ NTSTATUS WINAPI D3DKMTOpenAdapterFromGdiDisplayName( D3DKMT_OPENADAPTERFROMGDIDISPLAYNAME *desc ) { - WCHAR *end, key_nameW[MAX_PATH], bufferW[MAX_PATH]; - HDEVINFO devinfo = INVALID_HANDLE_VALUE; - NTSTATUS status = STATUS_UNSUCCESSFUL; - D3DKMT_OPENADAPTERFROMLUID luid_desc; - SP_DEVINFO_DATA device_data; - DWORD size, state_flags; - DEVPROPTYPE type; - HANDLE mutex; - int index; - TRACE("(%p)\n", desc); - if (!desc) - return STATUS_UNSUCCESSFUL; - - TRACE("DeviceName: %s\n", wine_dbgstr_w( desc->DeviceName )); - if (wcsnicmp( desc->DeviceName, L"\\\\.\\DISPLAY", lstrlenW(L"\\\\.\\DISPLAY") )) - return STATUS_UNSUCCESSFUL; - - index = wcstol( desc->DeviceName + lstrlenW(L"\\\\.\\DISPLAY"), &end, 10 ) - 1; - if (*end) - return STATUS_UNSUCCESSFUL; - - /* Get adapter LUID from SetupAPI */ - mutex = get_display_device_init_mutex(); - - size = sizeof( bufferW ); - swprintf( key_nameW, MAX_PATH, L"\\Device\\Video%d", index ); - if (RegGetValueW( HKEY_LOCAL_MACHINE, L"HARDWARE\\DEVICEMAP\\VIDEO", key_nameW, - RRF_RT_REG_SZ, NULL, bufferW, &size )) - goto done; - - /* Strip \Registry\Machine\ prefix and retrieve Wine specific data set by the display driver */ - lstrcpyW( key_nameW, bufferW + 18 ); - size = sizeof( state_flags ); - if (RegGetValueW( HKEY_CURRENT_CONFIG, key_nameW, L"StateFlags", RRF_RT_REG_DWORD, NULL, - &state_flags, &size )) - goto done; - - if (!(state_flags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP)) - goto done; - - size = sizeof( bufferW ); - if (RegGetValueW( HKEY_CURRENT_CONFIG, key_nameW, L"GPUID", RRF_RT_REG_SZ, NULL, bufferW, &size )) - goto done; - - devinfo = SetupDiCreateDeviceInfoList( &GUID_DEVCLASS_DISPLAY, NULL ); - device_data.cbSize = sizeof( device_data ); - SetupDiOpenDeviceInfoW( devinfo, bufferW, NULL, 0, &device_data ); - if (!SetupDiGetDevicePropertyW( devinfo, &device_data, &DEVPROPKEY_GPU_LUID, &type, - (BYTE *)&luid_desc.AdapterLuid, sizeof( luid_desc.AdapterLuid ), - NULL, 0)) - goto done; - - if ((status = NtGdiDdDDIOpenAdapterFromLuid( &luid_desc ))) goto done; - - desc->hAdapter = luid_desc.hAdapter; - desc->AdapterLuid = luid_desc.AdapterLuid; - desc->VidPnSourceId = index; - -done: - SetupDiDestroyDeviceInfoList( devinfo ); - release_display_device_init_mutex( mutex ); - return status; + if (!desc) return STATUS_UNSUCCESSFUL; + return NtUserD3DKMTOpenAdapterFromGdiDisplayName( desc ); } /*********************************************************************** diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index db23795d57c..7c0ef662014 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -2730,6 +2730,34 @@ static void monitor_get_interface_name( struct monitor *monitor, WCHAR *interfac asciiz_to_unicode( interface_name, buffer ); } +/* see D3DKMTOpenAdapterFromGdiDisplayName */ +static NTSTATUS d3dkmt_open_adapter_from_gdi_display_name( D3DKMT_OPENADAPTERFROMGDIDISPLAYNAME *desc ) +{ + NTSTATUS status = STATUS_UNSUCCESSFUL; + D3DKMT_OPENADAPTERFROMLUID luid_desc; + struct source *source; + UNICODE_STRING name; + + TRACE( "desc %p, name %s\n", desc, debugstr_w( desc->DeviceName ) ); + + RtlInitUnicodeString( &name, desc->DeviceName ); + if (!name.Length) return STATUS_UNSUCCESSFUL; + if (!(source = find_source( &name ))) return STATUS_UNSUCCESSFUL; + + luid_desc.AdapterLuid = source->gpu->luid; + if ((source->state_flags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP) && + !(status = NtGdiDdDDIOpenAdapterFromLuid( &luid_desc ))) + { + desc->hAdapter = luid_desc.hAdapter; + desc->AdapterLuid = luid_desc.AdapterLuid; + desc->VidPnSourceId = source->id + 1; + } + + source_release( source ); + return status; +} + + /*********************************************************************** * NtUserEnumDisplayDevices (win32u.@) */ @@ -6433,6 +6461,9 @@ ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code ) case NtUserCallOneParam_SetThreadDpiAwarenessContext: return set_thread_dpi_awareness_context( arg ); + case NtUserCallOneParam_D3DKMTOpenAdapterFromGdiDisplayName: + return d3dkmt_open_adapter_from_gdi_display_name( (void *)arg ); + /* temporary exports */ case NtUserGetDeskPattern: return get_entry( &entry_DESKPATTERN, 256, (WCHAR *)arg ); diff --git a/include/ntuser.h b/include/ntuser.h index 1d2f32b5ea6..35936a99fd3 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -912,6 +912,7 @@ enum NtUserCallOneParam_SetProcessDefaultLayout, NtUserCallOneParam_SetKeyboardAutoRepeat, NtUserCallOneParam_SetThreadDpiAwarenessContext, + NtUserCallOneParam_D3DKMTOpenAdapterFromGdiDisplayName, /* temporary exports */ NtUserGetDeskPattern, }; @@ -1035,6 +1036,13 @@ static inline UINT NtUserSetThreadDpiAwarenessContext( UINT context ) return NtUserCallOneParam( context, NtUserCallOneParam_SetThreadDpiAwarenessContext ); } +typedef struct _D3DKMT_OPENADAPTERFROMGDIDISPLAYNAME D3DKMT_OPENADAPTERFROMGDIDISPLAYNAME; + +static inline NTSTATUS NtUserD3DKMTOpenAdapterFromGdiDisplayName( D3DKMT_OPENADAPTERFROMGDIDISPLAYNAME *desc ) +{ + return NtUserCallOneParam( (UINT_PTR)desc, NtUserCallOneParam_D3DKMTOpenAdapterFromGdiDisplayName ); +} + /* NtUserCallTwoParam codes, not compatible with Windows */ enum {
1
0
0
0
Nikolay Sivov : scrrun/dictionary: Implement putref_Item() method.
by Alexandre Julliard
05 Jun '24
05 Jun '24
Module: wine Branch: master Commit: 0da33d5493814b8cb8309c092bd7c6e1c60f1868 URL:
https://gitlab.winehq.org/wine/wine/-/commit/0da33d5493814b8cb8309c092bd7c6…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Jun 5 11:52:49 2024 +0200 scrrun/dictionary: Implement putref_Item() method. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=56781
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/scrrun/dictionary.c | 14 ++++++++++---- dlls/scrrun/tests/dictionary.c | 41 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 5 deletions(-) diff --git a/dlls/scrrun/dictionary.c b/dlls/scrrun/dictionary.c index f2f39c82f6f..af771c9245a 100644 --- a/dlls/scrrun/dictionary.c +++ b/dlls/scrrun/dictionary.c @@ -559,11 +559,17 @@ static HRESULT WINAPI dictionary_Invoke(IDictionary *iface, DISPID dispIdMember, return hr; } -static HRESULT WINAPI dictionary_putref_Item(IDictionary *iface, VARIANT *Key, VARIANT *pRetItem) +static HRESULT WINAPI dictionary_putref_Item(IDictionary *iface, VARIANT *key, VARIANT *item) { - FIXME("%p, %p, %p stub\n", iface, Key, pRetItem); + struct dictionary *dictionary = impl_from_IDictionary(iface); + struct keyitem_pair *pair; - return E_NOTIMPL; + TRACE("%p, %s, %s.\n", iface, debugstr_variant(key), debugstr_variant(item)); + + if ((pair = get_keyitem_pair(dictionary, key))) + return VariantCopyInd(&pair->item, item); + + return add_keyitem_pair(dictionary, key, item); } static HRESULT WINAPI dictionary_put_Item(IDictionary *iface, VARIANT *key, VARIANT *item) @@ -576,7 +582,7 @@ static HRESULT WINAPI dictionary_put_Item(IDictionary *iface, VARIANT *key, VARI if ((pair = get_keyitem_pair(dictionary, key))) return VariantCopyInd(&pair->item, item); - return IDictionary_Add(iface, key, item); + return add_keyitem_pair(dictionary, key, item); } static HRESULT WINAPI dictionary_get_Item(IDictionary *iface, VARIANT *key, VARIANT *item) diff --git a/dlls/scrrun/tests/dictionary.c b/dlls/scrrun/tests/dictionary.c index ccc4d181793..e1cb33c45a7 100644 --- a/dlls/scrrun/tests/dictionary.c +++ b/dlls/scrrun/tests/dictionary.c @@ -243,7 +243,6 @@ static HRESULT WINAPI test_unk_no_QI(IUnknown *iface, REFIID riid, void **obj) static ULONG WINAPI test_unk_AddRef(IUnknown *iface) { - ok(0, "unexpected\n"); return 2; } @@ -1168,6 +1167,45 @@ static void test_IEnumVARIANT(void) IDictionary_Release(dict); } +static void test_putref_Item(void) +{ + IUnknown *obj = &test_unk; + VARIANT key, item, item2; + IDictionary *dict; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, + &IID_IDictionary, (void **)&dict); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + + V_VT(&key) = VT_I2; + V_I2(&key) = 10; + V_VT(&item) = VT_UNKNOWN; + V_UNKNOWN(&item) = obj; + hr = IDictionary_putref_Item(dict, &key, &item); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + + VariantInit(&item2); + hr = IDictionary_get_Item(dict, &key, &item2); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(V_VT(&item2) == VT_UNKNOWN, "Unexpected type.\n"); + ok(V_UNKNOWN(&item2) == obj, "Unexpected value.\n"); + VariantClear(&item2); + + V_VT(&key) = VT_I2; + V_I2(&key) = 11; + V_VT(&item) = VT_UNKNOWN|VT_BYREF; + V_UNKNOWNREF(&item) = &obj; + hr = IDictionary_putref_Item(dict, &key, &item); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + hr = IDictionary_get_Item(dict, &key, &item2); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(V_VT(&item2) == VT_UNKNOWN, "Unexpected type.\n"); + ok(V_UNKNOWN(&item2) == obj, "Unexpected value.\n"); + + IDictionary_Release(dict); +} + START_TEST(dictionary) { IDispatch *disp; @@ -1193,6 +1231,7 @@ START_TEST(dictionary) test_Item(); test_Add(); test_IEnumVARIANT(); + test_putref_Item(); CoUninitialize(); }
1
0
0
0
Tim Clem : gitlab: Update configuration for the new Mac runner.
by Alexandre Julliard
05 Jun '24
05 Jun '24
Module: wine Branch: master Commit: b6fb9e5c5c180f9a8abdd04a638eff7b61edd255 URL:
https://gitlab.winehq.org/wine/wine/-/commit/b6fb9e5c5c180f9a8abdd04a638eff…
Author: Tim Clem <tclem(a)codeweavers.com> Date: Wed May 29 09:06:59 2024 -0700 gitlab: Update configuration for the new Mac runner. Two main changes: - VM configuration in build.yml for the executor. - The build-mac script is now architecture-agnostic. --- tools/gitlab/build-mac | 26 ++++++++++++++++++++++++-- tools/gitlab/build.yml | 5 ++++- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/tools/gitlab/build-mac b/tools/gitlab/build-mac index 98df7731ad1..53cb60b3afc 100755 --- a/tools/gitlab/build-mac +++ b/tools/gitlab/build-mac @@ -5,15 +5,37 @@ echo "---" set -Eeuxo pipefail +X86_BREW_HOME='/usr/local' +if [ "$(arch)" = 'arm64' ]; then + ARCH_BREW_HOME='/opt/homebrew' + ARCH_CMD='arch -x86_64' + + # On the ARM runner, use Xcode's SDK. SDKROOT is independent of + # DEVELOPER_DIR/xcode-select, and will default to the command line tools. + # That's what we want on the old Intel runner. + export SDKROOT="$(xcode-select -p)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" +else + ARCH_BREW_HOME="$X86_BREW_HOME" + ARCH_CMD= +fi + +# Pick up dependencies from homebrew. +export PATH="$X86_BREW_HOME/bin:$ARCH_BREW_HOME/bin:$PATH" +export LIBRARY_PATH="$X86_BREW_HOME/lib" + +# x86 ccache wrappers. These need to go at the front of PATH. +export PATH="$X86_BREW_HOME/opt/ccache/libexec:$PATH" + ./tools/make_requests ./tools/make_specfiles ./tools/make_makefiles autoreconf -f cd build64 -../configure -C --enable-win64 --with-mingw BISON=/usr/local/opt/bison/bin/bison -make -s -j8 +$ARCH_CMD ../configure -C --enable-win64 --with-mingw BISON="$ARCH_BREW_HOME/opt/bison/bin/bison" +$ARCH_CMD make -s -j$(sysctl -n hw.activecpu) cd .. git reset --hard + sleep 2 diff --git a/tools/gitlab/build.yml b/tools/gitlab/build.yml index 66daf518386..528d998b644 100644 --- a/tools/gitlab/build.yml +++ b/tools/gitlab/build.yml @@ -52,6 +52,10 @@ build-clang: build-mac: extends: .wine-build + image: winehq-sonoma-pristine + variables: + TART_EXECUTOR_SSH_USERNAME: "gitlab" + TART_EXECUTOR_SSH_PASSWORD: "gitlab" rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' tags: @@ -63,7 +67,6 @@ build-mac: - build32/config.log script: - mkdir -p build32 build64 - - export PATH="/usr/local/opt/ccache/libexec:$PATH" - git rebase $CI_MERGE_REQUEST_DIFF_BASE_SHA --exec ./tools/gitlab/build-mac build-winetest:
1
0
0
0
Esme Povirk : win32u: Send EVENT_OBJECT_FOCUS in more cases.
by Alexandre Julliard
05 Jun '24
05 Jun '24
Module: wine Branch: master Commit: 069a0b1e26823121e8beac3756a3c9c60422601a URL:
https://gitlab.winehq.org/wine/wine/-/commit/069a0b1e26823121e8beac3756a3c9…
Author: Esme Povirk <esme(a)codeweavers.com> Date: Mon Jun 3 20:07:59 2024 +0000 win32u: Send EVENT_OBJECT_FOCUS in more cases. --- dlls/user32/tests/msg.c | 68 +++++++++++++++++++++++++++---------------------- dlls/win32u/input.c | 3 +-- 2 files changed, 39 insertions(+), 32 deletions(-)
1
0
0
0
Piotr Caban : wineps.drv: Add partial support for changing page size.
by Alexandre Julliard
05 Jun '24
05 Jun '24
Module: wine Branch: master Commit: 71300e23857ddb8d36e7f0691d6e8c1ad925322e URL:
https://gitlab.winehq.org/wine/wine/-/commit/71300e23857ddb8d36e7f0691d6e8c…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Jun 4 21:21:45 2024 +0200 wineps.drv: Add partial support for changing page size. --- dlls/wineps.drv/printproc.c | 2 ++ dlls/wineps.drv/ps.c | 14 ++++++++++++-- dlls/wineps.drv/psdrv.h | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/dlls/wineps.drv/printproc.c b/dlls/wineps.drv/printproc.c index db2979f0fbe..84f4b9f5900 100644 --- a/dlls/wineps.drv/printproc.c +++ b/dlls/wineps.drv/printproc.c @@ -3110,6 +3110,8 @@ BOOL WINAPI PrintDocumentOnPrintProcessor(HANDLE pp, WCHAR *doc_name) if (ret) ret = PSDRV_ResetDC(data->ctx, devmode); + if (ret && devmode && (devmode->dmFields & DM_PAPERSIZE)) + ret = PSDRV_WritePageSize(data->ctx); free(devmode); if (!ret) goto cleanup; diff --git a/dlls/wineps.drv/ps.c b/dlls/wineps.drv/ps.c index 9896ea46bc7..8e52a97867a 100644 --- a/dlls/wineps.drv/ps.c +++ b/dlls/wineps.drv/ps.c @@ -397,6 +397,17 @@ static void write_cups_job_ticket( print_ctx *ctx, const struct ticket_info *inf write_spool( ctx, cups_ap_d_inputslot, sizeof(cups_ap_d_inputslot) - 1 ); } +INT PSDRV_WritePageSize( print_ctx *ctx ) +{ + PAGESIZE *page = find_pagesize( ctx->pi->ppd, &ctx->Devmode->dmPublic ); + + if (page && page->InvocationString) + PSDRV_WriteFeature( ctx, "*PageSize", page->Name, page->InvocationString ); + else + WARN("Page size not set\n"); + return 1; +} + INT PSDRV_WriteHeader( print_ctx *ctx, LPCWSTR title ) { char *buf, *escaped_title; @@ -444,8 +455,7 @@ INT PSDRV_WriteHeader( print_ctx *ctx, LPCWSTR title ) if (slot && slot->InvocationString) PSDRV_WriteFeature( ctx, "*InputSlot", slot->Name, slot->InvocationString ); - if (page && page->InvocationString) - PSDRV_WriteFeature( ctx, "*PageSize", page->Name, page->InvocationString ); + PSDRV_WritePageSize( ctx ); if (duplex && duplex->InvocationString) PSDRV_WriteFeature( ctx, "*Duplex", duplex->Name, duplex->InvocationString ); diff --git a/dlls/wineps.drv/psdrv.h b/dlls/wineps.drv/psdrv.h index d1ac2cc06cd..2c4703de942 100644 --- a/dlls/wineps.drv/psdrv.h +++ b/dlls/wineps.drv/psdrv.h @@ -466,6 +466,7 @@ extern char PSDRV_UnicodeToANSI(int u); extern INT PSDRV_WriteHeader( print_ctx *ctx, LPCWSTR title ); extern INT PSDRV_WriteFooter( print_ctx *ctx ); +extern INT PSDRV_WritePageSize( print_ctx *ctx ); extern INT PSDRV_WriteNewPage( print_ctx *ctx ); extern INT PSDRV_WriteEndPage( print_ctx *ctx ); extern BOOL PSDRV_WriteMoveTo(print_ctx *ctx, INT x, INT y);
1
0
0
0
Piotr Caban : wineps.drv: Write PageBoundingBox for every page.
by Alexandre Julliard
05 Jun '24
05 Jun '24
Module: wine Branch: master Commit: 4047fb78a8bba27c301b159db231c755130a9022 URL:
https://gitlab.winehq.org/wine/wine/-/commit/4047fb78a8bba27c301b159db231c7…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Jun 4 19:50:32 2024 +0200 wineps.drv: Write PageBoundingBox for every page. --- dlls/wineps.drv/ps.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/wineps.drv/ps.c b/dlls/wineps.drv/ps.c index b78813466a3..9896ea46bc7 100644 --- a/dlls/wineps.drv/ps.c +++ b/dlls/wineps.drv/ps.c @@ -93,8 +93,10 @@ static const char psendfeature[] = "\n%%EndFeature\n" "} stopped cleartomark\n"; -static const char psnewpage[] = /* name, number, orientation, xres, yres, xtrans, ytrans, rot */ +static const char psnewpage[] = /* name, number, llx, lly, urx, ury, orientation, + xres, yres, xtrans, ytrans, rot */ "%%%%Page: %s %d\n" +"%%%%PageBoundingBox: %ld %ld %ld %ld\n" "%%%%PageOrientation: %s\n" "%%%%BeginPageSetup\n" "/pgsave save def\n" @@ -560,6 +562,7 @@ INT PSDRV_WriteNewPage( print_ctx *ctx ) } sprintf(buf, psnewpage, name, ctx->job.PageNo, + bbox.left, bbox.top, bbox.right, bbox.bottom, ctx->Devmode->dmPublic.dmOrientation == DMORIENT_LANDSCAPE ? "Landscape" : "Portrait", GetDeviceCaps(ctx->hdc, ASPECTX), GetDeviceCaps(ctx->hdc, ASPECTY), xtrans, ytrans, rotation);
1
0
0
0
Piotr Caban : wineps.drv: Take all pages into account when computing bounding box.
by Alexandre Julliard
05 Jun '24
05 Jun '24
Module: wine Branch: master Commit: 845a231f95af3a9a72a872686255dc35f729959e URL:
https://gitlab.winehq.org/wine/wine/-/commit/845a231f95af3a9a72a872686255dc…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Jun 4 19:11:35 2024 +0200 wineps.drv: Take all pages into account when computing bounding box. --- dlls/wineps.drv/ps.c | 89 +++++++++++++++++++++++++++---------------------- dlls/wineps.drv/psdrv.h | 1 + 2 files changed, 51 insertions(+), 39 deletions(-) diff --git a/dlls/wineps.drv/ps.c b/dlls/wineps.drv/ps.c index e1be2261e15..b78813466a3 100644 --- a/dlls/wineps.drv/ps.c +++ b/dlls/wineps.drv/ps.c @@ -51,10 +51,10 @@ static const char cups_collate_false[] = "%cupsJobTicket: collate=false\n"; static const char cups_collate_true[] = "%cupsJobTicket: collate=true\n"; static const char cups_ap_d_inputslot[] = "%cupsJobTicket: AP_D_InputSlot=\n"; /* intentionally empty value */ -static const char psheader[] = /* title llx lly urx ury */ +static const char psheader[] = /* title */ "%%%%Creator: Wine PostScript Driver\n" "%%%%Title: %s\n" -"%%%%BoundingBox: %d %d %d %d\n" +"%%%%BoundingBox: (atend)\n" "%%%%Pages: (atend)\n" "%%%%EndComments\n"; @@ -108,8 +108,9 @@ static const char psendpage[] = "pgsave restore\n" "showpage\n"; -static const char psfooter[] = /* pages */ +static const char psfooter[] = /* llx, lly, urx, ury, pages */ "%%%%Trailer\n" +"%%%%BoundingBox: %ld %ld %ld %ld\n" "%%%%Pages: %d\n" "%%%%EOF\n"; @@ -400,7 +401,6 @@ INT PSDRV_WriteHeader( print_ctx *ctx, LPCWSTR title ) INPUTSLOT *slot = find_slot( ctx->pi->ppd, &ctx->Devmode->dmPublic ); PAGESIZE *page = find_pagesize( ctx->pi->ppd, &ctx->Devmode->dmPublic ); DUPLEX *duplex = find_duplex( ctx->pi->ppd, &ctx->Devmode->dmPublic ); - int llx, lly, urx, ury; int ret, len; struct ticket_info ticket_info = { page, duplex }; @@ -419,46 +419,14 @@ INT PSDRV_WriteHeader( print_ctx *ctx, LPCWSTR title ) escaped_title = escape_title(title); buf = HeapAlloc( GetProcessHeap(), 0, sizeof(psheader) + - strlen(escaped_title) + 30 ); + strlen(escaped_title) ); if(!buf) { WARN("HeapAlloc failed\n"); HeapFree(GetProcessHeap(), 0, escaped_title); return 0; } - /* BBox co-ords are in default user co-ord system so urx < ury even in - landscape mode */ - if ((ctx->Devmode->dmPublic.dmFields & DM_PAPERSIZE) && page) - { - if (page->ImageableArea) - { - llx = page->ImageableArea->llx; - lly = page->ImageableArea->lly; - urx = page->ImageableArea->urx; - ury = page->ImageableArea->ury; - } - else - { - llx = lly = 0; - urx = page->PaperDimension->x; - ury = page->PaperDimension->y; - } - } - else if ((ctx->Devmode->dmPublic.dmFields & DM_PAPERLENGTH) && - (ctx->Devmode->dmPublic.dmFields & DM_PAPERWIDTH)) - { - /* Devmode sizes in 1/10 mm */ - llx = lly = 0; - urx = ctx->Devmode->dmPublic.dmPaperWidth * 72.0 / 254.0; - ury = ctx->Devmode->dmPublic.dmPaperLength * 72.0 / 254.0; - } - else - { - llx = lly = urx = ury = 0; - } - /* FIXME should do something better with BBox */ - - sprintf(buf, psheader, escaped_title, llx, lly, urx, ury); + sprintf(buf, psheader, escaped_title); HeapFree(GetProcessHeap(), 0, escaped_title); @@ -498,7 +466,8 @@ INT PSDRV_WriteFooter( print_ctx *ctx ) return 0; } - sprintf(buf, psfooter, ctx->job.PageNo); + sprintf(buf, psfooter, ctx->bbox.left, ctx->bbox.top, + ctx->bbox.right, ctx->bbox.bottom, ctx->job.PageNo); if( write_spool( ctx, buf, strlen(buf) ) != strlen(buf) ) { WARN("WriteSpool error\n"); @@ -520,15 +489,57 @@ INT PSDRV_WriteEndPage( print_ctx *ctx ) } +static void get_bounding_box( print_ctx *ctx, RECT *bbox) +{ + PAGESIZE *page; + + /* BBox co-ords are in default user co-ord system so urx < ury even in + landscape mode */ + if ((ctx->Devmode->dmPublic.dmFields & DM_PAPERSIZE) && + (page = find_pagesize( ctx->pi->ppd, &ctx->Devmode->dmPublic ))) + { + if (page->ImageableArea) + { + bbox->left = page->ImageableArea->llx; + bbox->top = page->ImageableArea->lly; + bbox->right = page->ImageableArea->urx; + bbox->bottom = page->ImageableArea->ury; + } + else + { + bbox->left = bbox->top = 0; + bbox->right = page->PaperDimension->x; + bbox->bottom = page->PaperDimension->y; + } + } + else if ((ctx->Devmode->dmPublic.dmFields & DM_PAPERLENGTH) && + (ctx->Devmode->dmPublic.dmFields & DM_PAPERWIDTH)) + { + /* Devmode sizes in 1/10 mm */ + bbox->left = bbox->top = 0; + bbox->right = ctx->Devmode->dmPublic.dmPaperWidth * 72.0 / 254.0; + bbox->bottom = ctx->Devmode->dmPublic.dmPaperLength * 72.0 / 254.0; + } + else + { + bbox->left = bbox->top = bbox->right = bbox->bottom = 0; + } + /* FIXME should do something better with BBox */ +} + INT PSDRV_WriteNewPage( print_ctx *ctx ) { signed int xtrans, ytrans, rotation; char buf[256], name[16]; + RECT bbox; sprintf(name, "%d", ctx->job.PageNo); + get_bounding_box( ctx, &bbox ); + UnionRect( &ctx->bbox, &bbox, &ctx->bbox ); + if(ctx->Devmode->dmPublic.dmOrientation == DMORIENT_LANDSCAPE) { if(ctx->pi->ppd->LandscapeOrientation == -90) { xtrans = GetDeviceCaps(ctx->hdc, PHYSICALHEIGHT) - diff --git a/dlls/wineps.drv/psdrv.h b/dlls/wineps.drv/psdrv.h index 31adc36adfc..d1ac2cc06cd 100644 --- a/dlls/wineps.drv/psdrv.h +++ b/dlls/wineps.drv/psdrv.h @@ -368,6 +368,7 @@ typedef struct PSDRV_DEVMODE *Devmode; PRINTERINFO *pi; int pathdepth; + RECT bbox; } print_ctx; extern print_ctx *create_print_ctx( HDC hdc, const WCHAR *device,
1
0
0
0
Piotr Caban : wineps.drv: Write page orientation hint for every page.
by Alexandre Julliard
05 Jun '24
05 Jun '24
Module: wine Branch: master Commit: 3b3ad61cdd691b515b32540f69de6a1009cbad74 URL:
https://gitlab.winehq.org/wine/wine/-/commit/3b3ad61cdd691b515b32540f69de6a…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Jun 4 15:16:07 2024 +0200 wineps.drv: Write page orientation hint for every page. --- dlls/wineps.drv/ps.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/dlls/wineps.drv/ps.c b/dlls/wineps.drv/ps.c index 149bfc81c36..e1be2261e15 100644 --- a/dlls/wineps.drv/ps.c +++ b/dlls/wineps.drv/ps.c @@ -51,12 +51,11 @@ static const char cups_collate_false[] = "%cupsJobTicket: collate=false\n"; static const char cups_collate_true[] = "%cupsJobTicket: collate=true\n"; static const char cups_ap_d_inputslot[] = "%cupsJobTicket: AP_D_InputSlot=\n"; /* intentionally empty value */ -static const char psheader[] = /* title llx lly urx ury orientation */ +static const char psheader[] = /* title llx lly urx ury */ "%%%%Creator: Wine PostScript Driver\n" "%%%%Title: %s\n" "%%%%BoundingBox: %d %d %d %d\n" "%%%%Pages: (atend)\n" -"%%%%Orientation: %s\n" "%%%%EndComments\n"; static const char psbeginprolog[] = @@ -94,8 +93,9 @@ static const char psendfeature[] = "\n%%EndFeature\n" "} stopped cleartomark\n"; -static const char psnewpage[] = /* name, number, xres, yres, xtrans, ytrans, rot */ +static const char psnewpage[] = /* name, number, orientation, xres, yres, xtrans, ytrans, rot */ "%%%%Page: %s %d\n" +"%%%%PageOrientation: %s\n" "%%%%BeginPageSetup\n" "/pgsave save def\n" "72 %d div 72 %d div scale\n" @@ -402,7 +402,6 @@ INT PSDRV_WriteHeader( print_ctx *ctx, LPCWSTR title ) DUPLEX *duplex = find_duplex( ctx->pi->ppd, &ctx->Devmode->dmPublic ); int llx, lly, urx, ury; int ret, len; - const char * dmOrientation; struct ticket_info ticket_info = { page, duplex }; @@ -459,8 +458,7 @@ INT PSDRV_WriteHeader( print_ctx *ctx, LPCWSTR title ) } /* FIXME should do something better with BBox */ - dmOrientation = (ctx->Devmode->dmPublic.dmOrientation == DMORIENT_LANDSCAPE ? "Landscape" : "Portrait"); - sprintf(buf, psheader, escaped_title, llx, lly, urx, ury, dmOrientation); + sprintf(buf, psheader, escaped_title, llx, lly, urx, ury); HeapFree(GetProcessHeap(), 0, escaped_title); @@ -551,8 +549,9 @@ INT PSDRV_WriteNewPage( print_ctx *ctx ) } sprintf(buf, psnewpage, name, ctx->job.PageNo, - GetDeviceCaps(ctx->hdc, ASPECTX), GetDeviceCaps(ctx->hdc, ASPECTY), - xtrans, ytrans, rotation); + ctx->Devmode->dmPublic.dmOrientation == DMORIENT_LANDSCAPE ? "Landscape" : "Portrait", + GetDeviceCaps(ctx->hdc, ASPECTX), GetDeviceCaps(ctx->hdc, ASPECTY), + xtrans, ytrans, rotation); if( write_spool( ctx, buf, strlen(buf) ) != strlen(buf) ) { WARN("WriteSpool error\n");
1
0
0
0
Piotr Caban : wineps.drv: Don't use dynamic buffer when writing new page info.
by Alexandre Julliard
05 Jun '24
05 Jun '24
Module: wine Branch: master Commit: de9393c8b73c91cd0e0871e8e713edf95c8bc73b URL:
https://gitlab.winehq.org/wine/wine/-/commit/de9393c8b73c91cd0e0871e8e713ed…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Jun 4 15:11:54 2024 +0200 wineps.drv: Don't use dynamic buffer when writing new page info. --- dlls/wineps.drv/ps.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/dlls/wineps.drv/ps.c b/dlls/wineps.drv/ps.c index 59e245b9b6c..149bfc81c36 100644 --- a/dlls/wineps.drv/ps.c +++ b/dlls/wineps.drv/ps.c @@ -526,19 +526,11 @@ INT PSDRV_WriteEndPage( print_ctx *ctx ) INT PSDRV_WriteNewPage( print_ctx *ctx ) { - char *buf; - char name[100]; signed int xtrans, ytrans, rotation; - int ret = 1; + char buf[256], name[16]; sprintf(name, "%d", ctx->job.PageNo); - buf = HeapAlloc( GetProcessHeap(), 0, sizeof(psnewpage) + 200 ); - if(!buf) { - WARN("HeapAlloc failed\n"); - return 0; - } - if(ctx->Devmode->dmPublic.dmOrientation == DMORIENT_LANDSCAPE) { if(ctx->pi->ppd->LandscapeOrientation == -90) { xtrans = GetDeviceCaps(ctx->hdc, PHYSICALHEIGHT) - @@ -564,10 +556,9 @@ INT PSDRV_WriteNewPage( print_ctx *ctx ) if( write_spool( ctx, buf, strlen(buf) ) != strlen(buf) ) { WARN("WriteSpool error\n"); - ret = 0; + return 0; } - HeapFree( GetProcessHeap(), 0, buf ); - return ret; + return 1; }
1
0
0
0
← Newer
1
...
52
53
54
55
56
57
58
...
62
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
Results per page:
10
25
50
100
200