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
January 2012
----- 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
972 discussions
Start a n
N
ew thread
Nikolay Sivov : shell32: Rearrange code to avoid forward declarations.
by Alexandre Julliard
13 Jan '12
13 Jan '12
Module: wine Branch: master Commit: 881299c6a8e806577d639970c5cc4ffc9c6bfbce URL:
http://source.winehq.org/git/wine.git/?a=commit;h=881299c6a8e806577d639970c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jan 13 00:14:14 2012 +0300 shell32: Rearrange code to avoid forward declarations. --- dlls/shell32/shlfsbind.c | 169 +++++++++++++++++++++------------------------ 1 files changed, 79 insertions(+), 90 deletions(-) diff --git a/dlls/shell32/shlfsbind.c b/dlls/shell32/shlfsbind.c index 5988290..53a1d3b 100644 --- a/dlls/shell32/shlfsbind.c +++ b/dlls/shell32/shlfsbind.c @@ -44,86 +44,31 @@ typedef struct IFileSystemBindData IFileSystemBindData_iface; LONG ref; WIN32_FIND_DATAW findFile; -} IFileSystemBindDataImpl; +} FileSystemBindData; -static inline IFileSystemBindDataImpl *impl_from_IFileSystemBindData(IFileSystemBindData *iface) +static inline FileSystemBindData *impl_from_IFileSystemBindData(IFileSystemBindData *iface) { - return CONTAINING_RECORD(iface, IFileSystemBindDataImpl, IFileSystemBindData_iface); + return CONTAINING_RECORD(iface, FileSystemBindData, IFileSystemBindData_iface); } -static HRESULT WINAPI IFileSystemBindData_fnQueryInterface(IFileSystemBindData *, REFIID, LPVOID*); -static ULONG WINAPI IFileSystemBindData_fnAddRef(IFileSystemBindData *); -static ULONG WINAPI IFileSystemBindData_fnRelease(IFileSystemBindData *); -static HRESULT WINAPI IFileSystemBindData_fnGetFindData(IFileSystemBindData *, WIN32_FIND_DATAW *); -static HRESULT WINAPI IFileSystemBindData_fnSetFindData(IFileSystemBindData *, const WIN32_FIND_DATAW *); - -static const IFileSystemBindDataVtbl sbvt = -{ - IFileSystemBindData_fnQueryInterface, - IFileSystemBindData_fnAddRef, - IFileSystemBindData_fnRelease, - IFileSystemBindData_fnSetFindData, - IFileSystemBindData_fnGetFindData, -}; - -static const WCHAR wFileSystemBindData[] = { - 'F','i','l','e',' ','S','y','s','t','e','m',' ','B','i','n','d',' ','D','a','t','a',0}; - -HRESULT WINAPI IFileSystemBindData_Constructor(const WIN32_FIND_DATAW *pfd, LPBC *ppV) +static HRESULT WINAPI FileSystemBindData_QueryInterface( + IFileSystemBindData *iface, REFIID riid, LPVOID *ppV) { - IFileSystemBindDataImpl *sb; - HRESULT ret = E_OUTOFMEMORY; - - TRACE("%p, %p\n", pfd, ppV); + FileSystemBindData *This = impl_from_IFileSystemBindData(iface); - if (!ppV) - return E_INVALIDARG; + TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppV); *ppV = NULL; - sb = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IFileSystemBindDataImpl)); - if (!sb) - return ret; - - sb->IFileSystemBindData_iface.lpVtbl = &sbvt; - sb->ref = 1; - IFileSystemBindData_fnSetFindData(&sb->IFileSystemBindData_iface, pfd); - - ret = CreateBindCtx(0, ppV); - if (SUCCEEDED(ret)) + if (IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IFileSystemBindData)) { - BIND_OPTS bindOpts; - - bindOpts.cbStruct = sizeof(BIND_OPTS); - bindOpts.grfFlags = 0; - bindOpts.grfMode = STGM_CREATE; - bindOpts.dwTickCountDeadline = 0; - IBindCtx_SetBindOptions(*ppV, &bindOpts); - IBindCtx_RegisterObjectParam(*ppV, (LPOLESTR)wFileSystemBindData, (LPUNKNOWN)sb); - - IFileSystemBindData_Release(&sb->IFileSystemBindData_iface); + *ppV = &This->IFileSystemBindData_iface; } - else - HeapFree(GetProcessHeap(), 0, sb); - return ret; -} - -static HRESULT WINAPI IFileSystemBindData_fnQueryInterface( - IFileSystemBindData *iface, REFIID riid, LPVOID *ppV) -{ - IFileSystemBindDataImpl *This = impl_from_IFileSystemBindData(iface); - TRACE("(%p)->(\n\tIID:\t%s, %p)\n", This, debugstr_guid(riid), ppV); - - *ppV = NULL; - - if (IsEqualIID(riid, &IID_IUnknown)) - *ppV = This; - else if (IsEqualIID(riid, &IID_IFileSystemBindData)) - *ppV = This; if (*ppV) { - IUnknown_AddRef((IUnknown*)(*ppV)); + IFileSystemBindData_AddRef(iface); TRACE("-- Interface: (%p)->(%p)\n", ppV, *ppV); return S_OK; } @@ -131,36 +76,32 @@ static HRESULT WINAPI IFileSystemBindData_fnQueryInterface( return E_NOINTERFACE; } -static ULONG WINAPI IFileSystemBindData_fnAddRef(IFileSystemBindData *iface) +static ULONG WINAPI FileSystemBindData_AddRef(IFileSystemBindData *iface) { - IFileSystemBindDataImpl *This = impl_from_IFileSystemBindData(iface); - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE("(%p)->(count=%i)\n", This, refCount - 1); - - return refCount; + FileSystemBindData *This = impl_from_IFileSystemBindData(iface); + ULONG ref = InterlockedIncrement(&This->ref); + TRACE("(%p)->(%u)\n", This, ref); + return ref; } -static ULONG WINAPI IFileSystemBindData_fnRelease(IFileSystemBindData *iface) +static ULONG WINAPI FileSystemBindData_Release(IFileSystemBindData *iface) { - IFileSystemBindDataImpl *This = impl_from_IFileSystemBindData(iface); - ULONG refCount = InterlockedDecrement(&This->ref); + FileSystemBindData *This = impl_from_IFileSystemBindData(iface); + ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p)->(count=%i)\n", This, refCount + 1); + TRACE("(%p)->(%u)\n", This, ref); - if (!refCount) - { - TRACE(" destroying ISFBindPidl(%p)\n",This); + if (!ref) HeapFree(GetProcessHeap(), 0, This); - } - return refCount; + + return ref; } -static HRESULT WINAPI IFileSystemBindData_fnGetFindData( - IFileSystemBindData *iface, WIN32_FIND_DATAW *pfd) +static HRESULT WINAPI FileSystemBindData_GetFindData(IFileSystemBindData *iface, WIN32_FIND_DATAW *pfd) { - IFileSystemBindDataImpl *This = impl_from_IFileSystemBindData(iface); - TRACE("(%p), %p\n", This, pfd); + FileSystemBindData *This = impl_from_IFileSystemBindData(iface); + + TRACE("(%p)->(%p)\n", This, pfd); if (!pfd) return E_INVALIDARG; @@ -169,11 +110,11 @@ static HRESULT WINAPI IFileSystemBindData_fnGetFindData( return S_OK; } -static HRESULT WINAPI IFileSystemBindData_fnSetFindData( - IFileSystemBindData *iface, const WIN32_FIND_DATAW *pfd) +static HRESULT WINAPI FileSystemBindData_SetFindData(IFileSystemBindData *iface, const WIN32_FIND_DATAW *pfd) { - IFileSystemBindDataImpl *This = impl_from_IFileSystemBindData(iface); - TRACE("(%p), %p\n", This, pfd); + FileSystemBindData *This = impl_from_IFileSystemBindData(iface); + + TRACE("(%p)->(%p)\n", This, pfd); if (pfd) This->findFile = *pfd; @@ -181,3 +122,51 @@ static HRESULT WINAPI IFileSystemBindData_fnSetFindData( memset(&This->findFile, 0, sizeof(WIN32_FIND_DATAW)); return S_OK; } + +static const IFileSystemBindDataVtbl FileSystemBindDataVtbl = { + FileSystemBindData_QueryInterface, + FileSystemBindData_AddRef, + FileSystemBindData_Release, + FileSystemBindData_SetFindData, + FileSystemBindData_GetFindData, +}; + +HRESULT WINAPI IFileSystemBindData_Constructor(const WIN32_FIND_DATAW *find_data, LPBC *ppV) +{ + FileSystemBindData *This; + HRESULT ret; + + TRACE("(%p %p)\n", find_data, ppV); + + if (!ppV) + return E_INVALIDARG; + + *ppV = NULL; + + This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); + if (!This) return E_OUTOFMEMORY; + + This->IFileSystemBindData_iface.lpVtbl = &FileSystemBindDataVtbl; + This->ref = 1; + IFileSystemBindData_SetFindData(&This->IFileSystemBindData_iface, find_data); + + ret = CreateBindCtx(0, ppV); + if (SUCCEEDED(ret)) + { + static const WCHAR nameW[] = { + 'F','i','l','e',' ','S','y','s','t','e','m',' ','B','i','n','d',' ','D','a','t','a',0}; + BIND_OPTS bindOpts; + + bindOpts.cbStruct = sizeof(BIND_OPTS); + bindOpts.grfFlags = 0; + bindOpts.grfMode = STGM_CREATE; + bindOpts.dwTickCountDeadline = 0; + IBindCtx_SetBindOptions(*ppV, &bindOpts); + IBindCtx_RegisterObjectParam(*ppV, (WCHAR*)nameW, (IUnknown*)&This->IFileSystemBindData_iface); + + IFileSystemBindData_Release(&This->IFileSystemBindData_iface); + } + else + HeapFree(GetProcessHeap(), 0, This); + return ret; +}
1
0
0
0
André Hentschel : setupapi: Add stub for CM_Get_Class_Registry_PropertyW.
by Alexandre Julliard
13 Jan '12
13 Jan '12
Module: wine Branch: master Commit: 88baa9e700027b4d57cc8c5589c3a4e8843b31c1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=88baa9e700027b4d57cc8c558…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Thu Jan 12 21:05:08 2012 +0100 setupapi: Add stub for CM_Get_Class_Registry_PropertyW. --- dlls/cfgmgr32/cfgmgr32.spec | 2 +- dlls/setupapi/setupapi.spec | 2 +- dlls/setupapi/stubs.c | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dlls/cfgmgr32/cfgmgr32.spec b/dlls/cfgmgr32/cfgmgr32.spec index 69b35f6..3d687b3 100644 --- a/dlls/cfgmgr32/cfgmgr32.spec +++ b/dlls/cfgmgr32/cfgmgr32.spec @@ -53,7 +53,7 @@ @ stub CM_Get_Class_Name_ExA @ stub CM_Get_Class_Name_ExW @ stdcall CM_Get_Class_Registry_PropertyA(ptr long ptr ptr long long ptr) setupapi.CM_Get_Class_Registry_PropertyA -@ stub CM_Get_Class_Registry_PropertyW +@ stdcall CM_Get_Class_Registry_PropertyW(ptr long ptr ptr long long ptr) setupapi.CM_Get_Class_Registry_PropertyW @ stub CM_Get_Depth @ stub CM_Get_Depth_Ex @ stub CM_Get_DevNode_Registry_PropertyA diff --git a/dlls/setupapi/setupapi.spec b/dlls/setupapi/setupapi.spec index 5c8fd80..d3825d9 100644 --- a/dlls/setupapi/setupapi.spec +++ b/dlls/setupapi/setupapi.spec @@ -64,7 +64,7 @@ @ stub CM_Get_Class_Name_ExA @ stub CM_Get_Class_Name_ExW @ stdcall CM_Get_Class_Registry_PropertyA(ptr long ptr ptr long long ptr) -@ stub CM_Get_Class_Registry_PropertyW +@ stdcall CM_Get_Class_Registry_PropertyW(ptr long ptr ptr long long ptr) @ stub CM_Get_Depth @ stub CM_Get_Depth_Ex @ stub CM_Get_DevNode_Registry_PropertyA diff --git a/dlls/setupapi/stubs.c b/dlls/setupapi/stubs.c index 41f6d2f..ba437b7 100644 --- a/dlls/setupapi/stubs.c +++ b/dlls/setupapi/stubs.c @@ -398,6 +398,16 @@ CONFIGRET WINAPI CM_Get_Class_Registry_PropertyA(LPGUID class, ULONG prop, PULON } /*********************************************************************** + * CM_Get_Class_Registry_PropertyW (SETUPAPI.@) + */ +CONFIGRET WINAPI CM_Get_Class_Registry_PropertyW(LPGUID class, ULONG prop, PULONG regdatatype, + PVOID buf, ULONG len, ULONG flags, HMACHINE machine) +{ + FIXME("%p %u %p %p %u 0x%08x %p: stub\n", class, prop, regdatatype, buf, len, flags, machine); + return CR_FAILURE; +} + +/*********************************************************************** * CM_Set_Class_Registry_PropertyA (SETUPAPI.@) */ CONFIGRET WINAPI CM_Set_Class_Registry_PropertyA(LPGUID class, ULONG prop, PVOID buf, ULONG len,
1
0
0
0
André Hentschel : setupapi: Add stub for CM_Get_Class_Registry_PropertyA.
by Alexandre Julliard
13 Jan '12
13 Jan '12
Module: wine Branch: master Commit: 0309066f15f2a6fa40f362f3b431f1869af580d2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0309066f15f2a6fa40f362f3b…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Thu Jan 12 21:05:01 2012 +0100 setupapi: Add stub for CM_Get_Class_Registry_PropertyA. --- dlls/cfgmgr32/cfgmgr32.spec | 2 ++ dlls/setupapi/setupapi.spec | 2 ++ dlls/setupapi/stubs.c | 10 ++++++++++ 3 files changed, 14 insertions(+), 0 deletions(-) diff --git a/dlls/cfgmgr32/cfgmgr32.spec b/dlls/cfgmgr32/cfgmgr32.spec index 24c4cf3..69b35f6 100644 --- a/dlls/cfgmgr32/cfgmgr32.spec +++ b/dlls/cfgmgr32/cfgmgr32.spec @@ -52,6 +52,8 @@ @ stub CM_Get_Class_NameW @ stub CM_Get_Class_Name_ExA @ stub CM_Get_Class_Name_ExW +@ stdcall CM_Get_Class_Registry_PropertyA(ptr long ptr ptr long long ptr) setupapi.CM_Get_Class_Registry_PropertyA +@ stub CM_Get_Class_Registry_PropertyW @ stub CM_Get_Depth @ stub CM_Get_Depth_Ex @ stub CM_Get_DevNode_Registry_PropertyA diff --git a/dlls/setupapi/setupapi.spec b/dlls/setupapi/setupapi.spec index eceef49..5c8fd80 100644 --- a/dlls/setupapi/setupapi.spec +++ b/dlls/setupapi/setupapi.spec @@ -63,6 +63,8 @@ @ stub CM_Get_Class_NameW @ stub CM_Get_Class_Name_ExA @ stub CM_Get_Class_Name_ExW +@ stdcall CM_Get_Class_Registry_PropertyA(ptr long ptr ptr long long ptr) +@ stub CM_Get_Class_Registry_PropertyW @ stub CM_Get_Depth @ stub CM_Get_Depth_Ex @ stub CM_Get_DevNode_Registry_PropertyA diff --git a/dlls/setupapi/stubs.c b/dlls/setupapi/stubs.c index 1617f71..41f6d2f 100644 --- a/dlls/setupapi/stubs.c +++ b/dlls/setupapi/stubs.c @@ -388,6 +388,16 @@ CONFIGRET WINAPI CM_Enumerate_Classes(ULONG index, LPGUID class, ULONG flags) } /*********************************************************************** + * CM_Get_Class_Registry_PropertyA (SETUPAPI.@) + */ +CONFIGRET WINAPI CM_Get_Class_Registry_PropertyA(LPGUID class, ULONG prop, PULONG regdatatype, + PVOID buf, ULONG len, ULONG flags, HMACHINE machine) +{ + FIXME("%p %u %p %p %u 0x%08x %p: stub\n", class, prop, regdatatype, buf, len, flags, machine); + return CR_FAILURE; +} + +/*********************************************************************** * CM_Set_Class_Registry_PropertyA (SETUPAPI.@) */ CONFIGRET WINAPI CM_Set_Class_Registry_PropertyA(LPGUID class, ULONG prop, PVOID buf, ULONG len,
1
0
0
0
Nikolay Sivov : msxml3: Leading space chars are allowed in SelectionNamespaces value string.
by Alexandre Julliard
13 Jan '12
13 Jan '12
Module: wine Branch: master Commit: 0f658d9dc8232e7a5e7beb545eea875cb8f859f3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0f658d9dc8232e7a5e7beb545…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Jan 12 23:31:22 2012 +0300 msxml3: Leading space chars are allowed in SelectionNamespaces value string. --- dlls/msxml3/domdoc.c | 45 ++++++++++++++---------- dlls/msxml3/tests/domdoc.c | 79 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 102 insertions(+), 22 deletions(-) diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index 4bb4fa4..47ce60d 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -2767,14 +2767,11 @@ static HRESULT WINAPI domdoc_setProperty( } else if (lstrcmpiW(p, PropertySelectionNamespacesW) == 0) { + xmlChar *nsStr = (xmlChar*)This->properties->selectNsStr; + struct list *pNsList; VARIANT varStr; HRESULT hr; BSTR bstr; - xmlChar *pTokBegin, *pTokEnd, *pTokInner; - xmlChar *nsStr = (xmlChar*)This->properties->selectNsStr; - xmlXPathContextPtr ctx; - struct list *pNsList; - select_ns_entry* pNsEntry = NULL; V_VT(&varStr) = VT_EMPTY; if (V_VT(&var) != VT_BSTR) @@ -2793,20 +2790,30 @@ static HRESULT WINAPI domdoc_setProperty( heap_free(nsStr); nsStr = xmlchar_from_wchar(bstr); - TRACE("Setting SelectionNamespaces property to: %s\n", nsStr); + TRACE("property value: \"%s\"\n", debugstr_w(bstr)); This->properties->selectNsStr = nsStr; This->properties->selectNsStr_len = xmlStrlen(nsStr); if (bstr && *bstr) { + xmlChar *pTokBegin, *pTokEnd, *pTokInner; + select_ns_entry* ns_entry = NULL; + xmlXPathContextPtr ctx; + ctx = xmlXPathNewContext(This->node.node->doc); pTokBegin = nsStr; + + /* skip leading spaces */ + while (*pTokBegin == ' ' || *pTokBegin == '\n' || + *pTokBegin == '\t' || *pTokBegin == '\r') + ++pTokBegin; + for (; *pTokBegin; pTokBegin = pTokEnd) { - if (pNsEntry != NULL) - memset(pNsEntry, 0, sizeof(select_ns_entry)); + if (ns_entry) + memset(ns_entry, 0, sizeof(select_ns_entry)); else - pNsEntry = heap_alloc_zero(sizeof(select_ns_entry)); + ns_entry = heap_alloc_zero(sizeof(select_ns_entry)); while (*pTokBegin == ' ') ++pTokBegin; @@ -2831,7 +2838,7 @@ static HRESULT WINAPI domdoc_setProperty( } else if (*pTokBegin == ':') { - pNsEntry->prefix = ++pTokBegin; + ns_entry->prefix = ++pTokBegin; for (pTokInner = pTokBegin; pTokInner != pTokEnd && *pTokInner != '='; ++pTokInner) ; @@ -2843,7 +2850,7 @@ static HRESULT WINAPI domdoc_setProperty( continue; } - pNsEntry->prefix_end = *pTokInner; + ns_entry->prefix_end = *pTokInner; *pTokInner = 0; ++pTokInner; @@ -2851,25 +2858,25 @@ static HRESULT WINAPI domdoc_setProperty( ((*pTokInner == '\'' && *(pTokEnd-1) == '\'') || (*pTokInner == '"' && *(pTokEnd-1) == '"'))) { - pNsEntry->href = ++pTokInner; - pNsEntry->href_end = *(pTokEnd-1); + ns_entry->href = ++pTokInner; + ns_entry->href_end = *(pTokEnd-1); *(pTokEnd-1) = 0; - list_add_tail(pNsList, &pNsEntry->entry); + list_add_tail(pNsList, &ns_entry->entry); /*let libxml figure out if they're valid from here ;)*/ - if (xmlXPathRegisterNs(ctx, pNsEntry->prefix, pNsEntry->href) != 0) + if (xmlXPathRegisterNs(ctx, ns_entry->prefix, ns_entry->href) != 0) { hr = E_FAIL; } - pNsEntry = NULL; + ns_entry = NULL; continue; } else { WARN("Syntax error in xmlns string: %s\n\tat token: %s\n", wine_dbgstr_w(bstr), wine_dbgstr_an((const char*)pTokInner, pTokEnd-pTokInner)); - list_add_tail(pNsList, &pNsEntry->entry); + list_add_tail(pNsList, &ns_entry->entry); - pNsEntry = NULL; + ns_entry = NULL; hr = E_FAIL; continue; } @@ -2880,7 +2887,7 @@ static HRESULT WINAPI domdoc_setProperty( continue; } } - heap_free(pNsEntry); + heap_free(ns_entry); xmlXPathFreeContext(ctx); } diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index a4e5ab1..0041763 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -5480,8 +5480,41 @@ static void test_whitespace(void) free_bstrs(); } -static void test_XPath(void) +typedef struct { + const GUID *clsid; + const char *name; + const char *ns; + HRESULT hr; +} selection_ns_t; + +/* supposed to be tested with szExampleXML */ +static const selection_ns_t selection_ns_data[] = { + { &CLSID_DOMDocument, "CLSID_DOMDocument", "\txmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29'", S_OK }, + { &CLSID_DOMDocument, "CLSID_DOMDocument", "\n\rxmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29'", S_OK }, + { &CLSID_DOMDocument, "CLSID_DOMDocument", " xmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29'", S_OK }, + + { &CLSID_DOMDocument2, "CLSID_DOMDocument2", "\txmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29'", S_OK }, + { &CLSID_DOMDocument2, "CLSID_DOMDocument2", "\n\rxmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29'", S_OK }, + { &CLSID_DOMDocument2, "CLSID_DOMDocument2", " xmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29'", S_OK }, + + { &CLSID_DOMDocument30, "CLSID_DOMDocument30", "\txmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29'", S_OK }, + { &CLSID_DOMDocument30, "CLSID_DOMDocument30", "\n\rxmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29'", S_OK }, + { &CLSID_DOMDocument30, "CLSID_DOMDocument30", " xmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29'", S_OK }, + + { &CLSID_DOMDocument40, "CLSID_DOMDocument40", "\txmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29'", S_OK }, + { &CLSID_DOMDocument40, "CLSID_DOMDocument40", "\n\rxmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29'", S_OK }, + { &CLSID_DOMDocument40, "CLSID_DOMDocument40", " xmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29'", S_OK }, + + { &CLSID_DOMDocument60, "CLSID_DOMDocument60", "\txmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29'", S_OK }, + { &CLSID_DOMDocument60, "CLSID_DOMDocument60", "\n\rxmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29'", S_OK }, + { &CLSID_DOMDocument60, "CLSID_DOMDocument60", " xmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29'", S_OK }, + + { NULL } +}; + +void test_XPath(void) { + const selection_ns_t *ptr = selection_ns_data; VARIANT var; VARIANT_BOOL b; IXMLDOMDocument2 *doc; @@ -5498,7 +5531,8 @@ static void test_XPath(void) doc = create_document(&IID_IXMLDOMDocument2); if (!doc) return; - ole_check(IXMLDOMDocument2_loadXML(doc, _bstr_(szExampleXML), &b)); + hr = IXMLDOMDocument2_loadXML(doc, _bstr_(szExampleXML), &b); + EXPECT_HR(hr, S_OK); ok(b == VARIANT_TRUE, "failed to load XML string\n"); /* switch to XPath */ @@ -5711,8 +5745,47 @@ static void test_XPath(void) IXMLDOMNode_Release(rootNode); IXMLDOMNodeList_Release(list); IXMLDOMDocument_Release(doc2); - IXMLDOMDocument2_Release(doc); + + while (ptr->clsid) + { + hr = CoCreateInstance(ptr->clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument2, (void**)&doc); + if (hr != S_OK) + { + win_skip("can't create instance of %s\n", ptr->name); + ptr++; + continue; + } + + hr = IXMLDOMDocument2_loadXML(doc, _bstr_(szExampleXML), &b); + EXPECT_HR(hr, S_OK); + ok(b == VARIANT_TRUE, "failed to load, %s\n", ptr->name); + + hr = IXMLDOMDocument2_setProperty(doc, _bstr_("SelectionLanguage"), _variantbstr_("XPath")); + EXPECT_HR(hr, S_OK); + + V_VT(&var) = VT_BSTR; + V_BSTR(&var) = _bstr_(ptr->ns); + + hr = IXMLDOMDocument2_setProperty(doc, _bstr_("SelectionNamespaces"), var); + ok(hr == ptr->hr, "got 0x%08x, for %s, %s\n", hr, ptr->name, ptr->ns); + + V_VT(&var) = VT_EMPTY; + hr = IXMLDOMDocument2_getProperty(doc, _bstr_("SelectionNamespaces"), &var); + EXPECT_HR(hr, S_OK); + ok(V_VT(&var) == VT_BSTR, "got wrong property type %d\n", V_VT(&var)); + ok(!lstrcmpW(V_BSTR(&var), _bstr_(ptr->ns)), "got wrong value %s\n", wine_dbgstr_w(V_BSTR(&var))); + VariantClear(&var); + + hr = IXMLDOMDocument2_selectNodes(doc, _bstr_("root//test:c"), &list); + EXPECT_HR(hr, S_OK); + if (hr == S_OK) + expect_list_and_release(list, "E3.E3.E2.D1 E3.E4.E2.D1"); + + IXMLDOMDocument2_Release(doc); + ptr++; + } + free_bstrs(); }
1
0
0
0
Matteo Bruni : wined3d: Handle discarded depth-stencil surfaces with SFLAG_LOST.
by Alexandre Julliard
13 Jan '12
13 Jan '12
Module: wine Branch: master Commit: c6c5c6905e87fefffd00c7d8e68df22879aefe55 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c6c5c6905e87fefffd00c7d8e…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Jan 12 17:05:20 2012 +0100 wined3d: Handle discarded depth-stencil surfaces with SFLAG_LOST. SFLAG_INSYSMEM is already set by surface_add_dirty_rect() for all surfaces anyway. --- dlls/wined3d/device.c | 2 +- dlls/wined3d/surface.c | 43 ++++++++++++++++++++++++++-------------- dlls/wined3d/swapchain.c | 2 +- dlls/wined3d/wined3d_private.h | 5 ---- 4 files changed, 30 insertions(+), 22 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 8633c65..563a924 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4937,7 +4937,7 @@ HRESULT CDECL wined3d_device_set_depth_stencil(struct wined3d_device *device, st if (device->swapchains[0]->desc.flags & WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL || prev->flags & SFLAG_DISCARD) { - surface_modify_ds_location(prev, SFLAG_DS_DISCARDED, + surface_modify_ds_location(prev, SFLAG_LOST, prev->resource.width, prev->resource.height); if (prev == device->onscreen_depth_stencil) { diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 64e8646..3b21f87 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -764,7 +764,8 @@ static HRESULT surface_private_setup(struct wined3d_surface *surface) return WINED3DERR_INVALIDCALL; } - surface->flags |= SFLAG_INSYSMEM; + if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL) + surface->flags |= SFLAG_LOST; return WINED3D_OK; } @@ -5568,16 +5569,9 @@ void surface_modify_ds_location(struct wined3d_surface *surface, { TRACE("surface %p, new location %#x, w %u, h %u.\n", surface, location, w, h); - if (location & ~SFLAG_LOCATIONS) + if (location & ~(SFLAG_LOCATIONS | SFLAG_LOST)) FIXME("Invalid location (%#x) specified.\n", location); - if (!(surface->flags & SFLAG_ALLOCATED)) - location &= ~SFLAG_INTEXTURE; - if (!(surface->rb_resolved)) - location &= ~SFLAG_INRB_RESOLVED; - if (!(surface->rb_multisample)) - location &= ~SFLAG_INRB_MULTISAMPLE; - if (((surface->flags & SFLAG_INTEXTURE) && !(location & SFLAG_INTEXTURE)) || (!(surface->flags & SFLAG_INTEXTURE) && (location & SFLAG_INTEXTURE))) { @@ -5590,7 +5584,7 @@ void surface_modify_ds_location(struct wined3d_surface *surface, surface->ds_current_size.cx = w; surface->ds_current_size.cy = h; - surface->flags &= ~SFLAG_LOCATIONS; + surface->flags &= ~(SFLAG_LOCATIONS | SFLAG_LOST); surface->flags |= location; } @@ -5631,13 +5625,32 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co return; } + if (surface->flags & SFLAG_LOST) + { + TRACE("Surface was discarded, no need copy data.\n"); + switch (location) + { + case SFLAG_INTEXTURE: + surface_prepare_texture(surface, context, FALSE); + break; + case SFLAG_INRB_MULTISAMPLE: + surface_prepare_rb(surface, context->gl_info, TRUE); + break; + case SFLAG_INDRAWABLE: + /* Nothing to do */ + break; + default: + FIXME("Unhandled location %#x", location); + } + surface->flags &= ~SFLAG_LOST; + surface->flags |= location; + surface->ds_current_size.cx = surface->resource.width; + surface->ds_current_size.cy = surface->resource.height; + return; + } + if (!(surface->flags & SFLAG_LOCATIONS)) { - /* This mostly happens when a depth / stencil is used without being - * cleared first. In principle we could upload from sysmem, or - * explicitly clear before first usage. For the moment there don't - * appear to be a lot of applications depending on this, so a FIXME - * should do. */ FIXME("No up to date depth stencil location.\n"); surface->flags |= location; surface->ds_current_size.cx = surface->resource.width; diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index feefc98..d363b63 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -641,7 +641,7 @@ static HRESULT swapchain_gl_present(struct wined3d_swapchain *swapchain, const R if (swapchain->desc.flags & WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL || fb->depth_stencil->flags & SFLAG_DISCARD) { - surface_modify_ds_location(fb->depth_stencil, SFLAG_DS_DISCARDED, + surface_modify_ds_location(fb->depth_stencil, SFLAG_LOST, fb->depth_stencil->resource.width, fb->depth_stencil->resource.height); if (fb->depth_stencil == swapchain->device->onscreen_depth_stencil) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 80162b2..cc881d4 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2179,11 +2179,6 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back) D SFLAG_INRB_MULTISAMPLE | \ SFLAG_INRB_RESOLVED) -#define SFLAG_DS_DISCARDED (SFLAG_INTEXTURE | \ - SFLAG_INDRAWABLE | \ - SFLAG_INRB_MULTISAMPLE | \ - SFLAG_INRB_RESOLVED) - typedef enum { NO_CONVERSION, CONVERT_PALETTED,
1
0
0
0
Matteo Bruni : wined3d: Modify depth-stencil location flags only after allocating the new location .
by Alexandre Julliard
13 Jan '12
13 Jan '12
Module: wine Branch: master Commit: cbf641e9e03b993b121f523ed397acc8c1b5dfc6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cbf641e9e03b993b121f523ed…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Jan 12 17:05:19 2012 +0100 wined3d: Modify depth-stencil location flags only after allocating the new location. --- dlls/wined3d/device.c | 16 +++++++++------- dlls/wined3d/drawprim.c | 13 ++++++++----- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 1e60439..8633c65 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -600,7 +600,7 @@ static BOOL is_full_clear(const struct wined3d_surface *target, const RECT *draw } static void prepare_ds_clear(struct wined3d_surface *ds, struct wined3d_context *context, - DWORD location, const RECT *draw_rect, UINT rect_count, const RECT *clear_rect) + DWORD location, const RECT *draw_rect, UINT rect_count, const RECT *clear_rect, RECT *out_rect) { RECT current_rect, r; @@ -615,7 +615,7 @@ static void prepare_ds_clear(struct wined3d_surface *ds, struct wined3d_context if (EqualRect(&r, draw_rect)) { /* current_rect ⊇ draw_rect, modify only. */ - surface_modify_ds_location(ds, location, ds->ds_current_size.cx, ds->ds_current_size.cy); + SetRect(out_rect, 0, 0, ds->ds_current_size.cx, ds->ds_current_size.cy); return; } @@ -626,7 +626,7 @@ static void prepare_ds_clear(struct wined3d_surface *ds, struct wined3d_context if (!clear_rect) { /* Full clear, modify only. */ - surface_modify_ds_location(ds, location, draw_rect->right, draw_rect->bottom); + *out_rect = *draw_rect; return; } @@ -634,14 +634,14 @@ static void prepare_ds_clear(struct wined3d_surface *ds, struct wined3d_context if (EqualRect(&r, draw_rect)) { /* clear_rect ⊇ draw_rect, modify only. */ - surface_modify_ds_location(ds, location, draw_rect->right, draw_rect->bottom); + *out_rect = *draw_rect; return; } } /* Full load. */ surface_load_ds_location(ds, context, location); - surface_modify_ds_location(ds, location, ds->ds_current_size.cx, ds->ds_current_size.cy); + SetRect(out_rect, 0, 0, ds->ds_current_size.cx, ds->ds_current_size.cy); } /* Do not call while under the GL lock. */ @@ -656,6 +656,7 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count GLbitfield clear_mask = 0; BOOL render_offscreen; unsigned int i; + RECT ds_rect; /* When we're clearing parts of the drawable, make sure that the target surface is well up to date in the * drawable. After the clear we'll mark the drawable up to date, so we have to make sure that this is true @@ -701,7 +702,8 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count if (!render_offscreen && fb->depth_stencil != device->onscreen_depth_stencil) device_switch_onscreen_ds(device, context, fb->depth_stencil); - prepare_ds_clear(fb->depth_stencil, context, location, draw_rect, rect_count, clear_rect); + prepare_ds_clear(fb->depth_stencil, context, location, + draw_rect, rect_count, clear_rect, &ds_rect); } if (!context_apply_clear_state(context, device, rt_count, fb)) @@ -732,7 +734,7 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count { DWORD location = render_offscreen ? fb->depth_stencil->draw_binding : SFLAG_INDRAWABLE; - surface_modify_location(fb->depth_stencil, location, TRUE); + surface_modify_ds_location(fb->depth_stencil, location, ds_rect.right, ds_rect.bottom); glDepthMask(GL_TRUE); context_invalidate_state(context, STATE_RENDER(WINED3D_RS_ZWRITEENABLE)); diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 707e364..a5e81db 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -634,11 +634,6 @@ void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartId IntersectRect(&r, &draw_rect, ¤t_rect); if (!EqualRect(&r, &draw_rect)) surface_load_ds_location(ds, context, location); - - if (state->render_states[WINED3D_RS_ZWRITEENABLE]) - { - surface_modify_ds_location(ds, location, ds->ds_current_size.cx, ds->ds_current_size.cy); - } } } @@ -649,6 +644,14 @@ void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartId return; } + if (device->fb.depth_stencil && state->render_states[WINED3D_RS_ZWRITEENABLE]) + { + struct wined3d_surface *ds = device->fb.depth_stencil; + DWORD location = context->render_offscreen ? ds->draw_binding : SFLAG_INDRAWABLE; + + surface_modify_ds_location(ds, location, ds->ds_current_size.cx, ds->ds_current_size.cy); + } + if ((!context->gl_info->supported[WINED3D_GL_VERSION_2_0] || (!glPointParameteri && !context->gl_info->supported[NV_POINT_SPRITE])) && context->render_offscreen
1
0
0
0
Matteo Bruni : wined3d: Set depth textures dirty after modifying the underlying surface.
by Alexandre Julliard
13 Jan '12
13 Jan '12
Module: wine Branch: master Commit: add5916c773ac89759e5a167de489df91c2bc461 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=add5916c773ac89759e5a167d…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Jan 12 17:05:18 2012 +0100 wined3d: Set depth textures dirty after modifying the underlying surface. --- dlls/wined3d/surface.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index bf379f1..64e8646 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -5578,6 +5578,16 @@ void surface_modify_ds_location(struct wined3d_surface *surface, if (!(surface->rb_multisample)) location &= ~SFLAG_INRB_MULTISAMPLE; + if (((surface->flags & SFLAG_INTEXTURE) && !(location & SFLAG_INTEXTURE)) + || (!(surface->flags & SFLAG_INTEXTURE) && (location & SFLAG_INTEXTURE))) + { + if (surface->container.type == WINED3D_CONTAINER_TEXTURE) + { + TRACE("Passing to container.\n"); + wined3d_texture_set_dirty(surface->container.u.texture, TRUE); + } + } + surface->ds_current_size.cx = w; surface->ds_current_size.cy = h; surface->flags &= ~SFLAG_LOCATIONS;
1
0
0
0
Matteo Bruni : d3d8/tests: Add more INTZ tests.
by Alexandre Julliard
13 Jan '12
13 Jan '12
Module: wine Branch: master Commit: 5604c7ed99f52b55e6725dbe6d9bcd9843592398 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5604c7ed99f52b55e6725dbe6…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Jan 12 17:05:17 2012 +0100 d3d8/tests: Add more INTZ tests. --- dlls/d3d8/tests/visual.c | 147 +++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 145 insertions(+), 2 deletions(-) diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c index c221d47..dcaa091 100644 --- a/dlls/d3d8/tests/visual.c +++ b/dlls/d3d8/tests/visual.c @@ -1854,6 +1854,20 @@ static void intz_test(IDirect3DDevice8 *device) { 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.5f}, { -1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.5f}, { 1.0f, -1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.5f}, + }, + half_quad_1[] = + { + { -1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.5f}, + { 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.5f}, + { -1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.5f}, + { 1.0f, -1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.5f}, + }, + half_quad_2[] = + { + { -1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.5f}, + { 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.5f}, + { -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.5f}, + { 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.5f}, }; struct { @@ -1888,6 +1902,11 @@ static void intz_test(IDirect3DDevice8 *device) skip("No pixel shader 1.1 support, skipping INTZ test.\n"); return; } + if (caps.TextureCaps & D3DPTEXTURECAPS_POW2) + { + skip("No unconditional NP2 texture support, skipping INTZ test.\n"); + return; + } hr = IDirect3DDevice8_GetDirect3D(device, &d3d8); ok(SUCCEEDED(hr), "GetDirect3D failed, hr %#x.\n", hr); @@ -1907,10 +1926,10 @@ static void intz_test(IDirect3DDevice8 *device) hr = IDirect3DDevice8_GetDepthStencilSurface(device, &original_ds); ok(SUCCEEDED(hr), "GetDepthStencilSurface failed, hr %#x.\n", hr); - hr = IDirect3DDevice8_CreateTexture(device, 1024, 1024, 1, + hr = IDirect3DDevice8_CreateTexture(device, 640, 480, 1, D3DUSAGE_DEPTHSTENCIL, MAKEFOURCC('I','N','T','Z'), D3DPOOL_DEFAULT, &texture); ok(SUCCEEDED(hr), "CreateTexture failed, hr %#x.\n", hr); - hr = IDirect3DDevice8_CreateRenderTarget(device, 1024, 1024, D3DFMT_A8R8G8B8, + hr = IDirect3DDevice8_CreateRenderTarget(device, 640, 480, D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, FALSE, &rt); ok(SUCCEEDED(hr), "CreateRenderTarget failed, hr %#x.\n", hr); hr = IDirect3DDevice8_CreatePixelShader(device, ps_code, &ps); @@ -1953,6 +1972,8 @@ static void intz_test(IDirect3DDevice8 *device) hr = IDirect3DTexture8_GetSurfaceLevel(texture, 0, &ds); ok(SUCCEEDED(hr), "GetSurfaceLevel failed, hr %#x.\n", hr); + + /* Render offscreen, using the INTZ texture as depth buffer */ hr = IDirect3DDevice8_SetRenderTarget(device, rt, ds); ok(SUCCEEDED(hr), "SetRenderTarget failed, hr %#x.\n", hr); IDirect3DDevice8_SetPixelShader(device, 0); @@ -1998,6 +2019,128 @@ static void intz_test(IDirect3DDevice8 *device) hr = IDirect3DDevice8_Present(device, NULL, NULL, NULL, NULL); ok(SUCCEEDED(hr), "Present failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetTexture(device, 0, NULL); + ok(SUCCEEDED(hr), "SetTexture failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetTexture(device, 1, NULL); + ok(SUCCEEDED(hr), "SetTexture failed, hr %#x.\n", hr); + IDirect3DTexture8_Release(texture); + + /* Render onscreen while using the INTZ texture as depth buffer */ + hr = IDirect3DDevice8_CreateTexture(device, 640, 480, 1, + D3DUSAGE_DEPTHSTENCIL, MAKEFOURCC('I','N','T','Z'), D3DPOOL_DEFAULT, &texture); + ok(SUCCEEDED(hr), "CreateTexture failed, hr %#x.\n", hr); + hr = IDirect3DTexture8_GetSurfaceLevel(texture, 0, &ds); + ok(SUCCEEDED(hr), "GetSurfaceLevel failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetRenderTarget(device, original_rt, ds); + ok(SUCCEEDED(hr), "SetRenderTarget failed, hr %#x.\n", hr); + IDirect3DDevice8_SetPixelShader(device, 0); + ok(SUCCEEDED(hr), "SetPixelShader failed, hr %#x.\n", hr); + + hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_ZBUFFER, 0, 0.0f, 0); + ok(SUCCEEDED(hr), "Clear failed, hr %#x.\n", hr); + + hr = IDirect3DDevice8_BeginScene(device); + ok(SUCCEEDED(hr), "BeginScene failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad)); + ok(SUCCEEDED(hr), "DrawPrimitiveUP failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_EndScene(device); + ok(SUCCEEDED(hr), "EndScene failed, hr %#x.\n", hr); + + hr = IDirect3DDevice8_SetRenderTarget(device, original_rt, NULL); + ok(SUCCEEDED(hr), "SetRenderTarget failed, hr %#x.\n", hr); + IDirect3DSurface8_Release(ds); + hr = IDirect3DDevice8_SetTexture(device, 0, (IDirect3DBaseTexture8 *)texture); + ok(SUCCEEDED(hr), "SetTexture failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetTexture(device, 1, (IDirect3DBaseTexture8 *)texture); + ok(SUCCEEDED(hr), "SetTexture failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetPixelShader(device, ps); + ok(SUCCEEDED(hr), "SetPixelShader failed, hr %#x.\n", hr); + + /* Read the depth values back. */ + hr = IDirect3DDevice8_BeginScene(device); + ok(SUCCEEDED(hr), "BeginScene failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad)); + ok(SUCCEEDED(hr), "DrawPrimitiveUP failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_EndScene(device); + ok(SUCCEEDED(hr), "EndScene failed, hr %#x.\n", hr); + + for (i = 0; i < sizeof(expected_colors) / sizeof(*expected_colors); ++i) + { + D3DCOLOR color = getPixelColor(device, expected_colors[i].x, expected_colors[i].y); + ok(color_match(color, expected_colors[i].color, 1), + "Expected color 0x%08x at (%u, %u), got 0x%08x.\n", + expected_colors[i].color, expected_colors[i].x, expected_colors[i].y, color); + } + + hr = IDirect3DDevice8_Present(device, NULL, NULL, NULL, NULL); + ok(SUCCEEDED(hr), "Present failed, hr %#x.\n", hr); + + hr = IDirect3DDevice8_SetTexture(device, 0, NULL); + ok(SUCCEEDED(hr), "SetTexture failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetTexture(device, 1, NULL); + ok(SUCCEEDED(hr), "SetTexture failed, hr %#x.\n", hr); + IDirect3DTexture8_Release(texture); + + /* Render offscreen, then onscreen, and finally check the INTZ texture in both areas */ + hr = IDirect3DDevice8_CreateTexture(device, 640, 480, 1, + D3DUSAGE_DEPTHSTENCIL, MAKEFOURCC('I','N','T','Z'), D3DPOOL_DEFAULT, &texture); + ok(SUCCEEDED(hr), "CreateTexture failed, hr %#x.\n", hr); + hr = IDirect3DTexture8_GetSurfaceLevel(texture, 0, &ds); + ok(SUCCEEDED(hr), "GetSurfaceLevel failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetRenderTarget(device, rt, ds); + ok(SUCCEEDED(hr), "SetRenderTarget failed, hr %#x.\n", hr); + IDirect3DDevice8_SetPixelShader(device, 0); + ok(SUCCEEDED(hr), "SetPixelShader failed, hr %#x.\n", hr); + + hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_ZBUFFER, 0, 0.0f, 0); + ok(SUCCEEDED(hr), "Clear failed, hr %#x.\n", hr); + + hr = IDirect3DDevice8_BeginScene(device); + ok(SUCCEEDED(hr), "BeginScene failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, half_quad_1, sizeof(*half_quad_1)); + ok(SUCCEEDED(hr), "DrawPrimitiveUP failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_EndScene(device); + ok(SUCCEEDED(hr), "EndScene failed, hr %#x.\n", hr); + + hr = IDirect3DDevice8_SetRenderTarget(device, original_rt, ds); + ok(SUCCEEDED(hr), "SetRenderTarget failed, hr %#x.\n", hr); + + hr = IDirect3DDevice8_BeginScene(device); + ok(SUCCEEDED(hr), "BeginScene failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, half_quad_2, sizeof(*half_quad_2)); + ok(SUCCEEDED(hr), "DrawPrimitiveUP failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_EndScene(device); + ok(SUCCEEDED(hr), "EndScene failed, hr %#x.\n", hr); + + hr = IDirect3DDevice8_SetRenderTarget(device, original_rt, NULL); + ok(SUCCEEDED(hr), "SetRenderTarget failed, hr %#x.\n", hr); + IDirect3DSurface8_Release(ds); + hr = IDirect3DDevice8_SetTexture(device, 0, (IDirect3DBaseTexture8 *)texture); + ok(SUCCEEDED(hr), "SetTexture failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetTexture(device, 1, (IDirect3DBaseTexture8 *)texture); + ok(SUCCEEDED(hr), "SetTexture failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetPixelShader(device, ps); + ok(SUCCEEDED(hr), "SetPixelShader failed, hr %#x.\n", hr); + + /* Read the depth values back. */ + hr = IDirect3DDevice8_BeginScene(device); + ok(SUCCEEDED(hr), "BeginScene failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad)); + ok(SUCCEEDED(hr), "DrawPrimitiveUP failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_EndScene(device); + ok(SUCCEEDED(hr), "EndScene failed, hr %#x.\n", hr); + + for (i = 0; i < sizeof(expected_colors) / sizeof(*expected_colors); ++i) + { + D3DCOLOR color = getPixelColor(device, expected_colors[i].x, expected_colors[i].y); + ok(color_match(color, expected_colors[i].color, 1), + "Expected color 0x%08x at (%u, %u), got 0x%08x.\n", + expected_colors[i].color, expected_colors[i].x, expected_colors[i].y, color); + } + + hr = IDirect3DDevice8_Present(device, NULL, NULL, NULL, NULL); + ok(SUCCEEDED(hr), "Present failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetRenderTarget(device, original_rt, original_ds); ok(SUCCEEDED(hr), "SetRenderTarget failed, hr %#x.\n", hr); IDirect3DSurface8_Release(original_ds);
1
0
0
0
Francois Gouget : winhlp32: Standardize the 'Not yet implemented' messages.
by Alexandre Julliard
12 Jan '12
12 Jan '12
Module: wine Branch: master Commit: 5eecdc80e14d2c6cf74a64ac5423dd6ce7c37a3a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5eecdc80e14d2c6cf74a64ac5…
Author: Francois Gouget <fgouget(a)free.fr> Date: Thu Jan 12 17:39:47 2012 +0100 winhlp32: Standardize the 'Not yet implemented' messages. --- po/ar.po | 8 ++------ po/bg.po | 9 ++------- po/ca.po | 8 ++------ po/cs.po | 13 ++----------- po/da.po | 8 ++------ po/de.po | 8 ++------ po/el.po | 9 ++------- po/en.po | 8 ++------ po/en_US.po | 8 ++------ po/eo.po | 9 ++------- po/es.po | 8 ++------ po/fa.po | 8 ++------ po/fi.po | 9 ++------- po/fr.po | 8 ++------ po/he.po | 8 ++------ po/hi.po | 8 ++------ po/hu.po | 9 ++------- po/it.po | 8 ++------ po/ja.po | 8 ++------ po/ko.po | 8 ++------ po/lt.po | 8 ++------ po/ml.po | 8 ++------ po/nb_NO.po | 8 ++------ po/nl.po | 8 ++------ po/or.po | 8 ++------ po/pa.po | 8 ++------ po/pl.po | 8 ++------ po/pt_BR.po | 8 ++------ po/pt_PT.po | 8 ++------ po/rm.po | 9 ++------- po/ro.po | 8 ++------ po/ru.po | 8 ++------ po/sk.po | 9 ++------- po/sl.po | 8 ++------ po/sr_RS(a)cyrillic.po | 9 ++------- po/sr_RS(a)latin.po | 8 ++------ po/sv.po | 8 ++------ po/te.po | 8 ++------ po/th.po | 9 ++------- po/tr.po | 13 ++----------- po/uk.po | 8 ++------ po/wa.po | 9 ++------- po/wine.pot | 8 ++------ po/zh_CN.po | 8 ++------ po/zh_TW.po | 13 ++----------- programs/winhlp32/winhlp32.rc | 4 ++-- 46 files changed, 92 insertions(+), 297 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=5eecdc80e14d2c6cf74a6…
1
0
0
0
Rico Schüller : d3dx9/tests: Reset effect parameter value data after each try.
by Alexandre Julliard
12 Jan '12
12 Jan '12
Module: wine Branch: master Commit: 7825fa833ff9ff719dcd7abb30d4024c9c583d13 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7825fa833ff9ff719dcd7abb3…
Author: Rico Schüller <kgbricola(a)web.de> Date: Thu Jan 12 13:37:15 2012 +0100 d3dx9/tests: Reset effect parameter value data after each try. --- dlls/d3dx9_36/tests/effect.c | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c index f5a9856..6e60e2e 100644 --- a/dlls/d3dx9_36/tests/effect.c +++ b/dlls/d3dx9_36/tests/effect.c @@ -1570,6 +1570,38 @@ static void test_effect_parameter_value_GetTestGroup(const struct test_effect_pa test_effect_parameter_value_GetMatrixTransposeArray(res, effect, res_value, parameter, i); } +static void test_effect_parameter_value_ResetValue(const struct test_effect_parameter_value_result *res, + ID3DXEffect *effect, const DWORD *res_value, D3DXHANDLE parameter, UINT i) +{ + const D3DXPARAMETER_DESC *res_desc = &res->desc; + LPCSTR res_full_name = res->full_name; + HRESULT hr; + + if (res_desc->Class == D3DXPC_SCALAR + || res_desc->Class == D3DXPC_VECTOR + || res_desc->Class == D3DXPC_MATRIX_ROWS) + { + hr = effect->lpVtbl->SetValue(effect, parameter, res_value, res_desc->Bytes); + ok(hr == D3D_OK, "%u - %s: SetValue failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + } + else + { + /* nothing to do */ + switch (res_desc->Type) + { + case D3DXPT_PIXELSHADER: + case D3DXPT_VERTEXSHADER: + case D3DXPT_TEXTURE2D: + case D3DXPT_STRING: + break; + + default: + ok(0, "Type is %u, this should not happen!\n", res_desc->Type); + break; + } + } +} + static void test_effect_parameter_value(IDirect3DDevice9 *device) { UINT i; @@ -1642,6 +1674,8 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) "%u - %s: Warning: Array size to small\n", i, res_full_name); test_effect_parameter_value_GetTestGroup(&res[k], effect, &blob[res_value_offset], parameter, i); + test_effect_parameter_value_ResetValue(&res[k], effect, &blob[res_value_offset], parameter, i); + test_effect_parameter_value_GetTestGroup(&res[k], effect, &blob[res_value_offset], parameter, i); /* SetBool */ bvalue = 1; @@ -1658,6 +1692,7 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) i, res_full_name, hr, D3DERR_INVALIDCALL); } test_effect_parameter_value_GetTestGroup(&res[k], effect, expected_value, parameter, i); + test_effect_parameter_value_ResetValue(&res[k], effect, &blob[res_value_offset], parameter, i); } count = effect->lpVtbl->Release(effect);
1
0
0
0
← Newer
1
...
58
59
60
61
62
63
64
...
98
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
Results per page:
10
25
50
100
200