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
July
June
May
April
March
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
March 2015
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
2 participants
775 discussions
Start a n
N
ew thread
André Hentschel : msvcp90: Cleanup macro usage.
by Alexandre Julliard
20 Mar '15
20 Mar '15
Module: wine Branch: master Commit: e0121ad32ac6088404f381d899b8ea23c26895a2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e0121ad32ac6088404f381d89…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Thu Mar 19 21:36:04 2015 +0100 msvcp90: Cleanup macro usage. --- dlls/msvcp90/misc.c | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/dlls/msvcp90/misc.c b/dlls/msvcp90/misc.c index db68f6d..51b2a67 100644 --- a/dlls/msvcp90/misc.c +++ b/dlls/msvcp90/misc.c @@ -28,14 +28,6 @@ #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(msvcp); -#define SECSPERDAY 86400 -/* 1601 to 1970 is 369 years plus 89 leap days */ -#define SECS_1601_TO_1970 ((369 * 365 + 89) * (ULONGLONG)SECSPERDAY) -#define TICKSPERSEC 10000000 -#define TICKS_1601_TO_1970 (SECS_1601_TO_1970 * TICKSPERSEC) -#define NANOSEC_PER_MILLISEC 1000000 -#define MILLISEC_PER_SEC 1000 - struct __Container_proxy; typedef struct { @@ -361,6 +353,15 @@ void __thiscall _Container_base12__Swap_all( } #if _MSVCP_VER >= 110 + +#define SECSPERDAY 86400 +/* 1601 to 1970 is 369 years plus 89 leap days */ +#define SECS_1601_TO_1970 ((369 * 365 + 89) * (ULONGLONG)SECSPERDAY) +#define TICKSPERSEC 10000000 +#define TICKS_1601_TO_1970 (SECS_1601_TO_1970 * TICKSPERSEC) +#define NANOSEC_PER_MILLISEC 1000000 +#define MILLISEC_PER_SEC 1000 + typedef int MSVCRT_long; /* xtime */ @@ -440,16 +441,6 @@ unsigned int __cdecl _Random_device(void) #if _MSVCP_VER >= 110 #if defined(__i386__) && !defined(__arm__) -#define THISCALL(func) __thiscall_ ## func -#define __thiscall __stdcall -#define DEFINE_THISCALL_WRAPPER(func,args) \ - extern void THISCALL(func)(void); \ - __ASM_GLOBAL_FUNC(__thiscall_ ## func, \ - "popl %eax\n\t" \ - "pushl %ecx\n\t" \ - "pushl %eax\n\t" \ - "jmp " __ASM_NAME(#func) __ASM_STDCALL(args) ) - extern void *call_thiscall_func; __ASM_GLOBAL_FUNC(call_thiscall_func, "popl %eax\n\t" @@ -462,9 +453,6 @@ __ASM_GLOBAL_FUNC(call_thiscall_func, #else /* __i386__ */ -#define __thiscall __cdecl -#define DEFINE_THISCALL_WRAPPER(func,args) /* nothing */ - #define call_func1(func,this) func(this) #endif /* __i386__ */
1
0
0
0
Jactry Zeng : riched20: Implement IOleInPlaceSite interface.
by Alexandre Julliard
19 Mar '15
19 Mar '15
Module: wine Branch: master Commit: 6c425a169ac56ea32e5ed226d60aa6f6d4415818 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6c425a169ac56ea32e5ed226d…
Author: Jactry Zeng <jzeng(a)codeweavers.com> Date: Tue Mar 17 16:17:39 2015 +0800 riched20: Implement IOleInPlaceSite interface. --- dlls/riched20/richole.c | 131 ++++++++++++++++++++++++++++++++++++++++++ dlls/riched20/tests/richole.c | 54 +++++++++++++++++ 2 files changed, 185 insertions(+) diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c index db55e84..3818cfa 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -82,6 +82,7 @@ struct ITextSelectionImpl { struct IOleClientSiteImpl { IOleClientSite IOleClientSite_iface; IOleWindow IOleWindow_iface; + IOleInPlaceSite IOleInPlaceSite_iface; LONG ref; IRichEditOleImpl *reOle; @@ -228,6 +229,8 @@ IOleClientSite_fnQueryInterface(IOleClientSite *me, REFIID riid, LPVOID *ppvObj) *ppvObj = me; else if (IsEqualGUID(riid, &IID_IOleWindow)) *ppvObj = &This->IOleWindow_iface; + else if (IsEqualGUID(riid, &IID_IOleInPlaceSite)) + *ppvObj = &This->IOleInPlaceSite_iface; if (*ppvObj) { IOleClientSite_AddRef(me); @@ -379,6 +382,133 @@ static const IOleWindowVtbl olewinvt = { IOleWindow_fnContextSensitiveHelp }; +/* IOleInPlaceSite interface */ +static inline IOleClientSiteImpl *impl_from_IOleInPlaceSite(IOleInPlaceSite *iface) +{ + return CONTAINING_RECORD(iface, IOleClientSiteImpl, IOleInPlaceSite_iface); +} + +static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnQueryInterface(IOleInPlaceSite *iface, REFIID riid, void **ppvObj) +{ + IOleClientSiteImpl *This = impl_from_IOleInPlaceSite(iface); + return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppvObj); +} + +static ULONG STDMETHODCALLTYPE IOleInPlaceSite_fnAddRef(IOleInPlaceSite *iface) +{ + IOleClientSiteImpl *This = impl_from_IOleInPlaceSite(iface); + return IOleClientSite_AddRef(&This->IOleClientSite_iface); +} + +static ULONG STDMETHODCALLTYPE IOleInPlaceSite_fnRelease(IOleInPlaceSite *iface) +{ + IOleClientSiteImpl *This = impl_from_IOleInPlaceSite(iface); + return IOleClientSite_Release(&This->IOleClientSite_iface); +} + +static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnGetWindow(IOleInPlaceSite *iface, HWND *phwnd) +{ + IOleClientSiteImpl *This = impl_from_IOleInPlaceSite(iface); + return IOleWindow_GetWindow(&This->IOleWindow_iface, phwnd); +} + +static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnContextSensitiveHelp(IOleInPlaceSite *iface, BOOL fEnterMode) +{ + IOleClientSiteImpl *This = impl_from_IOleInPlaceSite(iface); + return IOleWindow_ContextSensitiveHelp(&This->IOleWindow_iface, fEnterMode); +} + +static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnCanInPlaceActivate(IOleInPlaceSite *iface) +{ + IOleClientSiteImpl *This = impl_from_IOleInPlaceSite(iface); + FIXME("not implemented: (%p)\n", This); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnOnInPlaceActivate(IOleInPlaceSite *iface) +{ + IOleClientSiteImpl *This = impl_from_IOleInPlaceSite(iface); + FIXME("not implemented: (%p)\n", This); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnOnUIActivate(IOleInPlaceSite *iface) +{ + IOleClientSiteImpl *This = impl_from_IOleInPlaceSite(iface); + FIXME("not implemented: (%p)\n", This); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnGetWindowContext(IOleInPlaceSite *iface, IOleInPlaceFrame **ppFrame, + IOleInPlaceUIWindow **ppDoc, LPRECT lprcPosRect, + LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo) +{ + IOleClientSiteImpl *This = impl_from_IOleInPlaceSite(iface); + FIXME("not implemented: (%p)->(%p %p %p %p %p\n)", This, ppFrame, ppDoc, lprcPosRect, lprcClipRect, lpFrameInfo); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnScroll(IOleInPlaceSite *iface, SIZE scrollExtent) +{ + IOleClientSiteImpl *This = impl_from_IOleInPlaceSite(iface); + FIXME("not implemented: (%p)\n", This); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnOnUIDeactivate(IOleInPlaceSite *iface, BOOL fUndoable) +{ + IOleClientSiteImpl *This = impl_from_IOleInPlaceSite(iface); + FIXME("not implemented: (%p)->(%d)\n", This, fUndoable); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnOnInPlaceDeactivate(IOleInPlaceSite *iface) +{ + IOleClientSiteImpl *This = impl_from_IOleInPlaceSite(iface); + FIXME("not implemented: (%p)\n", This); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnDiscardUndoState(IOleInPlaceSite *iface) +{ + IOleClientSiteImpl *This = impl_from_IOleInPlaceSite(iface); + FIXME("not implemented: (%p)\n", This); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnDeactivateAndUndo(IOleInPlaceSite *iface) +{ + IOleClientSiteImpl *This = impl_from_IOleInPlaceSite(iface); + FIXME("not implemented: (%p)\n", This); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnOnPosRectChange(IOleInPlaceSite *iface, LPCRECT lprcPosRect) +{ + IOleClientSiteImpl *This = impl_from_IOleInPlaceSite(iface); + FIXME("not implemented: (%p)->(%p)\n", This, lprcPosRect); + return E_NOTIMPL; +} + +static const IOleInPlaceSiteVtbl olestvt = +{ + IOleInPlaceSite_fnQueryInterface, + IOleInPlaceSite_fnAddRef, + IOleInPlaceSite_fnRelease, + IOleInPlaceSite_fnGetWindow, + IOleInPlaceSite_fnContextSensitiveHelp, + IOleInPlaceSite_fnCanInPlaceActivate, + IOleInPlaceSite_fnOnInPlaceActivate, + IOleInPlaceSite_fnOnUIActivate, + IOleInPlaceSite_fnGetWindowContext, + IOleInPlaceSite_fnScroll, + IOleInPlaceSite_fnOnUIDeactivate, + IOleInPlaceSite_fnOnInPlaceDeactivate, + IOleInPlaceSite_fnDiscardUndoState, + IOleInPlaceSite_fnDeactivateAndUndo, + IOleInPlaceSite_fnOnPosRectChange +}; + static IOleClientSiteImpl * CreateOleClientSite(IRichEditOleImpl *reOle) { @@ -388,6 +518,7 @@ CreateOleClientSite(IRichEditOleImpl *reOle) clientSite->IOleClientSite_iface.lpVtbl = &ocst; clientSite->IOleWindow_iface.lpVtbl = &olewinvt; + clientSite->IOleInPlaceSite_iface.lpVtbl = &olestvt; clientSite->ref = 1; clientSite->reOle = reOle; return clientSite; diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c index a89ee55..b4fbaa1 100644 --- a/dlls/riched20/tests/richole.c +++ b/dlls/riched20/tests/richole.c @@ -164,6 +164,10 @@ static void test_Interfaces(void) hres = IRichEditOle_QueryInterface(reOle, &IID_IOleWindow, (void **) &punk); ok(hres == E_NOINTERFACE, "IRichEditOle_QueryInterface\n"); + punk = NULL; + hres = IRichEditOle_QueryInterface(reOle, &IID_IOleInPlaceSite, (void **) &punk); + ok(hres == E_NOINTERFACE, "IRichEditOle_QueryInterface\n"); + ITextDocument_Release(txtDoc); IRichEditOle_Release(reOle); refcount = IRichEditOle_Release(reOle); @@ -956,6 +960,7 @@ static void test_IOleClientSite_QueryInterface(void) ITextDocument *txtDoc = NULL; IOleClientSite *clientSite = NULL, *clientSite1 = NULL, *clientSite2 = NULL; IOleWindow *oleWin = NULL, *oleWin1 = NULL; + IOleInPlaceSite *olePlace = NULL, *olePlace1 = NULL; HRESULT hres; LONG refcount1, refcount2; @@ -992,6 +997,26 @@ static void test_IOleClientSite_QueryInterface(void) ok(hres == S_OK, "IOleWindow_QueryInterface: 0x%08x\n", hres); ok(clientSite2 == clientSite1, "got wrong pointer\n"); + /* IOleInPlaceSite interface */ + hres = IOleClientSite_QueryInterface(clientSite, &IID_IOleInPlaceSite, (void **)&olePlace); + ok(hres == S_OK, "IOleClientSite_QueryInterface: 0x%08x\n", hres); + refcount1 = get_refcount((IUnknown *)olePlace); + refcount2 = get_refcount((IUnknown *)clientSite); + ok(refcount1 == refcount2, "got wrong ref count.\n"); + + hres = IOleClientSite_QueryInterface(clientSite, &IID_IOleInPlaceSite, (void **)&olePlace1); + ok(hres == S_OK, "IOleClientSite_QueryInterface: 0x%08x\n", hres); + ok(olePlace == olePlace1, "Should not return a new pointer.\n"); + IOleInPlaceSite_Release(olePlace1); + + hres = IOleWindow_QueryInterface(oleWin, &IID_IOleInPlaceSite, (void **)&olePlace1); + ok(hres == S_OK, "IOleWindow_QueryInterface: 0x%08x\n", hres); + refcount1 = get_refcount((IUnknown *)olePlace1); + refcount2 = get_refcount((IUnknown *)oleWin); + ok(refcount1 == refcount2, "got wrong ref count.\n"); + + IOleInPlaceSite_Release(olePlace1); + IOleInPlaceSite_Release(olePlace); IOleWindow_Release(oleWin1); IOleWindow_Release(oleWin); IOleClientSite_Release(clientSite2); @@ -1028,6 +1053,34 @@ static void test_IOleWindow_GetWindow(void) release_interfaces(&w, &reOle, &txtDoc, NULL); } +static void test_IOleInPlaceSite_GetWindow(void) +{ + HWND w; + IRichEditOle *reOle = NULL; + ITextDocument *txtDoc = NULL; + IOleClientSite *clientSite = NULL; + IOleInPlaceSite *olePlace = NULL; + HRESULT hres; + HWND hwnd; + + create_interfaces(&w, &reOle, &txtDoc, NULL); + hres = IRichEditOle_GetClientSite(reOle, &clientSite); + ok(hres == S_OK, "IRichEditOle_QueryInterface: 0x%08x\n", hres); + + hres = IOleClientSite_QueryInterface(clientSite, &IID_IOleInPlaceSite, (void **)&olePlace); + ok(hres == S_OK, "IOleClientSite_QueryInterface: 0x%08x\n", hres); + hres = IOleInPlaceSite_GetWindow(olePlace, &hwnd); + ok(hres == S_OK, "IOleInPlaceSite_GetWindow: 0x%08x\n", hres); + ok(w == hwnd, "got wrong pointer.\n"); + + hres = IOleInPlaceSite_GetWindow(olePlace, NULL); + ok(hres == E_INVALIDARG, "IOleInPlaceSite_GetWindow: 0x%08x\n", hres); + + IOleInPlaceSite_Release(olePlace); + IOleClientSite_Release(clientSite); + release_interfaces(&w, &reOle, &txtDoc, NULL); +} + START_TEST(richole) { /* Must explicitly LoadLibrary(). The test has no references to functions in @@ -1048,4 +1101,5 @@ START_TEST(richole) test_ITextRange_Collapse(); test_IOleClientSite_QueryInterface(); test_IOleWindow_GetWindow(); + test_IOleInPlaceSite_GetWindow(); }
1
0
0
0
Francois Gouget : Assorted spelling fixes.
by Alexandre Julliard
19 Mar '15
19 Mar '15
Module: wine Branch: master Commit: f505e6fb4a9f0d19894856afd0650f82350cb97c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f505e6fb4a9f0d19894856afd…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Mar 18 08:44:56 2015 +0100 Assorted spelling fixes. --- dlls/d3d8/tests/device.c | 2 +- dlls/d3d9/tests/visual.c | 2 +- dlls/dinput/joystick.c | 8 ++++---- dlls/kernel32/tests/volume.c | 2 +- dlls/mshtml/htmlelem.c | 2 +- dlls/mshtml/htmlobject.c | 2 +- dlls/ntdll/tests/reg.c | 2 +- dlls/ole32/compobj.c | 2 +- dlls/ole32/pointermoniker.c | 2 +- dlls/sane.ds/sane_main.c | 2 +- dlls/shell32/shellpath.c | 2 +- dlls/shell32/shfldr_unixfs.c | 2 +- dlls/shell32/shlfileop.c | 4 ++-- dlls/urlmon/sec_mgr.c | 2 +- dlls/wined3d/arb_program_shader.c | 2 +- programs/cmd/builtins.c | 2 +- programs/winedbg/break.c | 2 +- tools/wrc/parser.y | 2 +- 18 files changed, 22 insertions(+), 22 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=f505e6fb4a9f0d1989485…
1
0
0
0
YongHao Hu : msvcp90: Add istream::operator>> complex implementation and tests.
by Alexandre Julliard
19 Mar '15
19 Mar '15
Module: wine Branch: master Commit: ff6231d173ca0ec4cc162d6ffa8717e0eb8362f5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ff6231d173ca0ec4cc162d6ff…
Author: YongHao Hu <christopherwuy(a)gmail.com> Date: Thu Mar 19 19:06:46 2015 +0800 msvcp90: Add istream::operator>>complex implementation and tests. --- dlls/msvcp71/msvcp71.spec | 12 ++-- dlls/msvcp80/msvcp80.spec | 12 ++-- dlls/msvcp90/ios.c | 177 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/msvcp90/msvcp90.spec | 12 ++-- dlls/msvcp90/tests/ios.c | 104 +++++++++++++++++++++++++++ 5 files changed, 299 insertions(+), 18 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ff6231d173ca0ec4cc162…
1
0
0
0
Dmitry Timoshkov : shell32: Fix SHFileOperation(FO_MOVE) for a directory with subdirectories.
by Alexandre Julliard
19 Mar '15
19 Mar '15
Module: wine Branch: master Commit: 5acb82fc2803d4bd623109e741bf2a6ee95017f8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5acb82fc2803d4bd623109e74…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Mar 19 17:30:55 2015 +0800 shell32: Fix SHFileOperation(FO_MOVE) for a directory with subdirectories. --- dlls/shell32/shlfileop.c | 31 +------------------------------ dlls/shell32/tests/shlfileop.c | 1 - 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c index e7e24e0..a8409f2 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c @@ -1389,42 +1389,13 @@ static DWORD delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom) return ERROR_SUCCESS; } -static void move_dir_to_dir(LPSHFILEOPSTRUCTW lpFileOp, const FILE_ENTRY *feFrom, LPCWSTR szDestPath) -{ - WCHAR szFrom[MAX_PATH], szTo[MAX_PATH]; - SHFILEOPSTRUCTW fileOp; - - static const WCHAR wildCardFiles[] = {'*','.','*',0}; - - if (IsDotDir(feFrom->szFilename)) - return; - - SHNotifyCreateDirectoryW(szDestPath, NULL); - - PathCombineW(szFrom, feFrom->szFullPath, wildCardFiles); - szFrom[lstrlenW(szFrom) + 1] = '\0'; - - lstrcpyW(szTo, szDestPath); - szTo[lstrlenW(szDestPath) + 1] = '\0'; - - fileOp = *lpFileOp; - fileOp.pFrom = szFrom; - fileOp.pTo = szTo; - - SHFileOperationW(&fileOp); -} - /* moves a file or directory to another directory */ static void move_to_dir(LPSHFILEOPSTRUCTW lpFileOp, const FILE_ENTRY *feFrom, const FILE_ENTRY *feTo) { WCHAR szDestPath[MAX_PATH]; PathCombineW(szDestPath, feTo->szFullPath, feFrom->szFilename); - - if (IsAttribFile(feFrom->attributes)) - SHNotifyMoveFileW(feFrom->szFullPath, szDestPath); - else if (!(lpFileOp->fFlags & FOF_FILESONLY && feFrom->bFromWildcard)) - move_dir_to_dir(lpFileOp, feFrom, szDestPath); + SHNotifyMoveFileW(feFrom->szFullPath, szDestPath); } /* the FO_MOVE operation */ diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c index fa83adf..d33ad5b 100644 --- a/dlls/shell32/tests/shlfileop.c +++ b/dlls/shell32/tests/shlfileop.c @@ -1860,7 +1860,6 @@ static void test_move(void) ok(file_exists("testdir2"), "dir should not be moved\n"); ok(!file_exists("testdir2\\one.txt"), "file should be moved\n"); -todo_wine ok(!file_exists("testdir2\\nested"), "dir should be moved\n"); ok(!file_exists("testdir2\\nested\\two.txt"), "file should be moved\n");
1
0
0
0
Dmitry Timoshkov : shell32/tests: Add a couple of SHFileOperation(FO_MOVE) tests for a directory.
by Alexandre Julliard
19 Mar '15
19 Mar '15
Module: wine Branch: master Commit: 5614ae23ee07c0b895f82559844c40686893a7a9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5614ae23ee07c0b895f825598…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Mar 19 17:30:47 2015 +0800 shell32/tests: Add a couple of SHFileOperation(FO_MOVE) tests for a directory. --- dlls/shell32/tests/shlfileop.c | 46 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c index 6bb28e1..fa83adf 100644 --- a/dlls/shell32/tests/shlfileop.c +++ b/dlls/shell32/tests/shlfileop.c @@ -164,6 +164,9 @@ static void clean_after_shfo_tests(void) DeleteFileA("test4.txt\\test1.txt"); DeleteFileA("test4.txt\\test2.txt"); DeleteFileA("test4.txt\\test3.txt"); + DeleteFileA("test4.txt\\one.txt"); + DeleteFileA("test4.txt\\nested\\two.txt"); + RemoveDirectoryA("test4.txt\\nested"); RemoveDirectoryA("test4.txt"); DeleteFileA("testdir2\\one.txt"); DeleteFileA("testdir2\\test1.txt"); @@ -1826,6 +1829,49 @@ static void test_move(void) CHAR to[5*MAX_PATH]; DWORD retval; + clean_after_shfo_tests(); + init_shfo_tests(); + + shfo.hwnd = NULL; + shfo.wFunc = FO_MOVE; + shfo.pFrom = from; + shfo.pTo = to; + shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI | FOF_NOCONFIRMMKDIR; + shfo.hNameMappings = NULL; + shfo.lpszProgressTitle = NULL; + shfo.fAnyOperationsAborted = FALSE; + + set_curr_dir_path(from, "testdir2\\*.*\0"); + set_curr_dir_path(to, "test4.txt\\*.*\0"); + retval = SHFileOperationA(&shfo); + ok(retval != 0, "SHFileOperation should fail\n"); + ok(!shfo.fAnyOperationsAborted, "fAnyOperationsAborted %d\n", shfo.fAnyOperationsAborted); + + ok(file_exists("testdir2"), "dir should not be moved\n"); + ok(file_exists("testdir2\\one.txt"), "file should not be moved\n"); + ok(file_exists("testdir2\\nested"), "dir should not be moved\n"); + ok(file_exists("testdir2\\nested\\two.txt"), "file should not be moved\n"); + + set_curr_dir_path(from, "testdir2\\*.*\0"); + set_curr_dir_path(to, "test4.txt\0"); + retval = SHFileOperationA(&shfo); + ok(!retval, "SHFileOperation error %#x\n", retval); + ok(!shfo.fAnyOperationsAborted, "fAnyOperationsAborted %d\n", shfo.fAnyOperationsAborted); + + ok(file_exists("testdir2"), "dir should not be moved\n"); + ok(!file_exists("testdir2\\one.txt"), "file should be moved\n"); +todo_wine + ok(!file_exists("testdir2\\nested"), "dir should be moved\n"); + ok(!file_exists("testdir2\\nested\\two.txt"), "file should be moved\n"); + + ok(file_exists("test4.txt"), "dir should exist\n"); + ok(file_exists("test4.txt\\one.txt"), "file should exist\n"); + ok(file_exists("test4.txt\\nested"), "dir should exist\n"); + ok(file_exists("test4.txt\\nested\\two.txt"), "file should exist\n"); + + clean_after_shfo_tests(); + init_shfo_tests(); + shfo.hwnd = NULL; shfo.wFunc = FO_MOVE; shfo.pFrom = from;
1
0
0
0
Matteo Bruni : wined3d: Don' t use the builtin FFP uniform for the modelview matrix.
by Alexandre Julliard
19 Mar '15
19 Mar '15
Module: wine Branch: master Commit: 9811d85141610f903d6c8de3b00be6c853ece182 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9811d85141610f903d6c8de3b…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Wed Mar 18 21:07:38 2015 +0100 wined3d: Don't use the builtin FFP uniform for the modelview matrix. --- dlls/wined3d/glsl_shader.c | 38 ++++++++++++++++++++++++++++++-------- dlls/wined3d/state.c | 2 +- dlls/wined3d/wined3d_private.h | 5 ++--- 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 6a4f233..3d48da1 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -116,6 +116,8 @@ struct glsl_vs_program GLint uniform_i_locations[MAX_CONST_I]; GLint uniform_b_locations[MAX_CONST_B]; GLint pos_fixup_location; + + GLint modelview_matrix_location; }; struct glsl_gs_program @@ -775,6 +777,15 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context checkGLcall("glUniform4fv"); } + if (update_mask & WINED3D_SHADER_CONST_FFP_MODELVIEW) + { + struct wined3d_matrix mat; + + get_modelview_matrix(context, state, &mat); + GL_EXTCALL(glUniformMatrix4fv(prog->vs.modelview_matrix_location, 1, FALSE, (GLfloat *)&mat)); + checkGLcall("glUniformMatrix4fv"); + } + if (update_mask & WINED3D_SHADER_CONST_PS_F) shader_glsl_load_constantsF(pshader, gl_info, state->ps_consts_f, prog->ps.uniform_f_locations, &priv->pconst_heap, priv->stack, constant_version); @@ -4976,7 +4987,10 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct wined3d_shader_buffe shader_addline(buffer, "#version 120\n"); shader_addline(buffer, "\n"); - shader_addline(buffer, "void main()\n{\n"); + + shader_addline(buffer, "uniform mat4 ffp_modelview_matrix;\n"); + + shader_addline(buffer, "\nvoid main()\n{\n"); shader_addline(buffer, "float m;\n"); shader_addline(buffer, "vec3 r;\n"); @@ -4988,7 +5002,7 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct wined3d_shader_buffe } else { - shader_addline(buffer, "vec4 ec_pos = gl_ModelViewMatrix * gl_Vertex;\n"); + shader_addline(buffer, "vec4 ec_pos = ffp_modelview_matrix * gl_Vertex;\n"); shader_addline(buffer, "gl_Position = gl_ProjectionMatrix * ec_pos;\n"); if (settings->clipping) shader_addline(buffer, "gl_ClipVertex = ec_pos;\n"); @@ -5755,6 +5769,8 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info * } vs->pos_fixup_location = GL_EXTCALL(glGetUniformLocation(program_id, "posFixup")); + + vs->modelview_matrix_location = GL_EXTCALL(glGetUniformLocation(program_id, "ffp_modelview_matrix")); } static void shader_glsl_init_ps_uniform_locations(const struct wined3d_gl_info *gl_info, @@ -6055,6 +6071,10 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const shader_glsl_init_uniform_block_bindings(gl_info, program_id, &vshader->reg_maps, 0, gl_info->limits.vertex_uniform_blocks); } + else + { + entry->constant_update_mask |= WINED3D_SHADER_CONST_FFP_MODELVIEW; + } if (gshader) shader_glsl_init_uniform_block_bindings(gl_info, program_id, &gshader->reg_maps, @@ -6971,9 +6991,6 @@ static void glsl_vertex_pipe_vdecl(struct wined3d_context *context, if (transformed != wasrhw) { - if (!isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(0))) - && !isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_VIEW))) - transform_world(context, state, STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(0))); if (!isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_PROJECTION)) && !isStateDirty(context, STATE_VIEWPORT)) transform_projection(context, state, STATE_TRANSFORM(WINED3D_TS_PROJECTION)); @@ -7026,14 +7043,19 @@ static void glsl_vertex_pipe_vs(struct wined3d_context *context, context_apply_state(context, state, STATE_VDECL); } +static void glsl_vertex_pipe_world(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) +{ + context->constant_update_mask |= WINED3D_SHADER_CONST_FFP_MODELVIEW; +} + void glsl_vertex_pipe_view(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_light_info *light = NULL; unsigned int k; - if (!isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(0)))) - transform_world(context, state, state_id); + context->constant_update_mask |= WINED3D_SHADER_CONST_FFP_MODELVIEW; for (k = 0; k < gl_info->limits.lights; ++k) { @@ -7132,7 +7154,7 @@ static const struct StateEntryTemplate glsl_vertex_pipe_vp_states[] = {STATE_TRANSFORM(WINED3D_TS_TEXTURE5), {STATE_TEXTURESTAGE(5, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), NULL }, WINED3D_GL_EXT_NONE }, {STATE_TRANSFORM(WINED3D_TS_TEXTURE6), {STATE_TEXTURESTAGE(6, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), NULL }, WINED3D_GL_EXT_NONE }, {STATE_TRANSFORM(WINED3D_TS_TEXTURE7), {STATE_TEXTURESTAGE(7, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(0)), {STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(0)), transform_world }, WINED3D_GL_EXT_NONE }, + {STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(0)), {STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(0)), glsl_vertex_pipe_world }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(0, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), {STATE_TEXTURESTAGE(0, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), transform_texture }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(1, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), {STATE_TEXTURESTAGE(1, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), transform_texture }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(2, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), {STATE_TEXTURESTAGE(2, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), transform_texture }, WINED3D_GL_EXT_NONE }, diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 8bbe59d..65f43a2 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -3841,7 +3841,7 @@ static void shader_bumpenv(struct wined3d_context *context, const struct wined3d context->constant_update_mask |= WINED3D_SHADER_CONST_PS_BUMP_ENV; } -void transform_world(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +static void transform_world(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = context->gl_info; struct wined3d_matrix mat; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index a6c141c..f05e72f 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -306,7 +306,8 @@ enum wined3d_shader_resource_type #define WINED3D_SHADER_CONST_PS_BUMP_ENV 0x00000080 #define WINED3D_SHADER_CONST_PS_Y_CORR 0x00000100 #define WINED3D_SHADER_CONST_PS_NP2_FIXUP 0x00000200 -#define WINED3D_SHADER_CONST_FFP_PS 0x00000400 +#define WINED3D_SHADER_CONST_FFP_MODELVIEW 0x00000400 +#define WINED3D_SHADER_CONST_FFP_PS 0x00000800 enum wined3d_shader_register_type { @@ -2807,8 +2808,6 @@ void sampler_texmatrix(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; void state_specularenable(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; -void transform_world(struct wined3d_context *context, - const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; void transform_projection(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; void transform_texture(struct wined3d_context *context,
1
0
0
0
Matteo Bruni : wined3d: Use a separate STATE_TRANSFORM(WINED3D_TS_VIEW) state handler in the GLSL pipeline.
by Alexandre Julliard
19 Mar '15
19 Mar '15
Module: wine Branch: master Commit: 425dc69fef85f1fadd3b0a7c51c35f700c1b2598 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=425dc69fef85f1fadd3b0a7c5…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Wed Mar 18 21:07:37 2015 +0100 wined3d: Use a separate STATE_TRANSFORM(WINED3D_TS_VIEW) state handler in the GLSL pipeline. --- dlls/wined3d/glsl_shader.c | 36 +++++++++++++++++++++++++++++++++++- dlls/wined3d/state.c | 2 +- dlls/wined3d/wined3d_private.h | 2 -- 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 00c7318..6a4f233 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -7026,6 +7026,40 @@ static void glsl_vertex_pipe_vs(struct wined3d_context *context, context_apply_state(context, state, STATE_VDECL); } +void glsl_vertex_pipe_view(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +{ + const struct wined3d_gl_info *gl_info = context->gl_info; + const struct wined3d_light_info *light = NULL; + unsigned int k; + + if (!isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(0)))) + transform_world(context, state, state_id); + + for (k = 0; k < gl_info->limits.lights; ++k) + { + if (!(light = state->lights[k])) + continue; + gl_info->gl_ops.gl.p_glLightfv(GL_LIGHT0 + light->glIndex, GL_POSITION, light->lightPosn); + checkGLcall("glLightfv posn"); + gl_info->gl_ops.gl.p_glLightfv(GL_LIGHT0 + light->glIndex, GL_SPOT_DIRECTION, light->lightDirn); + checkGLcall("glLightfv dirn"); + } + + for (k = 0; k < gl_info->limits.clipplanes; ++k) + { + if (!isStateDirty(context, STATE_CLIPPLANE(k))) + clipplane(context, state, STATE_CLIPPLANE(k)); + } + + if (context->swapchain->device->vertexBlendUsed) + { + static int warned; + + if (!warned++) + FIXME("Vertex blending emulation.\n"); + } +} + static void glsl_vertex_pipe_projection(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { @@ -7088,7 +7122,7 @@ static const struct StateEntryTemplate glsl_vertex_pipe_vp_states[] = /* Viewport */ {STATE_VIEWPORT, {STATE_VIEWPORT, viewport_vertexpart }, WINED3D_GL_EXT_NONE }, /* Transform states */ - {STATE_TRANSFORM(WINED3D_TS_VIEW), {STATE_TRANSFORM(WINED3D_TS_VIEW), transform_view }, WINED3D_GL_EXT_NONE }, + {STATE_TRANSFORM(WINED3D_TS_VIEW), {STATE_TRANSFORM(WINED3D_TS_VIEW), glsl_vertex_pipe_view }, WINED3D_GL_EXT_NONE }, {STATE_TRANSFORM(WINED3D_TS_PROJECTION), {STATE_TRANSFORM(WINED3D_TS_PROJECTION), glsl_vertex_pipe_projection}, WINED3D_GL_EXT_NONE }, {STATE_TRANSFORM(WINED3D_TS_TEXTURE0), {STATE_TEXTURESTAGE(0, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), NULL }, WINED3D_GL_EXT_NONE }, {STATE_TRANSFORM(WINED3D_TS_TEXTURE1), {STATE_TEXTURESTAGE(1, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), NULL }, WINED3D_GL_EXT_NONE }, diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index e5d6ca9..8bbe59d 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -3990,7 +3990,7 @@ static void state_vertexblend(struct wined3d_context *context, const struct wine } } -void transform_view(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +static void transform_view(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_light_info *light = NULL; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index f6c83a5..a6c141c 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2809,8 +2809,6 @@ void state_specularenable(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; void transform_world(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; -void transform_view(struct wined3d_context *context, - const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; void transform_projection(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; void transform_texture(struct wined3d_context *context,
1
0
0
0
Matteo Bruni : wined3d: Use a separate STATE_VDECL state handler in the GLSL pipeline.
by Alexandre Julliard
19 Mar '15
19 Mar '15
Module: wine Branch: master Commit: 99f3e835ac0c3fd873b127e8c227b9e44fa98ae2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=99f3e835ac0c3fd873b127e8c…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Wed Mar 18 21:07:36 2015 +0100 wined3d: Use a separate STATE_VDECL state handler in the GLSL pipeline. It's mostly a copy of vertexdeclaration() from state.c, with a few differences due to the new function being private to the GLSL backend (e.g. d3d_info.vs_clipping is known to be TRUE) and the fragment fog update part being split out. --- dlls/wined3d/glsl_shader.c | 89 ++++++++++++++++++++++++++++++++++++++++-- dlls/wined3d/state.c | 6 +-- dlls/wined3d/wined3d_private.h | 6 ++- 3 files changed, 93 insertions(+), 8 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index b6d3156..00c7318 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -6951,6 +6951,81 @@ static void glsl_vertex_pipe_shader(struct wined3d_context *context, context->shader_update_mask |= 1 << WINED3D_SHADER_TYPE_VERTEX; } +static void glsl_vertex_pipe_vdecl(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) +{ + const struct wined3d_gl_info *gl_info = context->gl_info; + BOOL transformed = context->stream_info.position_transformed; + BOOL wasrhw = context->last_was_rhw; + unsigned int i; + + context->last_was_rhw = transformed; + + if (!use_vs(state)) + { + if (context->last_was_vshader) + { + for (i = 0; i < gl_info->limits.clipplanes; ++i) + clipplane(context, state, STATE_CLIPPLANE(i)); + } + + if (transformed != wasrhw) + { + if (!isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(0))) + && !isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_VIEW))) + transform_world(context, state, STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(0))); + if (!isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_PROJECTION)) + && !isStateDirty(context, STATE_VIEWPORT)) + transform_projection(context, state, STATE_TRANSFORM(WINED3D_TS_PROJECTION)); + } + + for (i = 0; i < MAX_TEXTURES; ++i) + { + if (!isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_TEXTURE0 + i))) + transform_texture(context, state, STATE_TEXTURESTAGE(i, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS)); + } + + if (!isStateDirty(context, STATE_RENDER(WINED3D_RS_LIGHTING))) + state_lighting(context, state, STATE_RENDER(WINED3D_RS_LIGHTING)); + if (!isStateDirty(context, STATE_RENDER(WINED3D_RS_NORMALIZENORMALS))) + state_normalize(context, state, STATE_RENDER(WINED3D_RS_NORMALIZENORMALS)); + + /* Because of settings->texcoords, we have to always regenerate the + * vertex shader on a vdecl change. + * TODO: Just always output all the texcoords when there are enough + * varyings available to drop the dependency. */ + context->shader_update_mask |= 1 << WINED3D_SHADER_TYPE_VERTEX; + + if (use_ps(state) + && state->shader[WINED3D_SHADER_TYPE_PIXEL]->reg_maps.shader_version.major == 1 + && state->shader[WINED3D_SHADER_TYPE_PIXEL]->reg_maps.shader_version.minor <= 3) + context->shader_update_mask |= 1 << WINED3D_SHADER_TYPE_PIXEL; + } + else + { + if (!context->last_was_vshader) + { + /* Vertex shader clipping ignores the view matrix. Update all clipplanes. */ + for (i = 0; i < gl_info->limits.clipplanes; ++i) + clipplane(context, state, STATE_CLIPPLANE(i)); + } + } + + if (transformed != wasrhw && !isStateDirty(context, STATE_RENDER(WINED3D_RS_ZENABLE))) + context_apply_state(context, state, STATE_RENDER(WINED3D_RS_ZENABLE)); + + context->last_was_vshader = use_vs(state); +} + +static void glsl_vertex_pipe_vs(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) +{ + context->shader_update_mask |= 1 << WINED3D_SHADER_TYPE_VERTEX; + /* Different vertex shaders potentially require a different vertex attributes setup. */ + if (!isStateDirty(context, STATE_VDECL)) + context_apply_state(context, state, STATE_VDECL); +} + static void glsl_vertex_pipe_projection(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { @@ -6963,8 +7038,8 @@ static void glsl_vertex_pipe_projection(struct wined3d_context *context, static const struct StateEntryTemplate glsl_vertex_pipe_vp_states[] = { - {STATE_VDECL, {STATE_VDECL, vertexdeclaration }, WINED3D_GL_EXT_NONE }, - {STATE_SHADER(WINED3D_SHADER_TYPE_VERTEX), {STATE_SHADER(WINED3D_SHADER_TYPE_VERTEX), vertexdeclaration }, WINED3D_GL_EXT_NONE }, + {STATE_VDECL, {STATE_VDECL, glsl_vertex_pipe_vdecl }, WINED3D_GL_EXT_NONE }, + {STATE_SHADER(WINED3D_SHADER_TYPE_VERTEX), {STATE_SHADER(WINED3D_SHADER_TYPE_VERTEX), glsl_vertex_pipe_vs }, WINED3D_GL_EXT_NONE }, {STATE_MATERIAL, {STATE_RENDER(WINED3D_RS_SPECULARENABLE), NULL }, WINED3D_GL_EXT_NONE }, {STATE_RENDER(WINED3D_RS_SPECULARENABLE), {STATE_RENDER(WINED3D_RS_SPECULARENABLE), state_specularenable }, WINED3D_GL_EXT_NONE }, /* Clip planes */ @@ -7242,7 +7317,7 @@ static void glsl_fragment_pipe_fog(struct wined3d_context *context, { if (use_vshader) new_source = FOGSOURCE_VS; - else if (state->render_states[WINED3D_RS_FOGVERTEXMODE] == WINED3D_FOG_NONE || context->last_was_rhw) + else if (state->render_states[WINED3D_RS_FOGVERTEXMODE] == WINED3D_FOG_NONE || context->stream_info.position_transformed) new_source = FOGSOURCE_COORD; else new_source = FOGSOURCE_FFP; @@ -7259,6 +7334,13 @@ static void glsl_fragment_pipe_fog(struct wined3d_context *context, } } +static void glsl_fragment_pipe_vdecl(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) +{ + if (!isStateDirty(context, STATE_RENDER(WINED3D_RS_FOGENABLE))) + glsl_fragment_pipe_fog(context, state, state_id); +} + static void glsl_fragment_pipe_tex_transform(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { @@ -7273,6 +7355,7 @@ static void glsl_fragment_pipe_invalidate_constants(struct wined3d_context *cont static const struct StateEntryTemplate glsl_fragment_pipe_state_template[] = { + {STATE_VDECL, {STATE_VDECL, glsl_fragment_pipe_vdecl }, WINED3D_GL_EXT_NONE }, {STATE_RENDER(WINED3D_RS_TEXTUREFACTOR), {STATE_RENDER(WINED3D_RS_TEXTUREFACTOR), glsl_fragment_pipe_invalidate_constants}, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(0, WINED3D_TSS_COLOR_OP), {STATE_SHADER(WINED3D_SHADER_TYPE_PIXEL), NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(0, WINED3D_TSS_COLOR_ARG1), {STATE_SHADER(WINED3D_SHADER_TYPE_PIXEL), NULL }, WINED3D_GL_EXT_NONE }, diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index f434a99..e5d6ca9 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -74,7 +74,7 @@ static void state_fillmode(struct wined3d_context *context, const struct wined3d } } -static void state_lighting(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +void state_lighting(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = context->gl_info; @@ -1392,7 +1392,7 @@ static void state_linepattern(struct wined3d_context *context, const struct wine } } -static void state_normalize(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +void state_normalize(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = context->gl_info; @@ -4627,7 +4627,7 @@ static void vdecl_miscpart(struct wined3d_context *context, const struct wined3d streamsrc(context, state, STATE_STREAMSRC); } -void vertexdeclaration(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +static void vertexdeclaration(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = context->gl_info; BOOL useVertexShaderFunction = use_vs(state); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 8d000e8..f6c83a5 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2823,8 +2823,6 @@ void state_clipping(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; void light(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; -void vertexdeclaration(struct wined3d_context *context, - const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; void clipplane(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; void state_psizemin_w(struct wined3d_context *context, @@ -2839,6 +2837,10 @@ void state_pointsprite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; void state_pscale(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; +void state_lighting(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; +void state_normalize(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; BOOL getColorBits(const struct wined3d_format *format, BYTE *redSize, BYTE *greenSize, BYTE *blueSize, BYTE *alphaSize, BYTE *totalSize) DECLSPEC_HIDDEN;
1
0
0
0
Matteo Bruni : wined3d: Introduce a get_modelview_matrix() function.
by Alexandre Julliard
19 Mar '15
19 Mar '15
Module: wine Branch: master Commit: 50861156e25467b84406e01e70513e85d0b7b791 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=50861156e25467b84406e01e7…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Wed Mar 18 21:07:35 2015 +0100 wined3d: Introduce a get_modelview_matrix() function. --- dlls/wined3d/state.c | 17 +++++------------ dlls/wined3d/utils.c | 8 ++++++++ dlls/wined3d/wined3d_private.h | 2 ++ 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 67570d5..f434a99 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -3844,6 +3844,7 @@ static void shader_bumpenv(struct wined3d_context *context, const struct wined3d void transform_world(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = context->gl_info; + struct wined3d_matrix mat; /* This function is called by transform_view below if the view matrix was changed too * @@ -3855,18 +3856,10 @@ void transform_world(struct wined3d_context *context, const struct wined3d_state gl_info->gl_ops.gl.p_glMatrixMode(GL_MODELVIEW); checkGLcall("glMatrixMode"); - if (context->last_was_rhw) - { - gl_info->gl_ops.gl.p_glLoadIdentity(); - checkGLcall("glLoadIdentity()"); - } - else - { - gl_info->gl_ops.gl.p_glLoadMatrixf(&state->transforms[WINED3D_TS_VIEW].u.m[0][0]); - checkGLcall("glLoadMatrixf"); - gl_info->gl_ops.gl.p_glMultMatrixf(&state->transforms[WINED3D_TS_WORLD_MATRIX(0)].u.m[0][0]); - checkGLcall("glMultMatrixf"); - } + get_modelview_matrix(context, state, &mat); + + gl_info->gl_ops.gl.p_glLoadMatrixf((GLfloat *)&mat); + checkGLcall("glLoadMatrixf"); } void clipplane(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 551dca8..116ab9a 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -3130,6 +3130,14 @@ void get_identity_matrix(struct wined3d_matrix *mat) *mat = identity; } +void get_modelview_matrix(const struct wined3d_context *context, const struct wined3d_state *state, struct wined3d_matrix *mat) +{ + if (context->last_was_rhw) + get_identity_matrix(mat); + else + multiply_matrix(mat, &state->transforms[WINED3D_TS_VIEW], &state->transforms[WINED3D_TS_WORLD_MATRIX(0)]); +} + /* Setup this textures matrix according to the texture flags. */ /* Context activation is done by the caller (state handler). */ void set_texture_matrix(const struct wined3d_gl_info *gl_info, const float *smat, DWORD flags, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 4f03b1b..8d000e8 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3038,6 +3038,8 @@ static inline BOOL shader_constant_is_local(const struct wined3d_shader *shader, } void get_identity_matrix(struct wined3d_matrix *mat) DECLSPEC_HIDDEN; +void get_modelview_matrix(const struct wined3d_context *context, const struct wined3d_state *state, + struct wined3d_matrix *mat) DECLSPEC_HIDDEN; /* Using additional shader constants (uniforms in GLSL / program environment * or local parameters in ARB) is costly:
1
0
0
0
← Newer
1
...
26
27
28
29
30
31
32
...
78
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
Results per page:
10
25
50
100
200