winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2008
----- 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
734 discussions
Start a n
N
ew thread
Ricardo Filipe : iphlpapi: Fixed dead store (llvm/clang).
by Alexandre Julliard
18 Nov '08
18 Nov '08
Module: wine Branch: master Commit: c3db26d4bcee7f3f3fe8bedc697a50f1fe590852 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c3db26d4bcee7f3f3fe8bedc6…
Author: Ricardo Filipe <ricardo_barbano(a)hotmail.com> Date: Wed Nov 12 23:38:21 2008 +0000 iphlpapi: Fixed dead store (llvm/clang). --- dlls/iphlpapi/icmp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/iphlpapi/icmp.c b/dlls/iphlpapi/icmp.c index 3abdbba..a5858ca 100644 --- a/dlls/iphlpapi/icmp.c +++ b/dlls/iphlpapi/icmp.c @@ -339,7 +339,7 @@ DWORD WINAPI IcmpSendEcho( /* Get the reply */ ip_header_len=0; /* because gcc was complaining */ - while ((res=poll(&fdr,1,Timeout))>0) { + while (poll(&fdr,1,Timeout)>0) { recv_time = GetTickCount(); res=recvfrom(icp->sid, (char*)ip_header, maxlen, 0, (struct sockaddr*)&addr,&addrlen); TRACE("received %d bytes from %s\n",res, inet_ntoa(addr.sin_addr));
1
0
0
0
Ricardo Filipe : gdi32: Fix dead store (llvm/clang).
by Alexandre Julliard
18 Nov '08
18 Nov '08
Module: wine Branch: master Commit: ca3d0d67a89e2f10bb6ca812f835ebe5d7a756b7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ca3d0d67a89e2f10bb6ca812f…
Author: Ricardo Filipe <ricardo_barbano(a)hotmail.com> Date: Wed Nov 12 23:34:01 2008 +0000 gdi32: Fix dead store (llvm/clang). --- dlls/gdi32/bidi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/gdi32/bidi.c b/dlls/gdi32/bidi.c index f53ac26..9ac5e1d 100644 --- a/dlls/gdi32/bidi.c +++ b/dlls/gdi32/bidi.c @@ -1089,7 +1089,7 @@ BOOL BIDI_Reorder( if (WINE_GCPW_FORCE_RTL == (dwWineGCP_Flags&WINE_GCPW_DIR_MASK)) baselevel = 1; - i = done = 0; + done = 0; while (done < uCount) { unsigned j;
1
0
0
0
Ricardo Filipe : dbghelp: Fixed dead store (llvm/clang).
by Alexandre Julliard
18 Nov '08
18 Nov '08
Module: wine Branch: master Commit: b5fcabb52c6ed8e4ba05e9eee4ba3c7850729772 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b5fcabb52c6ed8e4ba05e9eee…
Author: Ricardo Filipe <ricardo_barbano(a)hotmail.com> Date: Wed Nov 12 23:15:08 2008 +0000 dbghelp: Fixed dead store (llvm/clang). --- dlls/dbghelp/dbghelp.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/dlls/dbghelp/dbghelp.c b/dlls/dbghelp/dbghelp.c index fba22d0..1bfc338 100644 --- a/dlls/dbghelp/dbghelp.c +++ b/dlls/dbghelp/dbghelp.c @@ -314,7 +314,6 @@ BOOL WINAPI SymInitializeW(HANDLE hProcess, PCWSTR UserSearchPath, BOOL fInvadeP pcs->search_path = HeapReAlloc(GetProcessHeap(), 0, pcs->search_path, (size + 1 + len + 1) * sizeof(WCHAR)); pcs->search_path[size] = ';'; GetEnvironmentVariableW(alt_sym_path, pcs->search_path + size + 1, len); - size += 1 + len; } }
1
0
0
0
Ricardo Filipe : cabinet: Fix dead stores (llvm/clang).
by Alexandre Julliard
18 Nov '08
18 Nov '08
Module: wine Branch: master Commit: 1a12aace576ad0a1ed3f17498d3e015bd98595e8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1a12aace576ad0a1ed3f17498…
Author: Ricardo Filipe <ricardo_barbano(a)hotmail.com> Date: Wed Nov 12 22:50:09 2008 +0000 cabinet: Fix dead stores (llvm/clang). --- dlls/cabinet/fci.c | 2 +- dlls/cabinet/fdi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/cabinet/fci.c b/dlls/cabinet/fci.c index ea745a6..ed413f8 100644 --- a/dlls/cabinet/fci.c +++ b/dlls/cabinet/fci.c @@ -462,7 +462,7 @@ static cab_ULONG fci_get_checksum(const void *pv, UINT cb, CHECKSUM seed) case 2: ul |= (((ULONG)(*pb++)) << 8); case 1: - ul |= *pb++; + ul |= *pb; default: break; } diff --git a/dlls/cabinet/fdi.c b/dlls/cabinet/fdi.c index 0825162..09d0fe7 100644 --- a/dlls/cabinet/fdi.c +++ b/dlls/cabinet/fdi.c @@ -2830,7 +2830,7 @@ BOOL __cdecl FDICopy( if (file->offset > CAB(offset)) { /* decode bytes and send them to /dev/null */ - switch ((err = fdi_decomp(file, 0, decomp_state, pszCabPath, pfnfdin, pvUser))) { + switch (fdi_decomp(file, 0, decomp_state, pszCabPath, pfnfdin, pvUser)) { case DECR_OK: break; case DECR_USERABORT:
1
0
0
0
Francois Gouget : msxml3: Dynamically load libxslt. so and only call xsltInit() if present.
by Alexandre Julliard
18 Nov '08
18 Nov '08
Module: wine Branch: master Commit: 3d384f172cb5fcabf441bd1c64cb4760df013781 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3d384f172cb5fcabf441bd1c6…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Mon Nov 17 19:29:32 2008 +0100 msxml3: Dynamically load libxslt.so and only call xsltInit() if present. --- configure | 142 ++++++------------------------------------ configure.ac | 13 +--- dlls/msxml3/Makefile.in | 2 +- dlls/msxml3/main.c | 57 +++++++++++++++--- dlls/msxml3/msxml_private.h | 21 ++++++ dlls/msxml3/node.c | 21 ++----- include/config.h.in | 9 +-- 7 files changed, 103 insertions(+), 162 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=3d384f172cb5fcabf441b…
1
0
0
0
Alexandre Julliard : ntdll: Increase subheap size quadratically to avoid slowdown when allocating tons of heap memory .
by Alexandre Julliard
18 Nov '08
18 Nov '08
Module: wine Branch: master Commit: c38ce28af574b60e0ca0733d88a85c53e35082ad URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c38ce28af574b60e0ca0733d8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 18 12:49:12 2008 +0100 ntdll: Increase subheap size quadratically to avoid slowdown when allocating tons of heap memory. --- dlls/ntdll/heap.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index d94e1f0..99a68d2 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -142,9 +142,10 @@ typedef struct tagHEAP struct list entry; /* Entry in process heap list */ struct list subheap_list; /* Sub-heap list */ struct list large_list; /* Large blocks list */ + SIZE_T grow_size; /* Size of next subheap for growing heap */ DWORD magic; /* Magic number */ RTL_CRITICAL_SECTION critSection; /* Critical section for serialization */ - FREE_LIST_ENTRY freeList[HEAP_NB_FREE_LISTS]; /* Free lists */ + FREE_LIST_ENTRY freeList[HEAP_NB_FREE_LISTS] DECLSPEC_ALIGN(8); /* Free lists */ } HEAP; #define HEAP_MAGIC ((DWORD)('H' | ('E'<<8) | ('A'<<16) | ('P'<<24))) @@ -808,6 +809,7 @@ static SUBHEAP *HEAP_CreateSubHeap( HEAP *heap, LPVOID address, DWORD flags, heap = (HEAP *)address; heap->flags = flags; heap->magic = HEAP_MAGIC; + heap->grow_size = max( HEAP_DEF_SIZE, totalSize ); list_init( &heap->subheap_list ); list_init( &heap->large_list ); @@ -918,11 +920,13 @@ static ARENA_FREE *HEAP_FindFreeBlock( HEAP *heap, SIZE_T size, if (total_size < size) return NULL; /* overflow */ if (!(subheap = HEAP_CreateSubHeap( heap, NULL, heap->flags, total_size, - max( HEAP_DEF_SIZE, total_size ) ))) + max( heap->grow_size, total_size ) ))) return NULL; + if (heap->grow_size < 128 * 1024 * 1024) heap->grow_size *= 2; + TRACE("created new sub-heap %p of %08lx bytes for heap %p\n", - subheap, total_size, heap ); + subheap, subheap->size, heap ); *ppSubHeap = subheap; return (ARENA_FREE *)((char *)subheap->base + subheap->headerSize);
1
0
0
0
Henri Verbeet : wininet: Treat an empty username as NULL in FTP_Connect().
by Alexandre Julliard
18 Nov '08
18 Nov '08
Module: wine Branch: master Commit: 369da3aeb9d044866f53bc250768e18401027201 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=369da3aeb9d044866f53bc250…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Nov 18 09:27:59 2008 +0100 wininet: Treat an empty username as NULL in FTP_Connect(). --- dlls/wininet/ftp.c | 4 ++-- dlls/wininet/tests/ftp.c | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/dlls/wininet/ftp.c b/dlls/wininet/ftp.c index cb24782..9ad34df 100644 --- a/dlls/wininet/ftp.c +++ b/dlls/wininet/ftp.c @@ -2256,7 +2256,7 @@ HINTERNET FTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName, assert( hIC->hdr.htype == WH_HINIT ); - if (NULL == lpszUserName && NULL != lpszPassword) + if ((!lpszUserName || !strlenW(lpszUserName)) && lpszPassword) { INTERNET_SetLastError(ERROR_INVALID_PARAMETER); goto lerror; @@ -2302,7 +2302,7 @@ HINTERNET FTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName, if(hIC->lpszProxyBypass) FIXME("Proxy bypass is ignored.\n"); } - if ( !lpszUserName) { + if (!lpszUserName || !strlenW(lpszUserName)) { HKEY key; WCHAR szPassword[MAX_PATH]; DWORD len = sizeof(szPassword); diff --git a/dlls/wininet/tests/ftp.c b/dlls/wininet/tests/ftp.c index 335215e..f7dc9c9 100644 --- a/dlls/wininet/tests/ftp.c +++ b/dlls/wininet/tests/ftp.c @@ -66,6 +66,8 @@ static void test_connect(HINTERNET hInternet) * anonymous : NULL * NULL : IEUser@ * NULL : NULL + * "" : IEUser@ + * "" : NULL */ SetLastError(0xdeadbeef); @@ -85,6 +87,13 @@ static void test_connect(HINTERNET hInternet) ok ( GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + SetLastError(0xdeadbeef); + hFtp = InternetConnect(hInternet, "
ftp.winehq.org
", INTERNET_DEFAULT_FTP_PORT, "", "IEUser@", + INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE, 0); + ok(!hFtp, "Expected InternetConnect to fail\n"); + ok(GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + /* Using a NULL username and password will be interpreted as anonymous ftp. The username will be 'anonymous' the password * is created via some simple heuristics (see dlls/wininet/ftp.c). * On Wine this registry key is not set by default so (NULL, NULL) will result in anonymous ftp with an (most likely) not @@ -103,6 +112,20 @@ static void test_connect(HINTERNET hInternet) ok ( hFtp != NULL, "InternetConnect failed : %d\n", GetLastError()); ok ( GetLastError() == ERROR_SUCCESS, "ERROR_SUCCESS, got %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + hFtp = InternetConnect(hInternet, "
ftp.winehq.org
", INTERNET_DEFAULT_FTP_PORT, "", NULL, + INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE, 0); + if (!hFtp) + { + ok(GetLastError() == ERROR_INTERNET_LOGIN_FAILURE, + "Expected ERROR_INTERNET_LOGIN_FAILURE, got %d\n", GetLastError()); + } + else + { + ok(GetLastError() == ERROR_SUCCESS, + "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + } } static void test_createdir(HINTERNET hFtp, HINTERNET hConnect)
1
0
0
0
Alexander Morozov : include: Remove declarations of undefined functions.
by Alexandre Julliard
18 Nov '08
18 Nov '08
Module: wine Branch: master Commit: 3a3b75e177fbecd146d8dfe58763c58190663c7c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3a3b75e177fbecd146d8dfe58…
Author: Alexander Morozov <amorozov(a)etersoft.ru> Date: Tue Nov 18 13:04:47 2008 +0300 include: Remove declarations of undefined functions. --- include/wine/library.h | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/include/wine/library.h b/include/wine/library.h index 5843fe2..2411ae1 100644 --- a/include/wine/library.h +++ b/include/wine/library.h @@ -73,8 +73,6 @@ extern void wine_init( int argc, char *argv[], char *error, int error_size ); extern void DECLSPEC_NORETURN wine_switch_to_stack( void (*func)(void *), void *arg, void *stack ); extern int wine_call_on_stack( int (*func)(void *), void *arg, void *stack ); -extern void wine_set_pe_load_area( void *base, size_t size ); -extern void wine_free_pe_load_area(void); /* memory mappings */
1
0
0
0
Henri Verbeet : d3d10core: Add a test for D3D10CoreCreateDevice().
by Alexandre Julliard
18 Nov '08
18 Nov '08
Module: wine Branch: master Commit: 1dad75955dcbc757bead4b1f837205fafc27d5f5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1dad75955dcbc757bead4b1f8…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Nov 18 09:27:58 2008 +0100 d3d10core: Add a test for D3D10CoreCreateDevice(). --- configure | 9 +++ configure.ac | 1 + dlls/d3d10core/tests/Makefile.in | 13 ++++ dlls/d3d10core/tests/device.c | 113 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 136 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 5845633..8fac4cb 100755 --- a/configure +++ b/configure @@ -24298,6 +24298,14 @@ dlls/d3d10core/Makefile: dlls/d3d10core/Makefile.in dlls/Makedll.rules" ac_config_files="$ac_config_files dlls/d3d10core/Makefile" ALL_MAKEFILES="$ALL_MAKEFILES \\ + dlls/d3d10core/tests/Makefile" +test "x$enable_d3d10core_tests" != xno && ALL_TEST_DIRS="$ALL_TEST_DIRS \\ + d3d10core/tests" +ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS +dlls/d3d10core/tests/Makefile: dlls/d3d10core/tests/Makefile.in dlls/Maketest.rules" +ac_config_files="$ac_config_files dlls/d3d10core/tests/Makefile" + +ALL_MAKEFILES="$ALL_MAKEFILES \\ dlls/d3d8/Makefile" test "x$enable_d3d8" != xno && ALL_DLL_DIRS="$ALL_DLL_DIRS \\ d3d8" @@ -28104,6 +28112,7 @@ do "dlls/d3d10/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3d10/Makefile" ;; "dlls/d3d10/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3d10/tests/Makefile" ;; "dlls/d3d10core/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3d10core/Makefile" ;; + "dlls/d3d10core/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3d10core/tests/Makefile" ;; "dlls/d3d8/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3d8/Makefile" ;; "dlls/d3d8/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3d8/tests/Makefile" ;; "dlls/d3d9/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3d9/Makefile" ;; diff --git a/configure.ac b/configure.ac index 19acfd6..947bde9 100644 --- a/configure.ac +++ b/configure.ac @@ -1777,6 +1777,7 @@ WINE_CONFIG_MAKEFILE([dlls/ctl3d32/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DL WINE_CONFIG_MAKEFILE([dlls/d3d10/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) WINE_CONFIG_MAKEFILE([dlls/d3d10/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS]) WINE_CONFIG_MAKEFILE([dlls/d3d10core/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) +WINE_CONFIG_MAKEFILE([dlls/d3d10core/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS]) WINE_CONFIG_MAKEFILE([dlls/d3d8/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) WINE_CONFIG_MAKEFILE([dlls/d3d8/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS]) WINE_CONFIG_MAKEFILE([dlls/d3d9/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) diff --git a/dlls/d3d10core/tests/Makefile.in b/dlls/d3d10core/tests/Makefile.in new file mode 100644 index 0000000..7003f7c --- /dev/null +++ b/dlls/d3d10core/tests/Makefile.in @@ -0,0 +1,13 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +TESTDLL = d3d10core.dll +IMPORTS = d3d10core dxgi kernel32 + +CTESTS = \ + device.c \ + +@MAKE_TEST_RULES@ + +@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c new file mode 100644 index 0000000..8a01222 --- /dev/null +++ b/dlls/d3d10core/tests/device.c @@ -0,0 +1,113 @@ +/* + * Copyright 2008 Henri Verbeet for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define COBJMACROS +#include "initguid.h" +#include "d3d10.h" +#include "wine/test.h" + +HRESULT WINAPI D3D10CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter, + UINT flags, DWORD unknown0, ID3D10Device **device); + +static ID3D10Device *create_device(void) +{ + IDXGIFactory *factory = NULL; + IDXGIAdapter *adapter = NULL; + ID3D10Device *device = NULL; + HRESULT hr; + + hr = CreateDXGIFactory(&IID_IDXGIFactory, (void *)&factory); + ok(SUCCEEDED(hr), "CreateDXGIFactory failed, hr %#x\n", hr); + if (FAILED(hr)) goto cleanup; + + hr = IDXGIFactory_EnumAdapters(factory, 0, &adapter); + ok(SUCCEEDED(hr), "EnumAdapters failed, hr %#x\n", hr); + if (FAILED(hr)) goto cleanup; + + hr = D3D10CoreCreateDevice(factory, adapter, 0, 0, &device); + if (FAILED(hr)) + { + HMODULE d3d10ref; + + trace("Failed to create a HW device, trying REF\n"); + IDXGIAdapter_Release(adapter); + adapter = NULL; + + d3d10ref = LoadLibraryA("d3d10ref.dll"); + if (!d3d10ref) + { + trace("d3d10ref.dll not available, unable to create a REF device\n"); + goto cleanup; + } + + hr = IDXGIFactory_CreateSoftwareAdapter(factory, d3d10ref, &adapter); + FreeLibrary(d3d10ref); + ok(SUCCEEDED(hr), "CreateSoftwareAdapter failed, hr %#x\n", hr); + if (FAILED(hr)) goto cleanup; + + hr = D3D10CoreCreateDevice(factory, adapter, 0, 0, &device); + ok(SUCCEEDED(hr), "Failed to create a REF device, hr %#x\n", hr); + if (FAILED(hr)) goto cleanup; + } + +cleanup: + if (adapter) IDXGIAdapter_Release(adapter); + if (factory) IDXGIFactory_Release(factory); + + return device; +} + +static void test_device_interfaces(ID3D10Device *device) +{ + IUnknown *obj; + HRESULT hr; + + if (SUCCEEDED(hr = ID3D10Device_QueryInterface(device, &IID_IUnknown, (void **)&obj))) + IUnknown_Release(obj); + ok(SUCCEEDED(hr), "ID3D10Device does not implement IUnknown\n"); + + if (SUCCEEDED(hr = ID3D10Device_QueryInterface(device, &IID_IDXGIObject, (void **)&obj))) + IUnknown_Release(obj); + ok(SUCCEEDED(hr), "ID3D10Device does not implement IDXGIObject\n"); + + if (SUCCEEDED(hr = ID3D10Device_QueryInterface(device, &IID_IDXGIDevice, (void **)&obj))) + IUnknown_Release(obj); + ok(SUCCEEDED(hr), "ID3D10Device does not implement IDXGIDevice\n"); + + if (SUCCEEDED(hr = ID3D10Device_QueryInterface(device, &IID_ID3D10Device, (void **)&obj))) + IUnknown_Release(obj); + ok(SUCCEEDED(hr), "ID3D10Device does not implement ID3D10Device\n"); +} + +START_TEST(device) +{ + ID3D10Device *device; + ULONG refcount; + + device = create_device(); + if (!device) + { + skip("Failed to create device, skipping tests\n"); + return; + } + + test_device_interfaces(device); + + refcount = ID3D10Device_Release(device); + ok(!refcount, "Device has %u references left\n", refcount); +}
1
0
0
0
Henri Verbeet : dxgi: Add a test for DXGID3D10CreateDevice().
by Alexandre Julliard
18 Nov '08
18 Nov '08
Module: wine Branch: master Commit: 1dea8291fb4187fe5ca392d2ba41d75e81efdc38 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1dea8291fb4187fe5ca392d2b…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Nov 18 09:27:58 2008 +0100 dxgi: Add a test for DXGID3D10CreateDevice(). --- configure | 9 +++ configure.ac | 1 + dlls/dxgi/tests/Makefile.in | 13 +++++ dlls/dxgi/tests/device.c | 127 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 150 insertions(+), 0 deletions(-) diff --git a/configure b/configure index af1a5a2..5845633 100755 --- a/configure +++ b/configure @@ -24802,6 +24802,14 @@ dlls/dxgi/Makefile: dlls/dxgi/Makefile.in dlls/Makedll.rules" ac_config_files="$ac_config_files dlls/dxgi/Makefile" ALL_MAKEFILES="$ALL_MAKEFILES \\ + dlls/dxgi/tests/Makefile" +test "x$enable_dxgi_tests" != xno && ALL_TEST_DIRS="$ALL_TEST_DIRS \\ + dxgi/tests" +ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS +dlls/dxgi/tests/Makefile: dlls/dxgi/tests/Makefile.in dlls/Maketest.rules" +ac_config_files="$ac_config_files dlls/dxgi/tests/Makefile" + +ALL_MAKEFILES="$ALL_MAKEFILES \\ dlls/dxguid/Makefile" test "x$enable_dxguid" != xno && ALL_IMPLIB_DIRS="$ALL_IMPLIB_DIRS \\ dxguid" @@ -28159,6 +28167,7 @@ do "dlls/dxerr8/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/dxerr8/Makefile" ;; "dlls/dxerr9/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/dxerr9/Makefile" ;; "dlls/dxgi/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/dxgi/Makefile" ;; + "dlls/dxgi/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/dxgi/tests/Makefile" ;; "dlls/dxguid/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/dxguid/Makefile" ;; "dlls/faultrep/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/faultrep/Makefile" ;; "dlls/fusion/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/fusion/Makefile" ;; diff --git a/configure.ac b/configure.ac index 71c2a45..19acfd6 100644 --- a/configure.ac +++ b/configure.ac @@ -1840,6 +1840,7 @@ WINE_CONFIG_MAKEFILE([dlls/dxdiagn/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DL WINE_CONFIG_MAKEFILE([dlls/dxerr8/Makefile],[dlls/Makeimplib.rules],[dlls],[ALL_IMPLIB_DIRS]) WINE_CONFIG_MAKEFILE([dlls/dxerr9/Makefile],[dlls/Makeimplib.rules],[dlls],[ALL_IMPLIB_DIRS]) WINE_CONFIG_MAKEFILE([dlls/dxgi/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) +WINE_CONFIG_MAKEFILE([dlls/dxgi/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS]) WINE_CONFIG_MAKEFILE([dlls/dxguid/Makefile],[dlls/Makeimplib.rules],[dlls],[ALL_IMPLIB_DIRS]) WINE_CONFIG_MAKEFILE([dlls/faultrep/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) WINE_CONFIG_MAKEFILE([dlls/fusion/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) diff --git a/dlls/dxgi/tests/Makefile.in b/dlls/dxgi/tests/Makefile.in new file mode 100644 index 0000000..1020225 --- /dev/null +++ b/dlls/dxgi/tests/Makefile.in @@ -0,0 +1,13 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +TESTDLL = dxgi.dll +IMPORTS = dxgi kernel32 + +CTESTS = \ + device.c \ + +@MAKE_TEST_RULES@ + +@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/dxgi/tests/device.c b/dlls/dxgi/tests/device.c new file mode 100644 index 0000000..7f22bb4 --- /dev/null +++ b/dlls/dxgi/tests/device.c @@ -0,0 +1,127 @@ +/* + * Copyright 2008 Henri Verbeet for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define COBJMACROS +#include "initguid.h" +#include "d3d10.h" +#include "wine/test.h" + +HRESULT WINAPI DXGID3D10CreateDevice(HMODULE d3d10core, IDXGIFactory *factory, + IDXGIAdapter *adapter, UINT flags, DWORD arg5, void **device); + +static IDXGIDevice *create_device(HMODULE d3d10core) +{ + IDXGIDevice *dxgi_device = NULL; + IDXGIFactory *factory = NULL; + IDXGIAdapter *adapter = NULL; + IUnknown *device = NULL; + HRESULT hr; + + hr = CreateDXGIFactory(&IID_IDXGIFactory, (void *)&factory); + ok(SUCCEEDED(hr), "CreateDXGIFactory failed, hr %#x\n", hr); + if (FAILED(hr)) goto cleanup; + + hr = IDXGIFactory_EnumAdapters(factory, 0, &adapter); + ok(SUCCEEDED(hr), "EnumAdapters failed, hr %#x\n", hr); + if (FAILED(hr)) goto cleanup; + + hr = DXGID3D10CreateDevice(d3d10core, factory, adapter, 0, 0, (void **)&device); + if (FAILED(hr)) + { + HMODULE d3d10ref; + + trace("Failed to create a HW device, trying REF\n"); + IDXGIAdapter_Release(adapter); + adapter = NULL; + + d3d10ref = LoadLibraryA("d3d10ref.dll"); + if (!d3d10ref) + { + trace("d3d10ref.dll not available, unable to create a REF device\n"); + goto cleanup; + } + + hr = IDXGIFactory_CreateSoftwareAdapter(factory, d3d10ref, &adapter); + FreeLibrary(d3d10ref); + ok(SUCCEEDED(hr), "CreateSoftwareAdapter failed, hr %#x\n", hr); + if (FAILED(hr)) goto cleanup; + + hr = DXGID3D10CreateDevice(d3d10core, factory, adapter, 0, 0, (void **)&device); + ok(SUCCEEDED(hr), "Failed to create a REF device, hr %#x\n", hr); + if (FAILED(hr)) goto cleanup; + } + + hr = IUnknown_QueryInterface(device, &IID_IDXGIDevice, (void **)&dxgi_device); + ok(SUCCEEDED(hr), "Created device does not implement IDXGIDevice\n"); + IUnknown_Release(device); + +cleanup: + if (adapter) IDXGIAdapter_Release(adapter); + if (factory) IDXGIFactory_Release(factory); + + return dxgi_device; +} + +static void test_device_interfaces(IDXGIDevice *device) +{ + IUnknown *obj; + HRESULT hr; + + if (SUCCEEDED(hr = IDXGIDevice_QueryInterface(device, &IID_IUnknown, (void **)&obj))) + IUnknown_Release(obj); + ok(SUCCEEDED(hr), "IDXGIDevice does not implement IUnknown\n"); + + if (SUCCEEDED(hr = IDXGIDevice_QueryInterface(device, &IID_IDXGIObject, (void **)&obj))) + IUnknown_Release(obj); + ok(SUCCEEDED(hr), "IDXGIDevice does not implement IDXGIObject\n"); + + if (SUCCEEDED(hr = IDXGIDevice_QueryInterface(device, &IID_IDXGIDevice, (void **)&obj))) + IUnknown_Release(obj); + ok(SUCCEEDED(hr), "IDXGIDevice does not implement IDXGIDevice\n"); + + if (SUCCEEDED(hr = IDXGIDevice_QueryInterface(device, &IID_ID3D10Device, (void **)&obj))) + IUnknown_Release(obj); + ok(SUCCEEDED(hr), "IDXGIDevice does not implement ID3D10Device\n"); +} + +START_TEST(device) +{ + HMODULE d3d10core = LoadLibraryA("d3d10core.dll"); + IDXGIDevice *device; + ULONG refcount; + + if (!d3d10core) + { + win_skip("d3d10core.dll not available, skipping tests\n"); + return; + } + + device = create_device(d3d10core); + if (!device) + { + skip("Failed to create device, skipping tests\n"); + FreeLibrary(d3d10core); + return; + } + + test_device_interfaces(device); + + refcount = IDXGIDevice_Release(device); + ok(!refcount, "Device has %u references left\n", refcount); + FreeLibrary(d3d10core); +}
1
0
0
0
← Newer
1
...
27
28
29
30
31
32
33
...
74
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
Results per page:
10
25
50
100
200