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 2021
----- 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
811 discussions
Start a n
N
ew thread
Nikolay Sivov : msctf/range: Remove unused argument from range creation helper.
by Alexandre Julliard
02 Jun '21
02 Jun '21
Module: wine Branch: master Commit: c41ccf892cff593d56b18eedabb551b6e5bdd862 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c41ccf892cff593d56b18eed…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Jun 2 17:08:49 2021 +0300 msctf/range: Remove unused argument from range creation helper. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msctf/context.c | 16 +++++----------- dlls/msctf/msctf_internal.h | 2 +- dlls/msctf/range.c | 8 ++------ 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/dlls/msctf/context.c b/dlls/msctf/context.c index 63f2bf5455d..9eb61efa411 100644 --- a/dlls/msctf/context.c +++ b/dlls/msctf/context.c @@ -267,7 +267,6 @@ static HRESULT WINAPI Context_GetSelection (ITfContext *iface, TF_SELECTION *pSelection, ULONG *pcFetched) { Context *This = impl_from_ITfContext(iface); - EditCookie *cookie; ULONG count, i; ULONG totalFetched = 0; HRESULT hr = S_OK; @@ -289,8 +288,6 @@ static HRESULT WINAPI Context_GetSelection (ITfContext *iface, return E_NOTIMPL; } - cookie = get_Cookie_data(ec); - if (ulIndex == TF_DEFAULT_SELECTION) count = 1; else @@ -310,7 +307,7 @@ static HRESULT WINAPI Context_GetSelection (ITfContext *iface, { pSelection[totalFetched].style.ase = acps.style.ase; pSelection[totalFetched].style.fInterimChar = acps.style.fInterimChar; - Range_Constructor(iface, This->pITextStoreACP, cookie->lockType, acps.acpStart, acps.acpEnd, &pSelection[totalFetched].range); + Range_Constructor(iface, acps.acpStart, acps.acpEnd, &pSelection[totalFetched].range); totalFetched ++; } else @@ -364,7 +361,7 @@ static HRESULT WINAPI Context_GetStart (ITfContext *iface, TfEditCookie ec, ITfRange **ppStart) { Context *This = impl_from_ITfContext(iface); - EditCookie *cookie; + TRACE("(%p) %i %p\n",This,ec,ppStart); if (!ppStart) @@ -378,15 +375,13 @@ static HRESULT WINAPI Context_GetStart (ITfContext *iface, if (get_Cookie_magic(ec)!=COOKIE_MAGIC_EDITCOOKIE) return TF_E_NOLOCK; - cookie = get_Cookie_data(ec); - return Range_Constructor(iface, This->pITextStoreACP, cookie->lockType, 0, 0, ppStart); + return Range_Constructor(iface, 0, 0, ppStart); } static HRESULT WINAPI Context_GetEnd (ITfContext *iface, TfEditCookie ec, ITfRange **ppEnd) { Context *This = impl_from_ITfContext(iface); - EditCookie *cookie; LONG end; TRACE("(%p) %i %p\n",This,ec,ppEnd); @@ -407,10 +402,9 @@ static HRESULT WINAPI Context_GetEnd (ITfContext *iface, return E_NOTIMPL; } - cookie = get_Cookie_data(ec); ITextStoreACP_GetEndACP(This->pITextStoreACP,&end); - return Range_Constructor(iface, This->pITextStoreACP, cookie->lockType, end, end, ppEnd); + return Range_Constructor(iface, end, end, ppEnd); } static HRESULT WINAPI Context_GetActiveView (ITfContext *iface, @@ -720,7 +714,7 @@ static HRESULT WINAPI InsertAtSelection_InsertTextAtSelection( hr = ITextStoreACP_InsertTextAtSelection(This->pITextStoreACP, dwFlags, pchText, cch, &acpStart, &acpEnd, &change); if (SUCCEEDED(hr)) - Range_Constructor(&This->ITfContext_iface, This->pITextStoreACP, cookie->lockType, change.acpStart, change.acpNewEnd, ppRange); + Range_Constructor(&This->ITfContext_iface, change.acpStart, change.acpNewEnd, ppRange); return hr; } diff --git a/dlls/msctf/msctf_internal.h b/dlls/msctf/msctf_internal.h index 9d60e18e6f3..45a39806c22 100644 --- a/dlls/msctf/msctf_internal.h +++ b/dlls/msctf/msctf_internal.h @@ -45,7 +45,7 @@ extern HRESULT DocumentMgr_Constructor(ITfThreadMgrEventSink*, ITfDocumentMgr ** extern HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfDocumentMgr *mgr, ITfContext **ppOut, TfEditCookie *pecTextStore) DECLSPEC_HIDDEN; extern HRESULT InputProcessorProfiles_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) DECLSPEC_HIDDEN; extern HRESULT CategoryMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) DECLSPEC_HIDDEN; -extern HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, DWORD lockType, DWORD anchorStart, DWORD anchorEnd, ITfRange **ppOut) DECLSPEC_HIDDEN; +extern HRESULT Range_Constructor(ITfContext *context, DWORD anchorStart, DWORD anchorEnd, ITfRange **ppOut) DECLSPEC_HIDDEN; extern HRESULT CompartmentMgr_Constructor(IUnknown *pUnkOuter, REFIID riid, IUnknown **ppOut) DECLSPEC_HIDDEN; extern HRESULT CompartmentMgr_Destructor(ITfCompartmentMgr *This) DECLSPEC_HIDDEN; extern HRESULT LangBarMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) DECLSPEC_HIDDEN; diff --git a/dlls/msctf/range.c b/dlls/msctf/range.c index 85922791bad..ac2540b2b11 100644 --- a/dlls/msctf/range.c +++ b/dlls/msctf/range.c @@ -41,10 +41,8 @@ typedef struct tagRange { /* const ITfRangeACPVtb *RangeACPVtbl; */ LONG refCount; - ITextStoreACP *pITextStoreACP; ITfContext *context; - DWORD lockType; TfGravity gravityStart, gravityEnd; DWORD anchorStart, anchorEnd; @@ -328,7 +326,7 @@ static const ITfRangeVtbl Range_RangeVtbl = Range_GetContext }; -HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, DWORD lockType, DWORD anchorStart, DWORD anchorEnd, ITfRange **ppOut) +HRESULT Range_Constructor(ITfContext *context, DWORD anchorStart, DWORD anchorEnd, ITfRange **ppOut) { Range *This; @@ -336,14 +334,12 @@ HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, DWORD l if (This == NULL) return E_OUTOFMEMORY; - TRACE("(%p) %p %p\n",This, context, textstore); + TRACE("(%p) %p\n", This, context); This->ITfRange_iface.lpVtbl = &Range_RangeVtbl; This->refCount = 1; This->context = context; ITfContext_AddRef(This->context); - This->pITextStoreACP = textstore; - This->lockType = lockType; This->anchorStart = anchorStart; This->anchorEnd = anchorEnd;
1
0
0
0
Nikolay Sivov : msctf: Maintain context reference in ranges.
by Alexandre Julliard
02 Jun '21
02 Jun '21
Module: wine Branch: master Commit: fa4c386e06fcaceb7538e2f438f32085a37b9297 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fa4c386e06fcaceb7538e2f4…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Jun 2 17:08:48 2021 +0300 msctf: Maintain context reference in ranges. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msctf/range.c | 19 +++++++++++++------ dlls/msctf/tests/inputprocessor.c | 26 +++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/dlls/msctf/range.c b/dlls/msctf/range.c index c4eee2501fb..85922791bad 100644 --- a/dlls/msctf/range.c +++ b/dlls/msctf/range.c @@ -42,7 +42,7 @@ typedef struct tagRange { LONG refCount; ITextStoreACP *pITextStoreACP; - ITfContext *pITfContext; + ITfContext *context; DWORD lockType; TfGravity gravityStart, gravityEnd; @@ -58,6 +58,7 @@ static inline Range *impl_from_ITfRange(ITfRange *iface) static void Range_Destructor(Range *This) { TRACE("destroying %p\n", This); + ITfContext_Release(This->context); HeapFree(GetProcessHeap(),0,This); } @@ -282,13 +283,18 @@ static HRESULT WINAPI Range_Clone(ITfRange *iface, ITfRange **ppClone) return E_NOTIMPL; } -static HRESULT WINAPI Range_GetContext(ITfRange *iface, ITfContext **ppContext) +static HRESULT WINAPI Range_GetContext(ITfRange *iface, ITfContext **context) { Range *This = impl_from_ITfRange(iface); - TRACE("(%p)\n",This); - if (!ppContext) + + TRACE("(%p, %p)\n", This, context); + + if (!context) return E_INVALIDARG; - *ppContext = This->pITfContext; + + *context = This->context; + ITfContext_AddRef(*context); + return S_OK; } @@ -334,7 +340,8 @@ HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, DWORD l This->ITfRange_iface.lpVtbl = &Range_RangeVtbl; This->refCount = 1; - This->pITfContext = context; + This->context = context; + ITfContext_AddRef(This->context); This->pITextStoreACP = textstore; This->lockType = lockType; This->anchorStart = anchorStart; diff --git a/dlls/msctf/tests/inputprocessor.c b/dlls/msctf/tests/inputprocessor.c index 55a6ab6c34c..fd03059e545 100644 --- a/dlls/msctf/tests/inputprocessor.c +++ b/dlls/msctf/tests/inputprocessor.c @@ -228,6 +228,8 @@ static HRESULT WINAPI TextStoreACP_AdviseSink(ITextStoreACP *iface, REFIID riid, IUnknown *punk, DWORD dwMask) { ITextStoreACPServices *services; + ITfRangeACP *range; + ITfContext *context; HRESULT hr; if (winetest_debug > 1) trace("ITextStoreACP::AdviseSink(iid %s, mask %#x)\n", @@ -243,6 +245,18 @@ static HRESULT WINAPI TextStoreACP_AdviseSink(ITextStoreACP *iface, hr = ITextStoreACPSink_QueryInterface(ACPSink, &IID_ITextStoreACPServices, (void**)&services); ok(hr == S_OK, "got 0x%08x\n", hr); + + range = NULL; + hr = ITextStoreACPServices_CreateRange(services, 0, 1, &range); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + if (range) + { + hr = ITfRangeACP_GetContext(range, &context); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ITfContext_Release(context); + ITfRangeACP_Release(range); + } + ITextStoreACPServices_Release(services); return S_OK; @@ -2084,10 +2098,11 @@ static void test_InsertAtSelection(TfEditCookie ec, ITfContext *cxt) static HRESULT WINAPI EditSession_DoEditSession(ITfEditSession *iface, TfEditCookie ec) { - ITfContext *cxt; + ITfContext *cxt, *context2; ITfDocumentMgr *dm; ITfRange *range; TF_SELECTION selection; + IUnknown *unk; ULONG fetched; HRESULT hr; @@ -2109,6 +2124,15 @@ TfEditCookie ec) ok(SUCCEEDED(hr),"Unexpected return code %x\n",hr); ok(range != NULL,"Range set to NULL\n"); + hr = ITfRange_GetContext(range, &context2); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(context2 == cxt, "Unexpected context pointer.\n"); + ITfContext_Release(context2); + + hr = ITfRange_QueryInterface(range, &IID_ITfRangeACP, (void **)&unk); +todo_wine + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ITfRange_Release(range); hr = ITfContext_GetEnd(cxt,ec,NULL);
1
0
0
0
Nikolay Sivov : mfmediaengine: Enable source type enumeration.
by Alexandre Julliard
02 Jun '21
02 Jun '21
Module: wine Branch: master Commit: 86cbfafe9280e3f264d74d7d91b0929a1f82a1a0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=86cbfafe9280e3f264d74d7d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Jun 2 13:34:44 2021 +0300 mfmediaengine: Enable source type enumeration. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfmediaengine/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/mfmediaengine/main.c b/dlls/mfmediaengine/main.c index 510b1c5885f..e4263febe5e 100644 --- a/dlls/mfmediaengine/main.c +++ b/dlls/mfmediaengine/main.c @@ -1161,6 +1161,8 @@ static HRESULT media_engine_create_topology(struct media_engine *engine, IMFMedi IMFTopologyNode_Release(video_src); } + IMFTopology_SetUINT32(topology, &MF_TOPOLOGY_ENUMERATE_SOURCE_TYPES, TRUE); + if (SUCCEEDED(hr)) hr = IMFMediaSession_SetTopology(engine->session, MFSESSION_SETTOPOLOGY_IMMEDIATE, topology); }
1
0
0
0
Alexandre Julliard : ntdll: Get rid of signal_init_syscalls().
by Alexandre Julliard
02 Jun '21
02 Jun '21
Module: wine Branch: master Commit: e5982993ae7e0c065ef796ec43c32256a192bb57 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e5982993ae7e0c065ef796ec…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jun 2 12:54:34 2021 +0200 ntdll: Get rid of signal_init_syscalls(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/loader.c | 4 +--- dlls/ntdll/unix/signal_arm.c | 9 --------- dlls/ntdll/unix/signal_arm64.c | 9 --------- dlls/ntdll/unix/signal_i386.c | 9 --------- dlls/ntdll/unix/signal_x86_64.c | 22 ++++++---------------- dlls/ntdll/unix/unix_private.h | 1 - 6 files changed, 7 insertions(+), 47 deletions(-) diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index fb863bf17ad..1830c4fb392 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -111,7 +111,6 @@ void (WINAPI *pLdrInitializeThunk)(CONTEXT*,void**,ULONG_PTR,ULONG_PTR) = NU void (WINAPI *pRtlUserThreadStart)( PRTL_THREAD_START_ROUTINE entry, void *arg ) = NULL; static NTSTATUS (CDECL *p__wine_set_unix_funcs)( int version, const struct unix_funcs *funcs ); -static void *syscall_dispatcher; #ifdef __GNUC__ static void fatal_error( const char *err, ... ) __attribute__((noreturn, format(printf,1,2))); @@ -843,7 +842,7 @@ static void load_ntdll_functions( HMODULE module ) if ((ptr = (void *)find_named_export( module, ntdll_exports, #name ))) *ptr = val; \ else ERR( "%s not found\n", #name ) - SET_PTR( __wine_syscall_dispatcher, syscall_dispatcher ); + SET_PTR( __wine_syscall_dispatcher, __wine_syscall_dispatcher ); #ifdef __i386__ SET_PTR( __wine_ldt_copy, &__wine_ldt_copy ); #endif @@ -1870,7 +1869,6 @@ static void start_main_thread(void) startup_info_size = server_init_process(); virtual_map_user_shared_data(); init_cpu_info(); - syscall_dispatcher = signal_init_syscalls(); init_files(); load_libwine(); init_startup_info(); diff --git a/dlls/ntdll/unix/signal_arm.c b/dlls/ntdll/unix/signal_arm.c index ccd01e16f16..3397e876722 100644 --- a/dlls/ntdll/unix/signal_arm.c +++ b/dlls/ntdll/unix/signal_arm.c @@ -849,15 +849,6 @@ void signal_init_process(void) } -/********************************************************************** - * signal_init_syscalls - */ -void *signal_init_syscalls(void) -{ - return __wine_syscall_dispatcher; -} - - /*********************************************************************** * init_thread_context */ diff --git a/dlls/ntdll/unix/signal_arm64.c b/dlls/ntdll/unix/signal_arm64.c index 248097ce80a..5552704987f 100644 --- a/dlls/ntdll/unix/signal_arm64.c +++ b/dlls/ntdll/unix/signal_arm64.c @@ -1033,15 +1033,6 @@ void signal_init_process(void) } -/********************************************************************** - * signal_init_syscalls - */ -void *signal_init_syscalls(void) -{ - return __wine_syscall_dispatcher; -} - - /*********************************************************************** * init_thread_context */ diff --git a/dlls/ntdll/unix/signal_i386.c b/dlls/ntdll/unix/signal_i386.c index dd977a6b343..c3f8c01d350 100644 --- a/dlls/ntdll/unix/signal_i386.c +++ b/dlls/ntdll/unix/signal_i386.c @@ -2411,15 +2411,6 @@ void signal_init_process(void) } -/********************************************************************** - * signal_init_syscalls - */ -void *signal_init_syscalls(void) -{ - return NtCurrentTeb()->WOW32Reserved = __wine_syscall_dispatcher; -} - - /*********************************************************************** * init_thread_context */ diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c index 0f74e55ce04..59c030ae6a4 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c @@ -2656,6 +2656,12 @@ void signal_init_thread( TEB *teb ) void signal_init_process(void) { struct sigaction sig_act; + void *ptr; + + /* sneak in a syscall dispatcher pointer at a fixed address (7ffe1000) */ + ptr = (char *)user_shared_data + page_size; + anon_mmap_fixed( ptr, page_size, PROT_READ | PROT_WRITE, 0 ); + *(void **)ptr = __wine_syscall_dispatcher; if (cpu_info.ProcessorFeatureBits & CPU_FEATURE_XSAVE) __wine_syscall_flags |= SYSCALL_HAVE_XSAVE; if (xstate_compaction_enabled) __wine_syscall_flags |= SYSCALL_HAVE_XSAVEC; @@ -2687,22 +2693,6 @@ void signal_init_process(void) } -/********************************************************************** - * signal_init_syscalls - */ -void *signal_init_syscalls(void) -{ - void *ptr; - - /* sneak in a syscall dispatcher pointer at a fixed address (7ffe1000) */ - ptr = (char *)user_shared_data + page_size; - anon_mmap_fixed( ptr, page_size, PROT_READ | PROT_WRITE, 0 ); - *(void **)ptr = __wine_syscall_dispatcher; - - return __wine_syscall_dispatcher; -} - - /*********************************************************************** * init_thread_context */ diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h index 786bb035d0a..4ddcbbee971 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h @@ -243,7 +243,6 @@ extern NTSTATUS signal_alloc_thread( TEB *teb ) DECLSPEC_HIDDEN; extern void signal_free_thread( TEB *teb ) DECLSPEC_HIDDEN; extern void signal_init_thread( TEB *teb ) DECLSPEC_HIDDEN; extern void signal_init_process(void) DECLSPEC_HIDDEN; -extern void *signal_init_syscalls(void) DECLSPEC_HIDDEN; extern void DECLSPEC_NORETURN signal_start_thread( PRTL_THREAD_START_ROUTINE entry, void *arg, BOOL suspend, void *thunk, TEB *teb ) DECLSPEC_HIDDEN; extern void DECLSPEC_NORETURN signal_exit_thread( int status, void (*func)(int) ) DECLSPEC_HIDDEN;
1
0
0
0
Alexandre Julliard : ntdll: Use a single syscall dispatcher controlled by global flags on i386.
by Alexandre Julliard
02 Jun '21
02 Jun '21
Module: wine Branch: master Commit: 42e42e908503ea3262d915ccb3aaf3ecc0b23f91 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=42e42e908503ea3262d915cc…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jun 2 12:52:19 2021 +0200 ntdll: Use a single syscall dispatcher controlled by global flags on i386. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/signal_i386.c | 26 ++++----- tools/winebuild/import.c | 128 ++++++++++++++++++------------------------ 2 files changed, 66 insertions(+), 88 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=42e42e908503ea3262d9…
1
0
0
0
Alexandre Julliard : ntdll: Use a single syscall dispatcher controlled by global flags on x86-64.
by Alexandre Julliard
02 Jun '21
02 Jun '21
Module: wine Branch: master Commit: 3d9cb5e4f8119e00ac26e4146905016bfd017d90 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3d9cb5e4f8119e00ac26e414…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jun 2 12:02:41 2021 +0200 ntdll: Use a single syscall dispatcher controlled by global flags on x86-64. Based on a patch by Jacek Caban. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/signal_x86_64.c | 23 +++++----- dlls/ntdll/unix/unix_private.h | 1 + tools/winebuild/import.c | 96 +++++++++++++++++++---------------------- 3 files changed, 56 insertions(+), 64 deletions(-) diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c index 75a49a753f2..0f74e55ce04 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c @@ -251,6 +251,10 @@ C_ASSERT((offsetof(struct stack_layout, xstate) == sizeof(struct stack_layout))) C_ASSERT( sizeof(XSTATE) == 0x140 ); C_ASSERT( sizeof(struct stack_layout) == 0x590 ); /* Should match the size in call_user_exception_dispatcher(). */ +/* flags to control the behavior of the syscall dispatcher */ +#define SYSCALL_HAVE_XSAVE 1 +#define SYSCALL_HAVE_XSAVEC 2 + /* stack layout when calling an user apc function. * FIXME: match Windows ABI. */ struct apc_stack_layout @@ -2653,6 +2657,9 @@ void signal_init_process(void) { struct sigaction sig_act; + if (cpu_info.ProcessorFeatureBits & CPU_FEATURE_XSAVE) __wine_syscall_flags |= SYSCALL_HAVE_XSAVE; + if (xstate_compaction_enabled) __wine_syscall_flags |= SYSCALL_HAVE_XSAVEC; + sig_act.sa_mask = server_block_set; sig_act.sa_flags = SA_SIGINFO | SA_RESTART | SA_ONSTACK; @@ -2685,24 +2692,14 @@ void signal_init_process(void) */ void *signal_init_syscalls(void) { - void *ptr, *syscall_dispatcher; - - extern void __wine_syscall_dispatcher_xsave(void) DECLSPEC_HIDDEN; - extern void __wine_syscall_dispatcher_xsavec(void) DECLSPEC_HIDDEN; - - if (xstate_compaction_enabled) - syscall_dispatcher = __wine_syscall_dispatcher_xsavec; - else if (cpu_info.ProcessorFeatureBits & CPU_FEATURE_XSAVE) - syscall_dispatcher = __wine_syscall_dispatcher_xsave; - else - syscall_dispatcher = __wine_syscall_dispatcher; + void *ptr; /* sneak in a syscall dispatcher pointer at a fixed address (7ffe1000) */ ptr = (char *)user_shared_data + page_size; anon_mmap_fixed( ptr, page_size, PROT_READ | PROT_WRITE, 0 ); - *(void **)ptr = syscall_dispatcher; + *(void **)ptr = __wine_syscall_dispatcher; - return syscall_dispatcher; + return __wine_syscall_dispatcher; } diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h index cf3b8280200..786bb035d0a 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h @@ -248,6 +248,7 @@ extern void DECLSPEC_NORETURN signal_start_thread( PRTL_THREAD_START_ROUTINE ent BOOL suspend, void *thunk, TEB *teb ) DECLSPEC_HIDDEN; extern void DECLSPEC_NORETURN signal_exit_thread( int status, void (*func)(int) ) DECLSPEC_HIDDEN; extern void __wine_syscall_dispatcher(void) DECLSPEC_HIDDEN; +extern unsigned int __wine_syscall_flags DECLSPEC_HIDDEN; extern void signal_restore_full_cpu_context(void) DECLSPEC_HIDDEN; extern NTSTATUS get_thread_wow64_context( HANDLE handle, void *ctx, ULONG size ) DECLSPEC_HIDDEN; extern NTSTATUS set_thread_wow64_context( HANDLE handle, const void *ctx, ULONG size ) DECLSPEC_HIDDEN; diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index 7fdfe8d6f94..c89d00f65f3 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -1621,45 +1621,43 @@ static void output_syscall_dispatcher( const char *variant ) output( "\tmovw %%ss,-0x8(%%rbp)\n" ); output( "\tmovw %%gs,-0x6(%%rbp)\n" ); output( "\tmovq %%rsp,%%r12\n" ); - output( "\tmovq %%rax,%%r11\n" ); - if (!*variant) - { - output( "\tfxsave64 (%%r12)\n" ); - } - else - { - output( "\tmovl $7,%%eax\n" ); - output( "\tmovq %%rdx,%%rsi\n" ); - output( "\txorq %%rdx,%%rdx\n" ); - output( "\tmovq %%rdx,0x200(%%r12)\n" ); - output( "\tmovq %%rdx,0x208(%%r12)\n" ); - output( "\tmovq %%rdx,0x210(%%r12)\n" ); - if (!strcmp( variant, "_xsavec" )) - { - output( "\tmovq %%rdx,0x218(%%r12)\n" ); - output( "\tmovq %%rdx,0x220(%%r12)\n" ); - output( "\tmovq %%rdx,0x228(%%r12)\n" ); - output( "\tmovq %%rdx,0x230(%%r12)\n" ); - output( "\tmovq %%rdx,0x238(%%r12)\n" ); - output( "\txsavec64 (%%r12)\n" ); - } - else - output( "\txsave64 (%%r12)\n" ); - output( "\tmovq %%rsi,%%rdx\n" ); - } - output( "\tmovq %%gs:0x30,%%rcx\n" ); + output( "\tmovq %%rax,%%r13\n" ); + output( "\tmovl %s(%%rip),%%r14d\n", asm_name("__wine_syscall_flags") ); + output( "\ttestl $3,%%r14d\n" ); /* SYSCALL_HAVE_XSAVE | SYSCALL_HAVE_XSAVEC */ + output( "\tjz 2f\n" ); + output( "\tmovl $7,%%eax\n" ); + output( "\tmovq %%rdx,%%rsi\n" ); + output( "\txorq %%rdx,%%rdx\n" ); + output( "\tmovq %%rdx,0x200(%%r12)\n" ); + output( "\tmovq %%rdx,0x208(%%r12)\n" ); + output( "\tmovq %%rdx,0x210(%%r12)\n" ); + output( "\ttestl $2,%%r14d\n" ); /* SYSCALL_HAVE_XSAVEC */ + output( "\tjz 1f\n" ); + output( "\tmovq %%rdx,0x218(%%r12)\n" ); + output( "\tmovq %%rdx,0x220(%%r12)\n" ); + output( "\tmovq %%rdx,0x228(%%r12)\n" ); + output( "\tmovq %%rdx,0x230(%%r12)\n" ); + output( "\tmovq %%rdx,0x238(%%r12)\n" ); + output( "\txsavec64 (%%r12)\n" ); + output( "\tmovq %%rsi,%%rdx\n" ); + output( "\tjmp 3f\n" ); + output( "1:\txsave64 (%%r12)\n" ); + output( "\tmovq %%rsi,%%rdx\n" ); + output( "\tjmp 3f\n" ); + output( "2:\tfxsave64 (%%r12)\n" ); + output( "3:\tmovq %%gs:0x30,%%rcx\n" ); output( "\tleaq -0x98(%%rbp),%%rbx\n" ); output( "\tmovq %%rbx,0x328(%%rcx)\n" ); /* amd64_thread_data()->syscall_frame */ - output( "\tmovq %%r11,%%rbx\n" ); + output( "\tmovq %%r13,%%rbx\n" ); output( "\tshrl $8,%%ebx\n" ); output( "\tandl $0x30,%%ebx\n" ); /* syscall table number */ output( "\tleaq %s(%%rip),%%rcx\n", asm_name("KeServiceDescriptorTable") ); output( "\tleaq (%%rcx,%%rbx,2),%%rbx\n" ); - output( "\tandq $0xfff,%%r11\n" ); /* syscall number */ - output( "\tcmpq 16(%%rbx),%%r11\n" ); /* table->ServiceLimit */ - output( "\tjae 3f\n" ); + output( "\tandq $0xfff,%%r13\n" ); /* syscall number */ + output( "\tcmpq 16(%%rbx),%%r13\n" ); /* table->ServiceLimit */ + output( "\tjae 5f\n" ); output( "\tmovq 24(%%rbx),%%rcx\n" ); /* table->ArgumentTable */ - output( "\tmovzbl (%%rcx,%%r11),%%ecx\n" ); + output( "\tmovzbl (%%rcx,%%r13),%%ecx\n" ); output( "\tsubq $0x20,%%rcx\n" ); output( "\tjbe 1f\n" ); output( "\tsubq %%rcx,%%rsp\n" ); @@ -1672,22 +1670,19 @@ static void output_syscall_dispatcher( const char *variant ) output( "1:\tmovq %%r10,%%rcx\n" ); output( "\tsubq $0x20,%%rsp\n" ); output( "\tmovq (%%rbx),%%r10\n" ); /* table->ServiceTable */ - output( "\tcallq *(%%r10,%%r11,8)\n" ); + output( "\tcallq *(%%r10,%%r13,8)\n" ); output( "2:\tmovq %%gs:0x30,%%rcx\n" ); output( "\tmovq $0,0x328(%%rcx)\n" ); - if (!*variant) - { - output( "\tfxrstor64 (%%r12)\n" ); - } - else - { - output( "\tmovq %%rax,%%r11\n" ); - output( "\tmovl $7,%%eax\n" ); - output( "\txorq %%rdx,%%rdx\n" ); - output( "\txrstor64 (%%r12)\n" ); - output( "\tmovq %%r11,%%rax\n" ); - } - output( "\tmovq -0x30(%%rbp),%%r15\n" ); + output( "\ttestl $3,%%r14d\n" ); /* SYSCALL_HAVE_XSAVE | SYSCALL_HAVE_XSAVEC */ + output( "\tjz 3f\n" ); + output( "\tmovq %%rax,%%r11\n" ); + output( "\tmovl $7,%%eax\n" ); + output( "\txorq %%rdx,%%rdx\n" ); + output( "\txrstor64 (%%r12)\n" ); + output( "\tmovq %%r11,%%rax\n" ); + output( "\tjmp 4f\n" ); + output( "3:\tfxrstor64 (%%r12)\n" ); + output( "4:\tmovq -0x30(%%rbp),%%r15\n" ); output( "\tmovq -0x38(%%rbp),%%r14\n" ); output( "\tmovq -0x40(%%rbp),%%r13\n" ); output( "\tmovq -0x48(%%rbp),%%r12\n" ); @@ -1704,7 +1699,7 @@ static void output_syscall_dispatcher( const char *variant ) output( "\tmovq (%%rbp),%%rbp\n" ); output_cfi( ".cfi_same_value %%rbp" ); output( "\tiretq\n" ); - output( "3:\tmovl $0x%x,%%eax\n", invalid_param ); + output( "5:\tmovl $0x%x,%%eax\n", invalid_param ); output( "\tjmp 2b\n" ); break; case CPU_ARM: @@ -1861,10 +1856,6 @@ void output_syscalls( DLLSPEC *spec ) output_syscall_dispatcher( "_xsave" ); output_syscall_dispatcher( "_xsavec" ); break; - case CPU_x86_64: - output_syscall_dispatcher( "_xsave" ); - output_syscall_dispatcher( "_xsavec" ); - break; default: break; } @@ -1881,6 +1872,9 @@ void output_syscalls( DLLSPEC *spec ) output( ".Lsyscall_args:\n" ); for (i = 0; i < count; i++) output( "\t.byte %u\n", get_args_size( syscalls[i] )); + output( "\t.align %d\n", get_alignment(4) ); + output( "%s\n", asm_globl("__wine_syscall_flags") ); + output( "\t.long 0\n" ); return; }
1
0
0
0
Andrew Eikum : shell32: Use correct environment substitution for FOLDERID_Public.
by Alexandre Julliard
01 Jun '21
01 Jun '21
Module: wine Branch: master Commit: 96030ce738aa20f85a5138ec7c231c19a086f019 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=96030ce738aa20f85a5138ec…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Tue Jun 1 11:45:51 2021 -0500 shell32: Use correct environment substitution for FOLDERID_Public. Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/shellpath.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index 3be759bf616..f71b660a7aa 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -2783,9 +2783,9 @@ static const CSIDL_DATA CSIDL_Data[] = }, { /* 0x56 */ &FOLDERID_Public, - CSIDL_Type_CurrVer, /* FIXME */ + CSIDL_Type_AllUsers, + NULL, NULL, - UsersPublicW, KF_CATEGORY_FIXED, /* category */ PublicW, /* name */
1
0
0
0
Hugh McMaster : reg/tests: Test whether the 'copy' command copies user-defined key classes.
by Alexandre Julliard
01 Jun '21
01 Jun '21
Module: wine Branch: master Commit: 664f8b638d421540e73b4e046a9aa5e66f8cc4ff URL:
https://source.winehq.org/git/wine.git/?a=commit;h=664f8b638d421540e73b4e04…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Tue Jun 1 23:37:27 2021 +1000 reg/tests: Test whether the 'copy' command copies user-defined key classes. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/reg/tests/copy.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/programs/reg/tests/copy.c b/programs/reg/tests/copy.c index 70f9496b149..2604d54b639 100644 --- a/programs/reg/tests/copy.c +++ b/programs/reg/tests/copy.c @@ -535,6 +535,48 @@ static void test_copy_escaped_null_values(void) delete_key(HKEY_CURRENT_USER, KEY_BASE); } +static void test_copy_key_class(void) +{ + HKEY hkey; + LONG rc; + char class[] = "class"; + char buf[16]; + DWORD buf_size, r; + + rc = RegCreateKeyExA(HKEY_CURRENT_USER, COPY_SRC, 0, class, REG_OPTION_NON_VOLATILE, + KEY_READ|KEY_WRITE, NULL, &hkey, NULL); + ok(rc == ERROR_SUCCESS, "RegCreateKeyExA failed: got %d, expected 0\n", rc); + + add_value(hkey, "String", REG_SZ, "Data", 5); + + buf_size = sizeof(buf); + + rc = RegQueryInfoKeyA(hkey, buf, &buf_size, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + ok(rc == ERROR_SUCCESS, "RegQueryInfoKeyA failed: got %d, expected 0\n", rc); + ok(!strcmp(buf, "class"), "Incorrect key class set; got '%s', expected '%s'\n", buf, class); + + RegCloseKey(hkey); + + run_reg_exe("reg copy HKCU\\" COPY_SRC " HKCU\\" KEY_BASE " /f", &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + verify_key(HKEY_CURRENT_USER, KEY_BASE); + + open_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey); + verify_reg(hkey, "String", REG_SZ, "Data", 5, 0); + + memset(buf, 0, sizeof(buf)); + buf_size = sizeof(buf); + + rc = RegQueryInfoKeyA(hkey, buf, &buf_size, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + ok(rc == ERROR_SUCCESS, "RegQueryInfoKeyA failed: got %d, expected 0\n", rc); + ok(strlen(buf) == 0, "Key class should not exist\n"); + + RegCloseKey(hkey); + + delete_key(HKEY_CURRENT_USER, COPY_SRC); + delete_key(HKEY_CURRENT_USER, KEY_BASE); +} + START_TEST(copy) { DWORD r; @@ -554,4 +596,5 @@ START_TEST(copy) test_copy_embedded_null_values(); test_copy_slashes(); test_copy_escaped_null_values(); + test_copy_key_class(); }
1
0
0
0
Matteo Bruni : wined3d: Don't pass the swizzle map to find_vs_compile_args() separately.
by Alexandre Julliard
01 Jun '21
01 Jun '21
Module: wine Branch: master Commit: 2f5a01201c2f2876161b253f2baa0c60d66da127 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2f5a01201c2f2876161b253f…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Mon May 31 21:12:57 2021 +0200 wined3d: Don't pass the swizzle map to find_vs_compile_args() separately. It's already part of the context. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/arb_program_shader.c | 2 +- dlls/wined3d/glsl_shader.c | 2 +- dlls/wined3d/shader.c | 3 ++- dlls/wined3d/wined3d_private.h | 3 +-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 7bd68d615d6..e297c724412 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -4477,7 +4477,7 @@ static void find_arb_vs_compile_args(const struct wined3d_state *state, int i; WORD int_skip; - find_vs_compile_args(state, shader, context_gl->c.stream_info.swizzle_map, &args->super, &context_gl->c); + find_vs_compile_args(state, shader, &args->super, &context_gl->c); args->clip.boolclip_compare = 0; if (use_ps(state)) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 398d3f5bffa..ccfd5f3f28e 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -10245,7 +10245,7 @@ static void set_glsl_shader_program(const struct wined3d_context_gl *context_gl, vshader = state->shader[WINED3D_SHADER_TYPE_VERTEX]; - find_vs_compile_args(state, vshader, context_gl->c.stream_info.swizzle_map, &vs_compile_args, &context_gl->c); + find_vs_compile_args(state, vshader, &vs_compile_args, &context_gl->c); vs_id = find_glsl_vertex_shader(context_gl, priv, vshader, &vs_compile_args); vs_list = &vshader->linked_programs; } diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 4374269b9a1..b34ec539014 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -3524,12 +3524,13 @@ static void init_interpolation_compile_args(DWORD *interpolation_args, } void find_vs_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader, - WORD swizzle_map, struct vs_compile_args *args, const struct wined3d_context *context) + struct vs_compile_args *args, const struct wined3d_context *context) { const struct wined3d_shader *geometry_shader = state->shader[WINED3D_SHADER_TYPE_GEOMETRY]; const struct wined3d_shader *pixel_shader = state->shader[WINED3D_SHADER_TYPE_PIXEL]; const struct wined3d_shader *hull_shader = state->shader[WINED3D_SHADER_TYPE_HULL]; const struct wined3d_d3d_info *d3d_info = context->d3d_info; + WORD swizzle_map = context->stream_info.swizzle_map; args->fog_src = state->render_states[WINED3D_RS_FOGTABLEMODE] == WINED3D_FOG_NONE ? VS_FOG_COORD : VS_FOG_Z; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index d5bc1e6c6c8..b0f8ea1bf93 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -5562,8 +5562,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3 BOOL vshader_get_input(const struct wined3d_shader *shader, BYTE usage_req, BYTE usage_idx_req, unsigned int *regnum) DECLSPEC_HIDDEN; void find_vs_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader, - WORD swizzle_map, struct vs_compile_args *args, - const struct wined3d_context *context) DECLSPEC_HIDDEN; + struct vs_compile_args *args, const struct wined3d_context *context) DECLSPEC_HIDDEN; void find_ds_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader, struct ds_compile_args *args, const struct wined3d_context *context) DECLSPEC_HIDDEN;
1
0
0
0
Matteo Bruni : wined3d: Remove access to gl_info from find_ps_compile_args().
by Alexandre Julliard
01 Jun '21
01 Jun '21
Module: wine Branch: master Commit: 8127ea1f8477abf3e76c5408e70713234c8f5e41 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8127ea1f8477abf3e76c5408…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Mon May 31 21:12:56 2021 +0200 wined3d: Remove access to gl_info from find_ps_compile_args(). Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/adapter_gl.c | 1 + dlls/wined3d/glsl_shader.c | 6 +++--- dlls/wined3d/shader.c | 5 ++--- dlls/wined3d/wined3d_private.h | 3 ++- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 8787324571a..f6ef04a5fbb 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -5115,6 +5115,7 @@ static void wined3d_adapter_gl_init_d3d_info(struct wined3d_adapter_gl *adapter_ d3d_info->shader_color_key = !!(fragment_caps.wined3d_caps & WINED3D_FRAGMENT_CAP_COLOR_KEY); d3d_info->shader_double_precision = !!(shader_caps.wined3d_caps & WINED3D_SHADER_CAP_DOUBLE_PRECISION); d3d_info->shader_output_interpolation = !!(shader_caps.wined3d_caps & WINED3D_SHADER_CAP_OUTPUT_INTERPOLATION); + d3d_info->frag_coord_correction = !!gl_info->supported[ARB_FRAGMENT_COORD_CONVENTIONS]; d3d_info->viewport_array_index_any_shader = !!gl_info->supported[ARB_SHADER_VIEWPORT_LAYER_ARRAY]; d3d_info->texture_npot = !!gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO]; d3d_info->texture_npot_conditional = gl_info->supported[WINED3D_GL_NORMALIZED_TEXRECT] diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 6a3aaabe39b..398d3f5bffa 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -4038,7 +4038,7 @@ static void shader_glsl_map2gl(const struct wined3d_shader_instruction *ins) { const struct shader_glsl_ctx_priv *priv = ins->ctx->backend_data; bool y_correction = ins->ctx->reg_maps->shader_version.type == WINED3D_SHADER_TYPE_PIXEL - ? !priv->cur_ps_args->render_offscreen : false; + ? priv->cur_ps_args->y_correction : false; struct wined3d_string_buffer *buffer = ins->ctx->buffer; struct glsl_src_param src_param; const char *instruction; @@ -7788,8 +7788,8 @@ static GLuint shader_glsl_generate_fragment_shader(const struct wined3d_context_ { if (context_gl->c.d3d_info->wined3d_creation_flags & WINED3D_PIXEL_CENTER_INTEGER) shader_addline(buffer, "layout(%spixel_center_integer) in vec4 gl_FragCoord;\n", - args->render_offscreen ? "" : "origin_upper_left, "); - else if (!args->render_offscreen) + args->y_correction ? "origin_upper_left, " : ""); + else if (args->y_correction) shader_addline(buffer, "layout(origin_upper_left) in vec4 gl_FragCoord;\n"); } shader_addline(buffer, "vec4 vpos;\n"); diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index ae9b21defa1..4374269b9a1 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -3952,7 +3952,6 @@ void find_gs_compile_args(const struct wined3d_state *state, const struct wined3 void find_ps_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader, BOOL position_transformed, struct ps_compile_args *args, const struct wined3d_context *context) { - const struct wined3d_gl_info *gl_info = &context->device->adapter->gl_info; const struct wined3d_d3d_info *d3d_info = context->d3d_info; struct wined3d_texture *texture; unsigned int i; @@ -4212,9 +4211,9 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3 if (d3d_info->emulated_flatshading) args->flatshading = state->render_states[WINED3D_RS_SHADEMODE] == WINED3D_SHADE_FLAT; - args->render_offscreen = (shader->reg_maps.vpos && gl_info->supported[ARB_FRAGMENT_COORD_CONVENTIONS]) + args->y_correction = (shader->reg_maps.vpos && d3d_info->frag_coord_correction) || (shader->reg_maps.usesdsy && wined3d_settings.offscreen_rendering_mode != ORM_FBO) - ? context->render_offscreen : 1; + ? !context->render_offscreen : 0; for (i = 0; i < ARRAY_SIZE(state->fb.render_targets); ++i) { diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 21f34a5895d..d5bc1e6c6c8 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -222,6 +222,7 @@ struct wined3d_d3d_info uint32_t shader_color_key : 1; uint32_t shader_double_precision : 1; uint32_t shader_output_interpolation : 1; + uint32_t frag_coord_correction : 1; uint32_t viewport_array_index_any_shader : 1; uint32_t texture_npot : 1; uint32_t texture_npot_conditional : 1; @@ -1438,7 +1439,7 @@ struct ps_compile_args DWORD pointsprite : 1; DWORD flatshading : 1; DWORD alpha_test_func : 3; - DWORD render_offscreen : 1; + DWORD y_correction : 1; DWORD rt_alpha_swizzle : 8; /* WINED3D_MAX_RENDER_TARGETS, 8 */ DWORD dual_source_blend : 1; DWORD padding : 17;
1
0
0
0
← Newer
1
...
75
76
77
78
79
80
81
82
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
Results per page:
10
25
50
100
200