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
August 2009
----- 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
4 participants
1042 discussions
Start a n
N
ew thread
Vincent Povirk : include: Add IWICBitmapDecoderInfo to headers.
by Alexandre Julliard
05 Aug '09
05 Aug '09
Module: wine Branch: master Commit: d89b470e18ed375f38e54d5b1b61202eadd601ad URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d89b470e18ed375f38e54d5b1…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Tue Jul 14 17:20:04 2009 -0500 include: Add IWICBitmapDecoderInfo to headers. --- include/wincodec.idl | 146 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 144 insertions(+), 2 deletions(-) diff --git a/include/wincodec.idl b/include/wincodec.idl index 5850bea..8e411a6 100644 --- a/include/wincodec.idl +++ b/include/wincodec.idl @@ -69,6 +69,23 @@ typedef enum WICBitmapPaletteType { WICBITMAPPALETTETYPE_FORCE_DWORD = CODEC_FORCE_DWORD } WICBitmapPaletteType; +typedef enum WICComponentType { + WICDecoder = 0x00000001, + WICEncoder = 0x00000002, + WICPixelFormatConverter = 0x00000004, + WICMetadataReader = 0x00000008, + WICMetadataWriter = 0x00000010, + WICPixelFormat = 0x00000020, + WICCOMPONENTTYPE_FORCE_DWORD = CODEC_FORCE_DWORD +} WICComponentType; + +typedef enum WICComponentSigning { + WICComponentSigned = 0x00000001, + WICComponentUnsigned = 0x00000002, + WICComponentSafe = 0x00000004, + WICComponentDisabled = 0x80000000 +} WICComponentSigning; + typedef GUID WICPixelFormatGUID; typedef REFGUID REFWICPixelFormatGUID; @@ -91,15 +108,23 @@ typedef struct WICRect { INT Height; } WICRect; +typedef struct WICBitmapPattern { + ULARGE_INTEGER Position; + ULONG Length; + BYTE *Pattern; + BYTE *Mask; + BOOL EndOfStream; +} WICBitmapPattern; + typedef UINT32 WICColor; cpp_quote("#define WINCODEC_ERR_WRONGSTATE 0x88982f04") cpp_quote("#define WINCODEC_ERR_CODECNOTHUMBNAIL 0x88982f44") cpp_quote("#define WINCODEC_ERR_PALETTEUNAVAILABLE 0x88982f45") cpp_quote("#define WINCODEC_ERR_UNSUPPORTEDOPERATION 0x88982f81") +cpp_quote("#define WINCODEC_ERR_INSUFFICIENTBUFFER 0x88982f8c") interface IWICBitmap; -interface IWICComponentInfo; interface IWICBitmapEncoder; interface IWICPalette; interface IWICFormatConverter; @@ -112,7 +137,6 @@ interface IWICColorTransform; interface IWICFastMetadataEncoder; interface IWICMetadataQueryReader; interface IWICMetadataQueryWriter; -interface IWICBitmapDecoderInfo; [ object, @@ -186,6 +210,45 @@ interface IWICPalette : IUnknown [ object, + uuid(23bc3f0a-698b-4357-886b-f24d50671334) +] +interface IWICComponentInfo : IUnknown +{ + HRESULT GetComponentType( + [out] WICComponentType *pType); + + HRESULT GetCLSID( + [out] CLSID *pclsid); + + HRESULT GetSigningStatus( + [out] DWORD *pStatus); + + HRESULT GetAuthor( + [in] UINT cchAuthor, + [in, out, unique, size_is(cchAuthor)] WCHAR *wzAuthor, + [out] UINT *pcchActual); + + HRESULT GetVendorGUID( + [out] GUID *pguidVendor); + + HRESULT GetVersion( + [in] UINT cchVersion, + [in, out, unique, size_is(cchVersion)] WCHAR *wzVersion, + [out] UINT *pcchActual); + + HRESULT GetSpecVersion( + [in] UINT cchSpecVersion, + [in, out, unique, size_is(cchSpecVersion)] WCHAR *wzSpecVersion, + [out] UINT *pcchActual); + + HRESULT GetFriendlyName( + [in] UINT cchFriendlyName, + [in, out, unique, size_is(cchFriendlyName)] WCHAR *wzFriendlyName, + [out] UINT *pcchActual); +} + +[ + object, uuid(3b16811b-6a43-4ec9-a813-3d930c13b940) ] interface IWICBitmapFrameDecode : IWICBitmapSource @@ -204,6 +267,85 @@ interface IWICBitmapFrameDecode : IWICBitmapSource [ object, + uuid(e87a44c4-b76e-4c47-8b09-298eb12a2714) +] +interface IWICBitmapCodecInfo : IWICComponentInfo +{ + HRESULT GetContainerFormat( + [out] GUID *pguidContainerFormat); + + HRESULT GetPixelFormats( + [in] UINT cFormats, + [in, out, unique, size_is(cFormats)] GUID *pguidPixelFormats, + [out] UINT *pcActual); + + HRESULT GetColorManagementVersion( + [in] UINT cchColorManagementVersion, + [in, out, unique, size_is(cchColorManagementVersion)] WCHAR *wzColorManagementVersion, + [out] UINT *pcchActual); + + HRESULT GetDeviceManufacturer( + [in] UINT cchDeviceManufacturer, + [in, out, unique, size_is(cchDeviceManufacturer)] WCHAR *wzDeviceManufacturer, + [out] UINT *pcchActual); + + HRESULT GetDeviceModels( + [in] UINT cchDeviceModels, + [in, out, unique, size_is(cchDeviceModels)] WCHAR *wzDeviceModels, + [out] UINT *pcchActual); + + HRESULT GetMimeTypes( + [in] UINT cchMimeTypes, + [in, out, unique, size_is(cchMimeTypes)] WCHAR *wzMimeTypes, + [out] UINT *pcchActual); + + HRESULT GetFileExtensions( + [in] UINT cchFileExtensions, + [in, out, unique, size_is(cchFileExtensions)] WCHAR *wzFileExtensions, + [out] UINT *pcchActual); + + HRESULT DoesSupportAnimation( + [out] BOOL *pfSupportAnimation); + + HRESULT DoesSupportChromaKey( + [out] BOOL *pfSupportChromaKey); + + HRESULT DoesSupportLossless( + [out] BOOL *pfSupportLossless); + + HRESULT DoesSupportMultiframe( + [out] BOOL *pfSupportMultiframe); + + HRESULT MatchesMimeType( + [in] LPCWSTR wzMimeType, + [out] BOOL *pfMatches); +} + +interface IWICBitmapDecoder; + +[ + object, + uuid(d8cd007f-d08f-4191-9bfc-236ea7f0e4b5) +] +interface IWICBitmapDecoderInfo : IWICBitmapCodecInfo +{ + [local] + HRESULT GetPatterns( + [in] UINT cbSizePatterns, + [in, out, unique] WICBitmapPattern *pPatterns, + [in, out, unique] UINT *pcPatterns, + [in, out, unique] UINT *pcbPatternsActual); + + HRESULT MatchesPattern( + [in] IStream *pIStream, + [out] BOOL *pfMatches); + + HRESULT CreateInstance( + [out] IWICBitmapDecoder **ppIBitmapDecoder); +} + +[ + object, uuid(9edde9e7-8dee-47ea-99df-e6faf2ed44bf) ] interface IWICBitmapDecoder : IUnknown
1
0
0
0
Stefan Leichter : shell32: Make the tests of the value returned from function SHGetFileInfoA more strick , fix wine to pass the tests.
by Alexandre Julliard
05 Aug '09
05 Aug '09
Module: wine Branch: master Commit: a14256f621966b488c2257ebdaad2e7fc44fdd25 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a14256f621966b488c2257ebd…
Author: Stefan Leichter <Stefan.Leichter(a)camline.com> Date: Tue Aug 4 22:52:09 2009 +0200 shell32: Make the tests of the value returned from function SHGetFileInfoA more strick, fix wine to pass the tests. --- dlls/shell32/shell32_main.c | 7 ++++++- dlls/shell32/tests/shlfileop.c | 33 +++++++++++++++++++++++---------- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c index 41c2d59..fdc22d2 100644 --- a/dlls/shell32/shell32_main.c +++ b/dlls/shell32/shell32_main.c @@ -621,7 +621,7 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, ret = FALSE; } } - if (ret) + if (ret && (flags & SHGFI_SYSICONINDEX)) { if (flags & SHGFI_SMALLICON) ret = (DWORD_PTR) ShellSmallIconList; @@ -661,6 +661,11 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, /************************************************************************* * SHGetFileInfoA [SHELL32.@] + * + * Note: + * MSVBVM60.__vbaNew2 expects this function to return a value in range + * 1 .. 0x7fff when the function succeeds and flags does not contain + * SHGFI_EXETYPE or SHGFI_SYSICONINDEX (see bug 7701) */ DWORD_PTR WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes, SHFILEINFOA *psfi, UINT sizeofpsfi, diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c index 540fd0d..3c126ed 100644 --- a/dlls/shell32/tests/shlfileop.c +++ b/dlls/shell32/tests/shlfileop.c @@ -189,7 +189,7 @@ static void test_get_file_info(void) /* Test whether fields of SHFILEINFOA are always cleared */ memset(&shfi, 0xcf, sizeof(shfi)); rc=SHGetFileInfoA("", 0, &shfi, sizeof(shfi), 0); - ok(rc, "SHGetFileInfoA('' | 0) should not fail\n"); + ok(rc == 1, "SHGetFileInfoA('' | 0) should return 1, got 0x%x\n", rc); todo_wine ok(shfi.hIcon == 0, "SHGetFileInfoA('' | 0) did not clear hIcon\n"); todo_wine ok(shfi.szDisplayName[0] == 0, "SHGetFileInfoA('' | 0) did not clear szDisplayName[0]\n"); todo_wine ok(shfi.szTypeName[0] == 0, "SHGetFileInfoA('' | 0) did not clear szTypeName[0]\n"); @@ -225,7 +225,7 @@ static void test_get_file_info(void) rc=SHGetFileInfoA("c:\\nonexistent", FILE_ATTRIBUTE_DIRECTORY, &shfi, sizeof(shfi), SHGFI_ATTRIBUTES | SHGFI_USEFILEATTRIBUTES); - ok(rc, "SHGetFileInfoA(c:\\nonexistent | SHGFI_ATTRIBUTES) failed\n"); + ok(rc == 1, "SHGetFileInfoA(c:\\nonexistent | SHGFI_ATTRIBUTES) should return 1, got 0x%x\n", rc); if (rc) ok(shfi.dwAttributes != 0xcfcfcfcf, "dwFileAttributes is not set\n"); todo_wine ok(shfi.hIcon == 0, "SHGetFileInfoA(c:\\nonexistent | SHGFI_ATTRIBUTES) did not clear hIcon\n"); @@ -238,7 +238,7 @@ static void test_get_file_info(void) rc=SHGetFileInfoA("c:\\nonexistent", FILE_ATTRIBUTE_DIRECTORY, &shfi, sizeof(shfi), SHGFI_EXETYPE | SHGFI_USEFILEATTRIBUTES); - todo_wine ok(rc == 1, "SHGetFileInfoA(c:\\nonexistent | SHGFI_EXETYPE) returned %d\n", rc); + todo_wine ok(rc == 1, "SHGetFileInfoA(c:\\nonexistent | SHGFI_EXETYPE) should return 1, got 0x%x\n", rc); /* Test SHGFI_USEFILEATTRIBUTES support */ strcpy(shfi.szDisplayName, "dummy"); @@ -246,7 +246,7 @@ static void test_get_file_info(void) rc=SHGetFileInfoA("c:\\nonexistent", FILE_ATTRIBUTE_DIRECTORY, &shfi, sizeof(shfi), SHGFI_ICONLOCATION | SHGFI_USEFILEATTRIBUTES); - ok(rc, "SHGetFileInfoA(c:\\nonexistent) failed\n"); + ok(rc == 1, "SHGetFileInfoA(c:\\nonexistent) should return 1, got 0x%x\n", rc); if (rc) { ok(strcpy(shfi.szDisplayName, "dummy") != 0, "SHGetFileInfoA(c:\\nonexistent) displayname is not set\n"); @@ -263,13 +263,13 @@ static void test_get_file_info(void) rc=SHGetFileInfoA(notepad, GetFileAttributes(notepad), &shfi, sizeof(shfi), SHGFI_ICONLOCATION | SHGFI_USEFILEATTRIBUTES); - ok(rc, "SHGetFileInfoA(%s, SHGFI_USEFILEATTRIBUTES) failed\n", notepad); + ok(rc == 1, "SHGetFileInfoA(%s, SHGFI_USEFILEATTRIBUTES) should return 1, got 0x%x\n", notepad, rc); strcpy(shfi2.szDisplayName, "dummy"); shfi2.iIcon=0xdeadbeef; rc2=SHGetFileInfoA(notepad, 0, &shfi2, sizeof(shfi2), SHGFI_ICONLOCATION); - ok(rc2, "SHGetFileInfoA(%s) failed\n", notepad); + ok(rc2 == 1, "SHGetFileInfoA(%s) failed %x\n", notepad, rc2); if (rc && rc2) { ok(lstrcmpi(shfi2.szDisplayName, shfi.szDisplayName) == 0, "wrong display name %s != %s\n", shfi.szDisplayName, shfi2.szDisplayName); @@ -283,18 +283,31 @@ static void test_get_file_info(void) rc=SHGetFileInfoA("test4.txt", GetFileAttributes("test4.txt"), &shfi, sizeof(shfi), SHGFI_ICONLOCATION | SHGFI_USEFILEATTRIBUTES); - ok(rc, "SHGetFileInfoA(test4.txt/, SHGFI_USEFILEATTRIBUTES) failed\n"); + ok(rc == 1, "SHGetFileInfoA(test4.txt/, SHGFI_USEFILEATTRIBUTES) should return 1, got 0x%x\n", rc); strcpy(shfi2.szDisplayName, "dummy"); shfi2.iIcon=0xdeadbeef; rc2=SHGetFileInfoA("test4.txt", 0, &shfi2, sizeof(shfi2), SHGFI_ICONLOCATION); - ok(rc2, "SHGetFileInfoA(test4.txt/) failed\n"); + ok(rc2 == 1, "SHGetFileInfoA(test4.txt/) should return 1, got 0x%x\n", rc2); if (rc && rc2) { ok(lstrcmpi(shfi2.szDisplayName, shfi.szDisplayName) == 0, "wrong display name %s != %s\n", shfi.szDisplayName, shfi2.szDisplayName); ok(shfi2.iIcon == shfi.iIcon, "wrong icon index %d != %d\n", shfi.iIcon, shfi2.iIcon); } + /* with drive root directory */ + strcpy(shfi.szDisplayName, "dummy"); + strcpy(shfi.szTypeName, "dummy"); + shfi.hIcon=(HICON) 0xdeadbeef; + shfi.iIcon=0xdeadbeef; + shfi.dwAttributes=0xdeadbeef; + rc=SHGetFileInfoA("c:\\", 0, &shfi, sizeof(shfi), + SHGFI_TYPENAME | SHGFI_DISPLAYNAME | SHGFI_ICON | SHGFI_SMALLICON); + ok(rc == 1, "SHGetFileInfoA(c:\\) should return 1, got 0x%x\n", rc); + ok(lstrcmp(shfi.szDisplayName, "dummy") != 0, "display name was expected to change\n"); + ok(lstrcmp(shfi.szTypeName, "dummy") != 0, "type name was expected to change\n"); + ok(shfi.hIcon != (HICON) 0xdeadbeef, "hIcon was expected to change\n"); + ok(shfi.iIcon != 0xdeadbeef, "iIcon was expected to change\n"); } static void test_get_file_info_iconlist(void) @@ -318,7 +331,7 @@ static void test_get_file_info_iconlist(void) hSysImageList = (HIMAGELIST) SHGetFileInfoA((const char *)pidList, 0, &shInfoa, sizeof(shInfoa), SHGFI_SYSICONINDEX | SHGFI_SMALLICON | SHGFI_PIDL); - ok(hSysImageList != INVALID_HANDLE_VALUE, "Can't get handle for CSIDL_DESKTOP imagelist\n"); + ok((hSysImageList != INVALID_HANDLE_VALUE) && (hSysImageList > (HIMAGELIST) 0xffff), "Can't get handle for CSIDL_DESKTOP imagelist\n"); todo_wine ok(shInfoa.hIcon == 0, "SHGetFileInfoA(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) did not clear hIcon\n"); todo_wine ok(shInfoa.szTypeName[0] == 0, "SHGetFileInfoA(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) did not clear szTypeName[0]\n"); ok(shInfoa.iIcon != 0xcfcfcfcf, "SHGetFileInfoA(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) should set iIcon\n"); @@ -344,7 +357,7 @@ static void test_get_file_info_iconlist(void) win_skip("SHGetFileInfoW is not implemented\n"); return; } - ok(hSysImageList != INVALID_HANDLE_VALUE, "Can't get handle for CSIDL_DESKTOP imagelist\n"); + ok((hSysImageList != INVALID_HANDLE_VALUE) && (hSysImageList > (HIMAGELIST) 0xffff), "Can't get handle for CSIDL_DESKTOP imagelist\n"); todo_wine ok(shInfow.hIcon == 0, "SHGetFileInfoW(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) did not clear hIcon\n"); ok(shInfow.szTypeName[0] == 0, "SHGetFileInfoW(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) did not clear szTypeName[0]\n"); ok(shInfow.iIcon != 0xcfcfcfcf, "SHGetFileInfoW(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) should set iIcon\n");
1
0
0
0
Alexandre Julliard : ntdll: Ignore activation context entries that don' t specify a path.
by Alexandre Julliard
05 Aug '09
05 Aug '09
Module: wine Branch: master Commit: b76dc21b8213ebbca210f535cb4ef4602cb90e5e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b76dc21b8213ebbca210f535c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Aug 5 11:23:16 2009 +0200 ntdll: Ignore activation context entries that don't specify a path. --- dlls/ntdll/loader.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index aa9395e..a3db3b2 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -1716,6 +1716,12 @@ static NTSTATUS find_actctx_dll( LPCWSTR libname, LPWSTR *fullname ) /* restart with larger buffer */ } + if (!info->lpAssemblyManifestPath || !info->lpAssemblyDirectoryName) + { + status = STATUS_SXS_KEY_NOT_FOUND; + goto done; + } + if ((p = strrchrW( info->lpAssemblyManifestPath, '\\' ))) { DWORD dirlen = info->ulAssemblyDirectoryNameLength / sizeof(WCHAR);
1
0
0
0
Alexandre Julliard : ntdll: Don' t free low address space for large address aware applications.
by Alexandre Julliard
05 Aug '09
05 Aug '09
Module: wine Branch: master Commit: c10bdbefd69786846b035d1c38de3052bed67875 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c10bdbefd69786846b035d1c3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Aug 5 11:23:02 2009 +0200 ntdll: Don't free low address space for large address aware applications. Many games set the LARGE_ADDRESS_AWARE flag but don't pass the appropriate flags to d3dx9 to make it cope with it. --- dlls/ntdll/virtual.c | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 04c90f6..62176e4 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -1681,12 +1681,6 @@ void virtual_release_address_space( BOOL free_high_mem ) server_enter_uninterrupted_section( &csVirtual, &sigset ); -#ifndef __APPLE__ /* dyld doesn't support parts of the WINE_DOS segment being unmapped */ - range.base = (char *)0x20000000; - range.limit = (char *)0x7f000000; - while (wine_mmap_enum_reserved_areas( free_reserved_memory, &range, 0 )) /* nothing */; -#endif - /* no large address space on win9x */ if (free_high_mem && NtCurrentTeb()->Peb->OSPlatformId == VER_PLATFORM_WIN32_NT) { @@ -1695,6 +1689,15 @@ void virtual_release_address_space( BOOL free_high_mem ) while (wine_mmap_enum_reserved_areas( free_reserved_memory, &range, 1 )) /* nothing */; user_space_limit = working_set_limit = address_space_limit; } + else + { +#ifndef __APPLE__ /* dyld doesn't support parts of the WINE_DOS segment being unmapped */ + range.base = (char *)0x20000000; + range.limit = (char *)0x7f000000; + while (wine_mmap_enum_reserved_areas( free_reserved_memory, &range, 0 )) /* nothing */; +#endif + } + server_leave_uninterrupted_section( &csVirtual, &sigset ); #endif }
1
0
0
0
Alexandre Julliard : mshtml: Never try to unload the Gecko libraries.
by Alexandre Julliard
05 Aug '09
05 Aug '09
Module: wine Branch: master Commit: 6aa4d2e56282e623efa020efa9bbf428b989aa27 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6aa4d2e56282e623efa020efa…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Aug 5 11:21:33 2009 +0200 mshtml: Never try to unload the Gecko libraries. --- dlls/mshtml/nsembed.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index 85a3a0d..0464e05 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -879,8 +879,8 @@ void close_gecko(void) if(nsmem) nsIMemory_Release(nsmem); - if(hXPCOM) - FreeLibrary(hXPCOM); + /* Gecko doesn't really support being unloaded */ + /* if (hXPCOM) FreeLibrary(hXPCOM); */ } /**********************************************************
1
0
0
0
Henri Verbeet : wined3d: WINED3DTEXF_NONE only makes sense as a mip filter.
by Alexandre Julliard
05 Aug '09
05 Aug '09
Module: wine Branch: master Commit: 7165bd19c1cbf852fce3eb30dee708b040afbfb1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7165bd19c1cbf852fce3eb30d…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Aug 5 09:01:03 2009 +0200 wined3d: WINED3DTEXF_NONE only makes sense as a mip filter. --- dlls/ddraw/device.c | 8 ++++---- dlls/wined3d/basetexture.c | 2 +- dlls/wined3d/device.c | 4 ++-- dlls/wined3d/swapchain.c | 3 ++- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 360604e..44bfe31 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -2639,7 +2639,7 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface, { case D3DRENDERSTATE_TEXTUREMAG: { - WINED3DTEXTUREFILTERTYPE tex_mag = WINED3DTEXF_NONE; + WINED3DTEXTUREFILTERTYPE tex_mag = WINED3DTEXF_POINT; switch ((D3DTEXTUREFILTER) Value) { @@ -2663,7 +2663,7 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface, case D3DRENDERSTATE_TEXTUREMIN: { - WINED3DTEXTUREFILTERTYPE tex_min = WINED3DTEXF_NONE; + WINED3DTEXTUREFILTERTYPE tex_min = WINED3DTEXF_POINT; WINED3DTEXTUREFILTERTYPE tex_mip = WINED3DTEXF_NONE; switch ((D3DTEXTUREFILTER) Value) @@ -2675,11 +2675,11 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface, tex_min = WINED3DTEXF_LINEAR; break; case D3DFILTER_MIPNEAREST: - tex_min = WINED3DTEXF_NONE; + tex_min = WINED3DTEXF_POINT; tex_mip = WINED3DTEXF_POINT; break; case D3DFILTER_MIPLINEAR: - tex_min = WINED3DTEXF_NONE; + tex_min = WINED3DTEXF_POINT; tex_mip = WINED3DTEXF_LINEAR; break; case D3DFILTER_LINEARMIPNEAREST: diff --git a/dlls/wined3d/basetexture.c b/dlls/wined3d/basetexture.c index a8e5228..9633e01 100644 --- a/dlls/wined3d/basetexture.c +++ b/dlls/wined3d/basetexture.c @@ -415,7 +415,7 @@ void basetexture_apply_state_changes(IWineD3DBaseTexture *iface, states[WINED3DTEXSTA_MIPFILTER]); } glValue = wined3d_gl_min_mip_filter(This->baseTexture.minMipLookup, - min(max(samplerStates[WINED3DSAMP_MINFILTER], WINED3DTEXF_NONE), WINED3DTEXF_LINEAR), + min(max(samplerStates[WINED3DSAMP_MINFILTER], WINED3DTEXF_POINT), WINED3DTEXF_LINEAR), min(max(samplerStates[WINED3DSAMP_MIPFILTER], WINED3DTEXF_NONE), WINED3DTEXF_LINEAR)); TRACE("ValueMIN=%d, ValueMIP=%d, setting MINFILTER to %x\n", diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 9035a19..40ea34d 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -6198,7 +6198,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_ColorFill(IWineD3DDevice *iface, IWineD BltFx.dwSize = sizeof(BltFx); BltFx.u5.dwFillColor = argb_to_fmt(color, surface->resource.format_desc->format); return IWineD3DSurface_Blt(pSurface, (const RECT *)pRect, NULL, NULL, - WINEDDBLT_COLORFILL, &BltFx, WINED3DTEXF_NONE); + WINEDDBLT_COLORFILL, &BltFx, WINED3DTEXF_POINT); } } @@ -6245,7 +6245,7 @@ static void WINAPI IWineD3DDeviceImpl_ClearRendertargetView(IWineD3DDevice *ifac memset(&BltFx, 0, sizeof(BltFx)); BltFx.dwSize = sizeof(BltFx); BltFx.u5.dwFillColor = argb_to_fmt(c, ((IWineD3DSurfaceImpl *)surface)->resource.format_desc->format); - hr = IWineD3DSurface_Blt(surface, NULL, NULL, NULL, WINEDDBLT_COLORFILL, &BltFx, WINED3DTEXF_NONE); + hr = IWineD3DSurface_Blt(surface, NULL, NULL, NULL, WINEDDBLT_COLORFILL, &BltFx, WINED3DTEXF_POINT); if (FAILED(hr)) { ERR("Blt failed, hr %#x\n", hr); diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index c61c952..2910ef9 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -132,7 +132,8 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO if (This->presentParms.Windowed) { MapWindowPoints(NULL, This->win_handle, (LPPOINT)&destRect, 2); } - IWineD3DSurface_Blt(This->backBuffer[0], &destRect, (IWineD3DSurface *) &cursor, NULL, WINEDDBLT_KEYSRC, NULL, WINED3DTEXF_NONE); + IWineD3DSurface_Blt(This->backBuffer[0], &destRect, (IWineD3DSurface *)&cursor, + NULL, WINEDDBLT_KEYSRC, NULL, WINED3DTEXF_POINT); } if(This->wineD3DDevice->logo_surface) { /* Blit the logo into the upper left corner of the drawable */
1
0
0
0
Henri Verbeet : wined3d: Get rid of the ANISOTROPIC entry from the filter lookup tables.
by Alexandre Julliard
05 Aug '09
05 Aug '09
Module: wine Branch: master Commit: 9e8f7898c9c9a3c6d8c2fbe129381d960b2c11cc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9e8f7898c9c9a3c6d8c2fbe12…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Aug 5 09:01:02 2009 +0200 wined3d: Get rid of the ANISOTROPIC entry from the filter lookup tables. Anisotropy and texture filters are orthogonal in GL. In D3D D3DTEXF_ANISOTROPIC just selects the best (linear) filter type and enables anisotropy. --- dlls/wined3d/basetexture.c | 20 ++++++++++---------- dlls/wined3d/directx.c | 10 ++++------ dlls/wined3d/wined3d_private.h | 8 ++++---- 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/dlls/wined3d/basetexture.c b/dlls/wined3d/basetexture.c index 2970108..a8e5228 100644 --- a/dlls/wined3d/basetexture.c +++ b/dlls/wined3d/basetexture.c @@ -388,12 +388,12 @@ void basetexture_apply_state_changes(IWineD3DBaseTexture *iface, if (state > WINED3DTEXF_ANISOTROPIC) { FIXME("Unrecognized or unsupported MAGFILTER* value %d\n", state); } - else - { - glValue = wined3d_gl_mag_filter(This->baseTexture.magLookup, state); - TRACE("ValueMAG=%d setting MAGFILTER to %x\n", state, glValue); - glTexParameteri(textureDimensions, GL_TEXTURE_MAG_FILTER, glValue); - } + + glValue = wined3d_gl_mag_filter(This->baseTexture.magLookup, + min(max(state, WINED3DTEXF_POINT), WINED3DTEXF_LINEAR)); + TRACE("ValueMAG=%d setting MAGFILTER to %x\n", state, glValue); + glTexParameteri(textureDimensions, GL_TEXTURE_MAG_FILTER, glValue); + states[WINED3DTEXSTA_MAGFILTER] = state; } @@ -406,8 +406,8 @@ void basetexture_apply_state_changes(IWineD3DBaseTexture *iface, states[WINED3DTEXSTA_MINFILTER] = samplerStates[WINED3DSAMP_MINFILTER]; states[WINED3DTEXSTA_MAXMIPLEVEL] = samplerStates[WINED3DSAMP_MAXMIPLEVEL]; - if (states[WINED3DTEXSTA_MINFILTER] > WINED3DTEXF_ANISOTROPIC || - states[WINED3DTEXSTA_MIPFILTER] > WINED3DTEXF_LINEAR) + if (states[WINED3DTEXSTA_MINFILTER] > WINED3DTEXF_ANISOTROPIC + || states[WINED3DTEXSTA_MIPFILTER] > WINED3DTEXF_ANISOTROPIC) { FIXME("Unrecognized or unsupported D3DSAMP_MINFILTER value %d D3DSAMP_MIPFILTER value %d\n", @@ -415,8 +415,8 @@ void basetexture_apply_state_changes(IWineD3DBaseTexture *iface, states[WINED3DTEXSTA_MIPFILTER]); } glValue = wined3d_gl_min_mip_filter(This->baseTexture.minMipLookup, - min(max(samplerStates[WINED3DSAMP_MINFILTER],WINED3DTEXF_NONE), WINED3DTEXF_ANISOTROPIC), - min(max(samplerStates[WINED3DSAMP_MIPFILTER],WINED3DTEXF_NONE), WINED3DTEXF_LINEAR)); + min(max(samplerStates[WINED3DSAMP_MINFILTER], WINED3DTEXF_NONE), WINED3DTEXF_LINEAR), + min(max(samplerStates[WINED3DSAMP_MIPFILTER], WINED3DTEXF_NONE), WINED3DTEXF_LINEAR)); TRACE("ValueMIN=%d, ValueMIP=%d, setting MINFILTER to %x\n", samplerStates[WINED3DSAMP_MINFILTER], diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 8e5e08c..7be5f44 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -174,7 +174,6 @@ const struct min_lookup minMipLookup[] = {{GL_LINEAR, GL_LINEAR, GL_LINEAR}}, /* NONE */ {{GL_NEAREST, GL_NEAREST_MIPMAP_NEAREST, GL_NEAREST_MIPMAP_LINEAR}}, /* POINT*/ {{GL_LINEAR, GL_LINEAR_MIPMAP_NEAREST, GL_LINEAR_MIPMAP_LINEAR}}, /* LINEAR */ - {{GL_LINEAR, GL_LINEAR_MIPMAP_NEAREST, GL_LINEAR_MIPMAP_LINEAR}}, /* ANISOTROPIC */ }; const struct min_lookup minMipLookup_noFilter[] = @@ -183,19 +182,18 @@ const struct min_lookup minMipLookup_noFilter[] = {{GL_NEAREST, GL_NEAREST, GL_NEAREST}}, /* NONE */ {{GL_NEAREST, GL_NEAREST, GL_NEAREST}}, /* POINT */ {{GL_NEAREST, GL_NEAREST, GL_NEAREST}}, /* LINEAR */ - {{GL_NEAREST, GL_NEAREST, GL_NEAREST}}, /* ANISOTROPIC */ }; const GLenum magLookup[] = { - /* NONE POINT LINEAR ANISOTROPIC */ - GL_NEAREST, GL_NEAREST, GL_LINEAR, GL_LINEAR, + /* NONE POINT LINEAR */ + GL_NEAREST, GL_NEAREST, GL_LINEAR, }; const GLenum magLookup_noFilter[] = { - /* NONE POINT LINEAR ANISOTROPIC */ - GL_NEAREST, GL_NEAREST, GL_NEAREST, GL_NEAREST, + /* NONE POINT LINEAR */ + GL_NEAREST, GL_NEAREST, GL_NEAREST, }; /* drawStridedSlow attributes */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 9852196..c83ee20 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -176,10 +176,10 @@ struct min_lookup GLenum mip[WINED3DTEXF_LINEAR + 1]; }; -const struct min_lookup minMipLookup[WINED3DTEXF_ANISOTROPIC + 1]; -const struct min_lookup minMipLookup_noFilter[WINED3DTEXF_ANISOTROPIC + 1]; -const GLenum magLookup[WINED3DTEXF_ANISOTROPIC + 1]; -const GLenum magLookup_noFilter[WINED3DTEXF_ANISOTROPIC + 1]; +const struct min_lookup minMipLookup[WINED3DTEXF_LINEAR + 1]; +const struct min_lookup minMipLookup_noFilter[WINED3DTEXF_LINEAR + 1]; +const GLenum magLookup[WINED3DTEXF_LINEAR + 1]; +const GLenum magLookup_noFilter[WINED3DTEXF_LINEAR + 1]; static inline GLenum wined3d_gl_mag_filter(const GLenum mag_lookup[], WINED3DTEXTUREFILTERTYPE mag_filter) {
1
0
0
0
Henri Verbeet : wined3d: Remove a redundant check from basetexture_get_autogen_filter_type().
by Alexandre Julliard
05 Aug '09
05 Aug '09
Module: wine Branch: master Commit: 62ac872b3688dcc1f497d63c19aad8eacecd1f58 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=62ac872b3688dcc1f497d63c1…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Aug 5 09:01:01 2009 +0200 wined3d: Remove a redundant check from basetexture_get_autogen_filter_type(). This is already initialized to an appropriate value in basetexture_init(). Also fix the indentation while we're at it. --- dlls/wined3d/basetexture.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dlls/wined3d/basetexture.c b/dlls/wined3d/basetexture.c index 086315e..2970108 100644 --- a/dlls/wined3d/basetexture.c +++ b/dlls/wined3d/basetexture.c @@ -176,12 +176,11 @@ HRESULT basetexture_set_autogen_filter_type(IWineD3DBaseTexture *iface, WINED3DT WINED3DTEXTUREFILTERTYPE basetexture_get_autogen_filter_type(IWineD3DBaseTexture *iface) { - IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; - FIXME("(%p) : stub\n", This); - if (!(This->resource.usage & WINED3DUSAGE_AUTOGENMIPMAP)) { - return WINED3DTEXF_NONE; - } - return This->baseTexture.filterType; + IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; + + FIXME("(%p) : stub\n", This); + + return This->baseTexture.filterType; } void basetexture_generate_mipmaps(IWineD3DBaseTexture *iface)
1
0
0
0
Henri Verbeet : wined3d: Move texture filter lookup table initialization to basetexture_init().
by Alexandre Julliard
05 Aug '09
05 Aug '09
Module: wine Branch: master Commit: a86f31658b88137ca8c64fcd1501627d60453e36 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a86f31658b88137ca8c64fcd1…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Aug 5 09:01:00 2009 +0200 wined3d: Move texture filter lookup table initialization to basetexture_init(). --- dlls/wined3d/basetexture.c | 11 +++++++++++ dlls/wined3d/cubetexture.c | 11 ----------- dlls/wined3d/texture.c | 11 ----------- dlls/wined3d/volumetexture.c | 11 ----------- 4 files changed, 11 insertions(+), 33 deletions(-) diff --git a/dlls/wined3d/basetexture.c b/dlls/wined3d/basetexture.c index c306367..086315e 100644 --- a/dlls/wined3d/basetexture.c +++ b/dlls/wined3d/basetexture.c @@ -48,6 +48,17 @@ HRESULT basetexture_init(IWineD3DBaseTextureImpl *texture, UINT levels, WINED3DR texture->baseTexture.is_srgb = FALSE; texture->baseTexture.pow2Matrix_identity = TRUE; + if (texture->resource.format_desc->Flags & WINED3DFMT_FLAG_FILTERING) + { + texture->baseTexture.minMipLookup = minMipLookup; + texture->baseTexture.magLookup = magLookup; + } + else + { + texture->baseTexture.minMipLookup = minMipLookup_noFilter; + texture->baseTexture.magLookup = magLookup_noFilter; + } + return WINED3D_OK; } diff --git a/dlls/wined3d/cubetexture.c b/dlls/wined3d/cubetexture.c index afba1e8..4b6900a 100644 --- a/dlls/wined3d/cubetexture.c +++ b/dlls/wined3d/cubetexture.c @@ -192,17 +192,6 @@ HRESULT cubetexture_init(IWineD3DCubeTextureImpl *texture, UINT edge_length, UIN return hr; } - if (texture->resource.format_desc->Flags & WINED3DFMT_FLAG_FILTERING) - { - texture->baseTexture.minMipLookup = minMipLookup; - texture->baseTexture.magLookup = magLookup; - } - else - { - texture->baseTexture.minMipLookup = minMipLookup_noFilter; - texture->baseTexture.magLookup = magLookup_noFilter; - } - /* Find the nearest pow2 match. */ pow2_edge_length = 1; while (pow2_edge_length < edge_length) pow2_edge_length <<= 1; diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index ab05449..d89b3b5 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -197,17 +197,6 @@ HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT return hr; } - if (texture->resource.format_desc->Flags & WINED3DFMT_FLAG_FILTERING) - { - texture->baseTexture.minMipLookup = minMipLookup; - texture->baseTexture.magLookup = magLookup; - } - else - { - texture->baseTexture.minMipLookup = minMipLookup_noFilter; - texture->baseTexture.magLookup = magLookup_noFilter; - } - /* Precalculated scaling for 'faked' non power of two texture coords. * Second also don't use ARB_TEXTURE_RECTANGLE in case the surface format is P8 and EXT_PALETTED_TEXTURE * is used in combination with texture uploads (RTL_READTEX/RTL_TEXTEX). The reason is that EXT_PALETTED_TEXTURE diff --git a/dlls/wined3d/volumetexture.c b/dlls/wined3d/volumetexture.c index a847f87..134ff74 100644 --- a/dlls/wined3d/volumetexture.c +++ b/dlls/wined3d/volumetexture.c @@ -150,17 +150,6 @@ HRESULT volumetexture_init(IWineD3DVolumeTextureImpl *texture, UINT width, UINT return hr; } - if (texture->resource.format_desc->Flags & WINED3DFMT_FLAG_FILTERING) - { - texture->baseTexture.minMipLookup = minMipLookup; - texture->baseTexture.magLookup = magLookup; - } - else - { - texture->baseTexture.minMipLookup = minMipLookup_noFilter; - texture->baseTexture.magLookup = magLookup_noFilter; - } - /* Is NP2 support for volumes needed? */ texture->baseTexture.pow2Matrix[0] = 1.0f; texture->baseTexture.pow2Matrix[5] = 1.0f;
1
0
0
0
Henri Verbeet : wined3d: Add functions to lookup texture filters.
by Alexandre Julliard
05 Aug '09
05 Aug '09
Module: wine Branch: master Commit: 351d6de818765b70708b7e16452ce01fcb139395 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=351d6de818765b70708b7e164…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Aug 5 09:00:59 2009 +0200 wined3d: Add functions to lookup texture filters. --- dlls/wined3d/basetexture.c | 12 +++++++----- dlls/wined3d/surface.c | 10 ++++++---- dlls/wined3d/wined3d_private.h | 11 +++++++++++ 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/dlls/wined3d/basetexture.c b/dlls/wined3d/basetexture.c index 2509a58..c306367 100644 --- a/dlls/wined3d/basetexture.c +++ b/dlls/wined3d/basetexture.c @@ -377,8 +377,10 @@ void basetexture_apply_state_changes(IWineD3DBaseTexture *iface, state = samplerStates[WINED3DSAMP_MAGFILTER]; if (state > WINED3DTEXF_ANISOTROPIC) { FIXME("Unrecognized or unsupported MAGFILTER* value %d\n", state); - } else { - glValue = This->baseTexture.magLookup[state - WINED3DTEXF_NONE]; + } + else + { + glValue = wined3d_gl_mag_filter(This->baseTexture.magLookup, state); TRACE("ValueMAG=%d setting MAGFILTER to %x\n", state, glValue); glTexParameteri(textureDimensions, GL_TEXTURE_MAG_FILTER, glValue); } @@ -402,9 +404,9 @@ void basetexture_apply_state_changes(IWineD3DBaseTexture *iface, states[WINED3DTEXSTA_MINFILTER], states[WINED3DTEXSTA_MIPFILTER]); } - glValue = This->baseTexture.minMipLookup - [min(max(samplerStates[WINED3DSAMP_MINFILTER],WINED3DTEXF_NONE), WINED3DTEXF_ANISOTROPIC)] - .mip[min(max(samplerStates[WINED3DSAMP_MIPFILTER],WINED3DTEXF_NONE), WINED3DTEXF_LINEAR)]; + glValue = wined3d_gl_min_mip_filter(This->baseTexture.minMipLookup, + min(max(samplerStates[WINED3DSAMP_MINFILTER],WINED3DTEXF_NONE), WINED3DTEXF_ANISOTROPIC), + min(max(samplerStates[WINED3DSAMP_MIPFILTER],WINED3DTEXF_NONE), WINED3DTEXF_LINEAR)); TRACE("ValueMIN=%d, ValueMIP=%d, setting MINFILTER to %x\n", samplerStates[WINED3DSAMP_MINFILTER], diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 67a116b..1cf4c71 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -3182,10 +3182,10 @@ static inline void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *This, IWine /* No issue with overriding these - the sampler is dirty due to blit usage */ glTexParameteri(texture_target, GL_TEXTURE_MAG_FILTER, - magLookup[Filter - WINED3DTEXF_NONE]); + wined3d_gl_mag_filter(magLookup, Filter)); checkGLcall("glTexParameteri"); glTexParameteri(texture_target, GL_TEXTURE_MIN_FILTER, - minMipLookup[Filter].mip[WINED3DTEXF_NONE]); + wined3d_gl_min_mip_filter(minMipLookup, Filter, WINED3DTEXF_NONE)); checkGLcall("glTexParameteri"); if(!swapchain || (IWineD3DSurface *) Src == swapchain->backBuffer[0]) { @@ -3744,9 +3744,11 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const checkGLcall("glBindTexture"); /* Filtering for StretchRect */ - glTexParameteri(Src->texture_target, GL_TEXTURE_MAG_FILTER, magLookup[Filter - WINED3DTEXF_NONE]); + glTexParameteri(Src->texture_target, GL_TEXTURE_MAG_FILTER, + wined3d_gl_mag_filter(magLookup, Filter)); checkGLcall("glTexParameteri"); - glTexParameteri(Src->texture_target, GL_TEXTURE_MIN_FILTER, minMipLookup[Filter].mip[WINED3DTEXF_NONE]); + glTexParameteri(Src->texture_target, GL_TEXTURE_MIN_FILTER, + wined3d_gl_min_mip_filter(minMipLookup, Filter, WINED3DTEXF_NONE)); checkGLcall("glTexParameteri"); glTexParameteri(Src->texture_target, GL_TEXTURE_WRAP_S, GL_CLAMP); glTexParameteri(Src->texture_target, GL_TEXTURE_WRAP_T, GL_CLAMP); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index e01b5f3..9852196 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -181,6 +181,17 @@ const struct min_lookup minMipLookup_noFilter[WINED3DTEXF_ANISOTROPIC + 1]; const GLenum magLookup[WINED3DTEXF_ANISOTROPIC + 1]; const GLenum magLookup_noFilter[WINED3DTEXF_ANISOTROPIC + 1]; +static inline GLenum wined3d_gl_mag_filter(const GLenum mag_lookup[], WINED3DTEXTUREFILTERTYPE mag_filter) +{ + return mag_lookup[mag_filter]; +} + +static inline GLenum wined3d_gl_min_mip_filter(const struct min_lookup min_mip_lookup[], + WINED3DTEXTUREFILTERTYPE min_filter, WINED3DTEXTUREFILTERTYPE mip_filter) +{ + return min_mip_lookup[min_filter].mip[mip_filter]; +} + /* float_16_to_32() and float_32_to_16() (see implementation in * surface_base.c) convert 16 bit floats in the FLOAT16 data type * to standard C floats and vice versa. They do not depend on the encoding
1
0
0
0
← Newer
1
...
87
88
89
90
91
92
93
...
105
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
99
100
101
102
103
104
105
Results per page:
10
25
50
100
200