winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
July
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2008
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
4 participants
1001 discussions
Start a n
N
ew thread
Alexandre Julliard : winex11: Reset the cursor window when re-creating the client window.
by Alexandre Julliard
06 Mar '08
06 Mar '08
Module: wine Branch: master Commit: 51d3d620cfa1e13d30eb9738676e9a9369579987 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=51d3d620cfa1e13d30eb97386…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 5 20:52:14 2008 +0100 winex11: Reset the cursor window when re-creating the client window. --- dlls/winex11.drv/window.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index b98c6d8..3f3ac99 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -246,6 +246,8 @@ static Window create_client_window( Display *display, struct x11drv_win_data *da if (data->client_window) { + struct x11drv_thread_data *thread_data = x11drv_thread_data(); + if (thread_data->cursor_window == data->client_window) thread_data->cursor_window = None; XDeleteContext( display, data->client_window, winContext ); XDestroyWindow( display, data->client_window ); }
1
0
0
0
Hans Leidekker : winex11.drv: Retrieve X color profile in GetICMProfile.
by Alexandre Julliard
05 Mar '08
05 Mar '08
Module: wine Branch: master Commit: 22f146f01115a03a55fbe2e32f63f3be4d38da06 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=22f146f01115a03a55fbe2e32…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Wed Mar 5 15:57:39 2008 +0100 winex11.drv: Retrieve X color profile in GetICMProfile. --- dlls/winex11.drv/graphics.c | 84 +++++++++++++++++++++++++++++++++++----- dlls/winex11.drv/x11drv.h | 1 + dlls/winex11.drv/x11drv_main.c | 1 + 3 files changed, 76 insertions(+), 10 deletions(-) diff --git a/dlls/winex11.drv/graphics.c b/dlls/winex11.drv/graphics.c index 5272681..e75b594 100644 --- a/dlls/winex11.drv/graphics.c +++ b/dlls/winex11.drv/graphics.c @@ -1381,6 +1381,39 @@ DWORD X11DRV_SetDCOrg( X11DRV_PDEVICE *physDev, INT x, INT y ) return ret; } +static unsigned char *get_icm_profile( unsigned long *size ) +{ + Atom type; + int format; + unsigned long count, remaining; + unsigned char *profile, *ret = NULL; + + wine_tsx11_lock(); + XGetWindowProperty( gdi_display, DefaultRootWindow(gdi_display), + x11drv_atom(_ICC_PROFILE), 0, ~0UL, False, AnyPropertyType, + &type, &format, &count, &remaining, &profile ); + if (format && count) + { + *size = count * (format / 8); + if ((ret = HeapAlloc( GetProcessHeap(), 0, *size ))) memcpy( ret, profile, *size ); + XFree( profile ); + } + wine_tsx11_unlock(); + return ret; +} + +typedef struct +{ + unsigned int unknown[6]; + unsigned int state[5]; + unsigned int count[2]; + unsigned char buffer[64]; +} sha_ctx; + +extern void WINAPI A_SHAInit( sha_ctx * ); +extern void WINAPI A_SHAUpdate( sha_ctx *, const unsigned char *, unsigned int ); +extern void WINAPI A_SHAFinal( sha_ctx *, unsigned char * ); + /*********************************************************************** * GetICMProfile (X11DRV.@) */ @@ -1398,22 +1431,53 @@ BOOL X11DRV_GetICMProfile( X11DRV_PDEVICE *physDev, LPDWORD size, LPWSTR filenam 'V','e','r','s','i','o','n','\\','I','C','M','\\','m','n','t','r',0}; HKEY hkey; - DWORD required; - WCHAR profile[MAX_PATH], fullname[MAX_PATH]; + DWORD required, len; + WCHAR profile[MAX_PATH], fullname[2*MAX_PATH + sizeof(path)/sizeof(WCHAR)]; + unsigned char *buffer; + unsigned long buflen; if (!size) return FALSE; - strcpyW( profile, srgb ); - if (!RegCreateKeyExW( HKEY_LOCAL_MACHINE, mntr, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hkey, NULL )) + GetSystemDirectoryW( fullname, MAX_PATH ); + strcatW( fullname, path ); + + len = sizeof(profile)/sizeof(WCHAR); + if (!RegCreateKeyExW( HKEY_LOCAL_MACHINE, mntr, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hkey, NULL ) && + !RegEnumValueW( hkey, 0, profile, &len, NULL, NULL, NULL, NULL )) /* FIXME handle multiple values */ { - DWORD len = sizeof(profile)/sizeof(WCHAR); - /* FIXME handle multiple values */ - RegEnumValueW( hkey, 0, profile, &len, NULL, NULL, NULL, NULL ); + strcatW( fullname, profile ); RegCloseKey( hkey ); } - GetSystemDirectoryW( fullname, MAX_PATH ); - strcatW( fullname, path ); - strcatW( fullname, profile ); + else if ((buffer = get_icm_profile( &buflen ))) + { + static const WCHAR fmt[] = {'%','0','2','x',0}; + static const WCHAR icm[] = {'.','i','c','m',0}; + + unsigned char sha1sum[20]; + unsigned int i; + sha_ctx ctx; + HANDLE file; + + A_SHAInit( &ctx ); + A_SHAUpdate( &ctx, buffer, buflen ); + A_SHAFinal( &ctx, sha1sum ); + + for (i = 0; i < sizeof(sha1sum); i++) sprintfW( &profile[i * 2], fmt, sha1sum[i] ); + memcpy( &profile[i * 2], icm, sizeof(icm) ); + + strcatW( fullname, profile ); + file = CreateFileW( fullname, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, 0 ); + if (file != INVALID_HANDLE_VALUE) + { + DWORD written; + + if (!WriteFile( file, buffer, buflen, &written, NULL ) || written != buflen) + ERR( "Unable to write color profile\n" ); + CloseHandle( file ); + } + HeapFree( GetProcessHeap(), 0, buffer ); + } + else strcatW( fullname, srgb ); required = strlenW( fullname ) + 1; if (*size < required) diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 2ef2f1f..4111866 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -564,6 +564,7 @@ enum x11drv_atoms XATOM_KWM_DOCKWINDOW, XATOM_DndProtocol, XATOM_DndSelection, + XATOM__ICC_PROFILE, XATOM__MOTIF_WM_HINTS, XATOM__KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR, XATOM__NET_SYSTEM_TRAY_OPCODE, diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index 50d4546..9162857 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -128,6 +128,7 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] = "KWM_DOCKWINDOW", "DndProtocol", "DndSelection", + "_ICC_PROFILE", "_MOTIF_WM_HINTS", "_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", "_NET_SYSTEM_TRAY_OPCODE",
1
0
0
0
Hans Leidekker : gdi32: Move GetICMProfile to the driver.
by Alexandre Julliard
05 Mar '08
05 Mar '08
Module: wine Branch: master Commit: 81e9b43fb246a07793d62563a826c9c3bbfa767f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=81e9b43fb246a07793d62563a…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Wed Mar 5 15:57:21 2008 +0100 gdi32: Move GetICMProfile to the driver. --- dlls/gdi32/driver.c | 1 + dlls/gdi32/enhmfdrv/init.c | 1 + dlls/gdi32/gdi_private.h | 1 + dlls/gdi32/icm.c | 49 ++++++-------------------------- dlls/gdi32/mfdrv/init.c | 1 + dlls/winex11.drv/graphics.c | 57 +++++++++++++++++++++++++++++++++++++ dlls/winex11.drv/winex11.drv.spec | 1 + 7 files changed, 71 insertions(+), 40 deletions(-) diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index 31810b0..8d75803 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -116,6 +116,7 @@ static struct graphics_driver *create_driver( HMODULE module ) GET_FUNC(GetDIBits); GET_FUNC(GetDeviceCaps); GET_FUNC(GetDeviceGammaRamp); + GET_FUNC(GetICMProfile); GET_FUNC(GetNearestColor); GET_FUNC(GetPixel); GET_FUNC(GetPixelFormat); diff --git a/dlls/gdi32/enhmfdrv/init.c b/dlls/gdi32/enhmfdrv/init.c index 0db9ff6..2203ced 100644 --- a/dlls/gdi32/enhmfdrv/init.c +++ b/dlls/gdi32/enhmfdrv/init.c @@ -75,6 +75,7 @@ static const DC_FUNCTIONS EMFDRV_Funcs = NULL, /* pGetDIBits */ EMFDRV_GetDeviceCaps, /* pGetDeviceCaps */ NULL, /* pGetDeviceGammaRamp */ + NULL, /* pGetICMProfile */ NULL, /* pGetNearestColor */ NULL, /* pGetPixel */ NULL, /* pGetPixelFormat */ diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index dc66a0c..e3a320a 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -140,6 +140,7 @@ typedef struct tagDC_FUNCS INT (*pGetDIBits)(PHYSDEV,HBITMAP,UINT,UINT,LPVOID,BITMAPINFO*,UINT); INT (*pGetDeviceCaps)(PHYSDEV,INT); BOOL (*pGetDeviceGammaRamp)(PHYSDEV,LPVOID); + BOOL (*pGetICMProfile)(PHYSDEV,LPDWORD,LPWSTR); COLORREF (*pGetNearestColor)(PHYSDEV,COLORREF); COLORREF (*pGetPixel)(PHYSDEV,INT,INT); INT (*pGetPixelFormat)(PHYSDEV); diff --git a/dlls/gdi32/icm.c b/dlls/gdi32/icm.c index 12d1f3b..0e346ee 100644 --- a/dlls/gdi32/icm.c +++ b/dlls/gdi32/icm.c @@ -30,6 +30,8 @@ #include "winnls.h" #include "winreg.h" +#include "gdi_private.h" + #include "wine/debug.h" #include "wine/unicode.h" @@ -97,51 +99,18 @@ BOOL WINAPI GetICMProfileA(HDC hdc, LPDWORD size, LPSTR filename) */ BOOL WINAPI GetICMProfileW(HDC hdc, LPDWORD size, LPWSTR filename) { - HKEY hkey; - DWORD required; - WCHAR profile[MAX_PATH], fullname[MAX_PATH]; - static const WCHAR path[] = - {'\\','s','p','o','o','l','\\','d','r','i','v','e','r','s', - '\\','c','o','l','o','r','\\',0}; - static const WCHAR srgb[] = - {'s','R','G','B',' ','C','o','l','o','r',' ','S','p','a','c','e',' ', - 'P','r','o','f','i','l','e','.','i','c','m',0}; - static const WCHAR mntr[] = - {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\', - 'W','i','n','d','o','w','s',' ','N','T','\\','C','u','r','r','e','n','t', - 'V','e','r','s','i','o','n','\\','I','C','M','\\','m','n','t','r',0}; + BOOL ret = FALSE; + DC *dc = get_dc_ptr(hdc); TRACE("%p, %p, %p\n", hdc, size, filename); - if (!hdc || !size) return FALSE; - - strcpyW(profile, srgb); - if (!RegCreateKeyExW(HKEY_LOCAL_MACHINE, mntr, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hkey, NULL)) - { - DWORD size = sizeof(profile) / sizeof(WCHAR); - /* FIXME handle multiple values */ - RegEnumValueW(hkey, 0, profile, &size, NULL, NULL, NULL, NULL); - RegCloseKey(hkey); - } - GetSystemDirectoryW(fullname, MAX_PATH); - strcatW(fullname, path); - strcatW(fullname, profile); - - required = strlenW(fullname) + 1; - if (*size < required) - { - *size = required; - SetLastError(ERROR_INSUFFICIENT_BUFFER); - return FALSE; - } - if (filename) + if (dc) { - strcpyW(filename, fullname); - if (GetFileAttributesW(filename) == INVALID_FILE_ATTRIBUTES) - WARN("color profile not found\n"); + if (dc->funcs->pGetICMProfile) + ret = dc->funcs->pGetICMProfile(dc->physDev, size, filename); + release_dc_ptr(dc); } - *size = required; - return TRUE; + return ret; } /********************************************************************** diff --git a/dlls/gdi32/mfdrv/init.c b/dlls/gdi32/mfdrv/init.c index c2cf404..69e5b55 100644 --- a/dlls/gdi32/mfdrv/init.c +++ b/dlls/gdi32/mfdrv/init.c @@ -75,6 +75,7 @@ static const DC_FUNCTIONS MFDRV_Funcs = NULL, /* pGetDIBits */ MFDRV_GetDeviceCaps, /* pGetDeviceCaps */ NULL, /* pGetDeviceGammaRamp */ + NULL, /* pGetICMProfile */ NULL, /* pGetNearestColor */ NULL, /* pGetPixel */ NULL, /* pGetPixelFormat */ diff --git a/dlls/winex11.drv/graphics.c b/dlls/winex11.drv/graphics.c index e580fd6..5272681 100644 --- a/dlls/winex11.drv/graphics.c +++ b/dlls/winex11.drv/graphics.c @@ -25,6 +25,7 @@ #include "config.h" +#include <stdarg.h> #include <math.h> #ifdef HAVE_FLOAT_H # include <float.h> @@ -35,9 +36,14 @@ #endif #include <string.h> +#include "windef.h" +#include "winbase.h" +#include "winreg.h" + #include "x11drv.h" #include "x11font.h" #include "wine/debug.h" +#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(graphics); @@ -1374,3 +1380,54 @@ DWORD X11DRV_SetDCOrg( X11DRV_PDEVICE *physDev, INT x, INT y ) physDev->dc_rect.top = y - physDev->drawable_rect.top; return ret; } + +/*********************************************************************** + * GetICMProfile (X11DRV.@) + */ +BOOL X11DRV_GetICMProfile( X11DRV_PDEVICE *physDev, LPDWORD size, LPWSTR filename ) +{ + static const WCHAR path[] = + {'\\','s','p','o','o','l','\\','d','r','i','v','e','r','s', + '\\','c','o','l','o','r','\\',0}; + static const WCHAR srgb[] = + {'s','R','G','B',' ','C','o','l','o','r',' ','S','p','a','c','e',' ', + 'P','r','o','f','i','l','e','.','i','c','m',0}; + static const WCHAR mntr[] = + {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\', + 'W','i','n','d','o','w','s',' ','N','T','\\','C','u','r','r','e','n','t', + 'V','e','r','s','i','o','n','\\','I','C','M','\\','m','n','t','r',0}; + + HKEY hkey; + DWORD required; + WCHAR profile[MAX_PATH], fullname[MAX_PATH]; + + if (!size) return FALSE; + + strcpyW( profile, srgb ); + if (!RegCreateKeyExW( HKEY_LOCAL_MACHINE, mntr, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hkey, NULL )) + { + DWORD len = sizeof(profile)/sizeof(WCHAR); + /* FIXME handle multiple values */ + RegEnumValueW( hkey, 0, profile, &len, NULL, NULL, NULL, NULL ); + RegCloseKey( hkey ); + } + GetSystemDirectoryW( fullname, MAX_PATH ); + strcatW( fullname, path ); + strcatW( fullname, profile ); + + required = strlenW( fullname ) + 1; + if (*size < required) + { + *size = required; + SetLastError( ERROR_INSUFFICIENT_BUFFER ); + return FALSE; + } + if (filename) + { + strcpyW( filename, fullname ); + if (GetFileAttributesW( filename ) == INVALID_FILE_ATTRIBUTES) + WARN( "color profile not found\n" ); + } + *size = required; + return TRUE; +} diff --git a/dlls/winex11.drv/winex11.drv.spec b/dlls/winex11.drv/winex11.drv.spec index 6c8fe6c..751da52 100644 --- a/dlls/winex11.drv/winex11.drv.spec +++ b/dlls/winex11.drv/winex11.drv.spec @@ -22,6 +22,7 @@ @ cdecl GetDIBits(ptr long long long ptr ptr long) X11DRV_GetDIBits @ cdecl GetDeviceCaps(ptr long) X11DRV_GetDeviceCaps @ cdecl GetDeviceGammaRamp(ptr ptr) X11DRV_GetDeviceGammaRamp +@ cdecl GetICMProfile(ptr ptr ptr) X11DRV_GetICMProfile @ cdecl GetNearestColor(ptr long) X11DRV_GetNearestColor @ cdecl GetPixel(ptr long long) X11DRV_GetPixel @ cdecl GetPixelFormat(ptr) X11DRV_GetPixelFormat
1
0
0
0
Tony Wasserka : d3dx9: Implement D3DXDebugMute.
by Alexandre Julliard
05 Mar '08
05 Mar '08
Module: wine Branch: master Commit: 459b92a0091d19be36faf10be1a569c89f3c6d03 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=459b92a0091d19be36faf10be…
Author: Tony Wasserka <tony.wasserka(a)freenet.de> Date: Sat Feb 23 20:30:57 2008 +0100 d3dx9: Implement D3DXDebugMute. --- dlls/d3dx9_36/d3dx9_36.spec | 2 +- dlls/d3dx9_36/d3dx9_36_main.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletions(-) diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec index 1a26ebc..c859e94 100644 --- a/dlls/d3dx9_36/d3dx9_36.spec +++ b/dlls/d3dx9_36/d3dx9_36.spec @@ -117,7 +117,7 @@ @ stub D3DXCreateVolumeTextureFromResourceExA @ stub D3DXCreateVolumeTextureFromResourceExW @ stub D3DXCreateVolumeTextureFromResourceW -@ stub D3DXDebugMute +@ stdcall D3DXDebugMute(long) @ stub D3DXDeclaratorFromFVF @ stub D3DXDisassembleEffect @ stub D3DXDisassembleShader diff --git a/dlls/d3dx9_36/d3dx9_36_main.c b/dlls/d3dx9_36/d3dx9_36_main.c index 1857eb9..6a98c60 100644 --- a/dlls/d3dx9_36/d3dx9_36_main.c +++ b/dlls/d3dx9_36/d3dx9_36_main.c @@ -66,6 +66,15 @@ BOOL WINAPI D3DXCheckVersion(UINT d3dsdkvers, UINT d3dxsdkvers) } /*********************************************************************** + * D3DXDebugMute + * Returns always FALSE for us. + */ +BOOL WINAPI D3DXDebugMute(BOOL mute) +{ + return FALSE; +} + +/*********************************************************************** * D3DXGetDriverLevel. * Returns always 900 (DX 9) for us */
1
0
0
0
Huw Davies : fonts: Start of a 9 pixel high strike for Tahoma.
by Alexandre Julliard
05 Mar '08
05 Mar '08
Module: wine Branch: master Commit: 6e2b8a743f11e588c32f424c0e940487bb063b94 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6e2b8a743f11e588c32f424c0…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Mar 5 16:54:01 2008 +0000 fonts: Start of a 9 pixel high strike for Tahoma. --- fonts/tahoma.sfd | 666 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 666 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=6e2b8a743f11e588c32f4…
1
0
0
0
Huw Davies : shell32: Add a test for ABM_GETTASKBARPOS.
by Alexandre Julliard
05 Mar '08
05 Mar '08
Module: wine Branch: master Commit: f372280928f587ad4e1228c499bbfffde3b9cea9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f372280928f587ad4e1228c49…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Mar 5 12:31:25 2008 +0000 shell32: Add a test for ABM_GETTASKBARPOS. --- dlls/shell32/shell32_main.c | 4 +++- dlls/shell32/tests/systray.c | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletions(-) diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c index ac9019a..4c2735b 100644 --- a/dlls/shell32/shell32_main.c +++ b/dlls/shell32/shell32_main.c @@ -882,7 +882,7 @@ UINT_PTR WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data) int height=data->rc.bottom - data->rc.top; RECT rec=data->rc; - TRACE("msg=%d, data={cb=%d, hwnd=%p, callback=%x, edge=%d, rc=%s, lparam=%lx}\n", + FIXME("msg=%d, data={cb=%d, hwnd=%p, callback=%x, edge=%d, rc=%s, lparam=%lx}: stub\n", msg, data->cbSize, data->hWnd, data->uCallbackMessage, data->uEdge, wine_dbgstr_rect(&data->rc), data->lParam); @@ -891,6 +891,8 @@ UINT_PTR WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data) case ABM_GETSTATE: return ABS_ALWAYSONTOP | ABS_AUTOHIDE; case ABM_GETTASKBARPOS: + /* FIXME: This is wrong. It should return the taskbar co-ords and edge from the monitor + which contains data->hWnd */ GetWindowRect(data->hWnd, &rec); data->rc=rec; return TRUE; diff --git a/dlls/shell32/tests/systray.c b/dlls/shell32/tests/systray.c index f1cd62b..f7fc747 100644 --- a/dlls/shell32/tests/systray.c +++ b/dlls/shell32/tests/systray.c @@ -79,6 +79,7 @@ static void test_SHAppBarMessage(void) { APPBARDATA abd; HWND hwnd, foregnd; + UINT_PTR ret; memset(&abd, 0xcc, sizeof(abd)); abd.cbSize = sizeof(abd); @@ -106,6 +107,19 @@ static void test_SHAppBarMessage(void) } } + memset(&abd, 0xcc, sizeof(abd)); + abd.cbSize = sizeof(abd); + ret = SHAppBarMessage(ABM_GETTASKBARPOS, &abd); + if(ret) + { + ok(abd.hWnd == (HWND)0xcccccccc, "hWnd overwritten\n"); +todo_wine +{ + ok(abd.uEdge >= ABE_LEFT && abd.uEdge <= ABE_BOTTOM, "uEdge not returned\n"); + ok(abd.rc.left != 0xcccccccc, "rc not updated\n"); +} + } + return; }
1
0
0
0
Huw Davies : shell32: ABM_GETAUTOHIDEBAR should return a HWND or NULL.
by Alexandre Julliard
05 Mar '08
05 Mar '08
Module: wine Branch: master Commit: b24ec72f89a01f1bdf0d8573e88d25f5bd7b0903 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b24ec72f89a01f1bdf0d8573e…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Mar 5 12:07:05 2008 +0000 shell32: ABM_GETAUTOHIDEBAR should return a HWND or NULL. --- dlls/shell32/shell32_main.c | 7 +++++-- dlls/shell32/tests/systray.c | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c index c53d726..ac9019a 100644 --- a/dlls/shell32/shell32_main.c +++ b/dlls/shell32/shell32_main.c @@ -882,6 +882,10 @@ UINT_PTR WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data) int height=data->rc.bottom - data->rc.top; RECT rec=data->rc; + TRACE("msg=%d, data={cb=%d, hwnd=%p, callback=%x, edge=%d, rc=%s, lparam=%lx}\n", + msg, data->cbSize, data->hWnd, data->uCallbackMessage, data->uEdge, + wine_dbgstr_rect(&data->rc), data->lParam); + switch (msg) { case ABM_GETSTATE: @@ -894,8 +898,7 @@ UINT_PTR WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data) SetActiveWindow(data->hWnd); return TRUE; case ABM_GETAUTOHIDEBAR: - data->hWnd=GetActiveWindow(); - return TRUE; + return 0; /* pretend there is no autohide bar */ case ABM_NEW: /* cbSize, hWnd, and uCallbackMessage are used. All other ignored */ SetWindowPos(data->hWnd,HWND_TOP,0,0,0,0,SWP_SHOWWINDOW|SWP_NOMOVE|SWP_NOSIZE); diff --git a/dlls/shell32/tests/systray.c b/dlls/shell32/tests/systray.c index 23e1ba3..f1cd62b 100644 --- a/dlls/shell32/tests/systray.c +++ b/dlls/shell32/tests/systray.c @@ -75,6 +75,40 @@ void test_cbsize(void) ok(!Shell_NotifyIconA(NIM_DELETE, &nidA), "The icon was not deleted\n"); } +static void test_SHAppBarMessage(void) +{ + APPBARDATA abd; + HWND hwnd, foregnd; + + memset(&abd, 0xcc, sizeof(abd)); + abd.cbSize = sizeof(abd); + abd.uEdge = ABE_BOTTOM; + + hwnd = (HWND)SHAppBarMessage(ABM_GETAUTOHIDEBAR, &abd); + ok(hwnd == NULL || IsWindow(hwnd), "ret %p which is not a window\n", hwnd); + ok(abd.hWnd == (HWND)0xcccccccc, "hWnd overwritten\n"); + + /* Presumably one can pass a hwnd with ABM_GETAUTOHIDEBAR to specify a monitor. + Pass the foreground window and check */ + foregnd = GetForegroundWindow(); + if(foregnd) + { + abd.hWnd = foregnd; + hwnd = (HWND)SHAppBarMessage(ABM_GETAUTOHIDEBAR, &abd); + ok(hwnd == NULL || IsWindow(hwnd), "ret %p which is not a window\n", hwnd); + ok(abd.hWnd == foregnd, "hWnd overwritten\n"); + if(hwnd) + { + HMONITOR appbar_mon, foregnd_mon; + appbar_mon = MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST); + foregnd_mon = MonitorFromWindow(foregnd, MONITOR_DEFAULTTONEAREST); + ok(appbar_mon == foregnd_mon, "Windows on different monitors\n"); + } + } + + return; +} + START_TEST(systray) { WNDCLASSA wc; @@ -110,4 +144,6 @@ START_TEST(systray) DispatchMessageA(&msg); } DestroyWindow(hMainWnd); + + test_SHAppBarMessage(); }
1
0
0
0
Huw Davies : shell32: Fix return type of SHAppBarMessage.
by Alexandre Julliard
05 Mar '08
05 Mar '08
Module: wine Branch: master Commit: c9c77ba7f7b916ee1b3543807aef48048ee89e07 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c9c77ba7f7b916ee1b3543807…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Mar 5 10:46:31 2008 +0000 shell32: Fix return type of SHAppBarMessage. --- dlls/shell32/shell32_main.c | 2 +- include/shellapi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c index 336a519..c53d726 100644 --- a/dlls/shell32/shell32_main.c +++ b/dlls/shell32/shell32_main.c @@ -876,7 +876,7 @@ static BOOL __get_dropline( HWND hWnd, LPRECT lprect ) /************************************************************************* * SHAppBarMessage [SHELL32.@] */ -UINT WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data) +UINT_PTR WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data) { int width=data->rc.right - data->rc.left; int height=data->rc.bottom - data->rc.top; diff --git a/include/shellapi.h b/include/shellapi.h index 5b77e53..67e8923 100644 --- a/include/shellapi.h +++ b/include/shellapi.h @@ -95,7 +95,7 @@ typedef struct _AppBarData LPARAM lParam; } APPBARDATA, *PAPPBARDATA; -UINT WINAPI SHAppBarMessage(DWORD,PAPPBARDATA); +UINT_PTR WINAPI SHAppBarMessage(DWORD,PAPPBARDATA); /****************************************** * SHGetFileInfo
1
0
0
0
Stefan Dösinger : wined3d: Support shininess > 128 if opengl does.
by Alexandre Julliard
05 Mar '08
05 Mar '08
Module: wine Branch: master Commit: d20768c12028b4e6671b80e06bb4917fcc758479 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d20768c12028b4e6671b80e06…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Sun Mar 2 00:02:18 2008 +0100 wined3d: Support shininess > 128 if opengl does. --- dlls/wined3d/directx.c | 6 ++++++ dlls/wined3d/state.c | 13 +++++++------ include/wine/wined3d_gl.h | 9 +++++++++ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 3d819f1..2e85eba 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -128,6 +128,7 @@ static const struct { {"GL_NV_vertex_program2", NV_VERTEX_PROGRAM2, 0 }, {"GL_NV_vertex_program3", NV_VERTEX_PROGRAM3, 0 }, {"GL_NV_depth_clamp", NV_DEPTH_CLAMP, 0 }, + {"GL_NV_light_max_exponent", NV_LIGHT_MAX_EXPONENT, 0 }, /* SGI */ {"GL_SGIS_generate_mipmap", SGIS_GENERATE_MIPMAP, 0 }, @@ -955,6 +956,11 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) { } else if (gl_info->supported[NV_FRAGMENT_PROGRAM]) { gl_info->ps_nv_version = PS_VERSION_20; } + if (gl_info->supported[NV_LIGHT_MAX_EXPONENT]) { + glGetFloatv(GL_MAX_SHININESS_NV, &gl_info->max_shininess); + } else { + gl_info->max_shininess = 128.0; + } if (gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO]) { /* If we have full NP2 texture support, disable GL_ARB_texture_rectangle because we will never use it. * This saves a few redundant glDisable calls diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 4dff4c0..616b28f 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -664,14 +664,15 @@ state_specularenable(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCon glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, (float*) &stateblock->material.Specular); checkGLcall("glMaterialfv"); - if(stateblock->material.Power > 128.0) { + if(stateblock->material.Power > GL_LIMITS(shininess)) { /* glMaterialf man page says that the material says that GL_SHININESS must be between 0.0 - * and 128.0, although in d3d neither -1 nor 129 produce an error. For values > 128 clamp - * them, since 128 results in a hardly visible specular highlight, so it should be safe to - * to clamp to 128 + * and 128.0, although in d3d neither -1 nor 129 produce an error. GL_NV_max_light_exponent + * allows bigger values. If the extension is supported, GL_LIMITS(shininess) contains the + * value reported by the extension, otherwise 128. For values > GL_LIMITS(shininess) clamp + * them, it should be safe to do so without major visual dissortions. */ - WARN("Material power > 128\n"); - glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 128.0); + WARN("Material power = %f, limit %f\n", stateblock->material.Power, GL_LIMITS(shininess)); + glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, GL_LIMITS(shininess)); } else { glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, stateblock->material.Power); } diff --git a/include/wine/wined3d_gl.h b/include/wine/wined3d_gl.h index ac1457f..1e45b20 100644 --- a/include/wine/wined3d_gl.h +++ b/include/wine/wined3d_gl.h @@ -2913,6 +2913,13 @@ typedef void (WINE_GLAPI * PGLFNPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, typedef void (WINE_GLAPI * PGLFNPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const float *params); #endif +/* GL_NV_light_max_exponent */ +#ifndef GL_NV_light_max_exponent +#define GL_NV_light_max_exponent +#define GL_MAX_SHININESS_NV 0x8504 +#define GL_MAX_SPOT_EXPONENT_NV 0x8505 +#endif + /* GL_VERSION_2_0 */ #ifndef GL_VERSION_2_0 #define GL_VERSION_2_0 1 @@ -3267,6 +3274,7 @@ typedef enum _GL_SupportedExt { NV_VERTEX_PROGRAM3, NV_FENCE, NV_DEPTH_CLAMP, + NV_LIGHT_MAX_EXPONENT, /* ATI */ ATI_SEPARATE_STENCIL, ATI_TEXTURE_ENV_COMBINE3, @@ -3722,6 +3730,7 @@ typedef struct _WineD3D_GL_Info { UINT max_anisotropy; UINT max_aux_buffers; UINT max_glsl_varyings; + float max_shininess; unsigned max_vshader_constantsF; unsigned max_pshader_constantsF;
1
0
0
0
Stefan Dösinger : d3d9: Add a test testing two texbem instructions in one shader.
by Alexandre Julliard
05 Mar '08
05 Mar '08
Module: wine Branch: master Commit: 73ba896e8ef6ac218a03ede6b46d78342bf86946 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=73ba896e8ef6ac218a03ede6b…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Sat Mar 1 22:06:38 2008 +0100 d3d9: Add a test testing two texbem instructions in one shader. --- dlls/d3d9/tests/visual.c | 138 +++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 137 insertions(+), 1 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index fdafb88..cccb2fc 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -1505,6 +1505,16 @@ static void texbem_test(IDirect3DDevice9 *device) 0x00000001, 0x800f0000, 0xb0e40001, /* mov r0, t1*/ 0x0000ffff }; + static const DWORD double_texbem_code[] = { + 0xffff0103, /* ps_1_3 */ + 0x00000042, 0xb00f0000, /* tex t0 */ + 0x00000043, 0xb00f0001, 0xb0e40000, /* texbem t1, t0 */ + 0x00000042, 0xb00f0002, /* tex t2 */ + 0x00000043, 0xb00f0003, 0xb0e40002, /* texbem t3, t2 */ + 0x00000002, 0x800f0000, 0xb0e40001, 0xb0e40003, /* add r0, t1, t3 */ + 0x0000ffff /* end */ + }; + static const float quad[][7] = { {-128.0f/640.0f, -128.0f/480.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f}, @@ -1536,7 +1546,8 @@ static void texbem_test(IDirect3DDevice9 *device) IDirect3DVertexDeclaration9 *vertex_declaration = NULL; IDirect3DPixelShader9 *pixel_shader = NULL; - IDirect3DTexture9 *texture = NULL; + IDirect3DTexture9 *texture = NULL, *texture1, *texture2; + D3DLOCKED_RECT locked_rect; generate_bumpmap_textures(device); @@ -1619,6 +1630,131 @@ static void texbem_test(IDirect3DDevice9 *device) ok(SUCCEEDED(hr), "SetTexture failed (0x%08x)\n", hr); IDirect3DTexture9_Release(texture); } + + /* Test double texbem */ + hr = IDirect3DDevice9_CreateTexture(device, 1, 1, 1, 0, D3DFMT_V8U8, D3DPOOL_MANAGED, &texture, NULL); + ok(SUCCEEDED(hr), "IDirect3DDevice9_CreateTexture failed (0x%08x)\n", hr); + hr = IDirect3DDevice9_CreateTexture(device, 1, 1, 1, 0, D3DFMT_V8U8, D3DPOOL_MANAGED, &texture1, NULL); + ok(SUCCEEDED(hr), "IDirect3DDevice9_CreateTexture failed (0x%08x)\n", hr); + hr = IDirect3DDevice9_CreateTexture(device, 8, 8, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &texture2, NULL); + ok(SUCCEEDED(hr), "IDirect3DDevice9_CreateTexture failed (0x%08x)\n", hr); + hr = IDirect3DDevice9_CreatePixelShader(device, double_texbem_code, &pixel_shader); + ok(SUCCEEDED(hr), "CreatePixelShader failed (%08x)\n", hr); + + hr = IDirect3DTexture9_LockRect(texture, 0, &locked_rect, NULL, 0); + ok(SUCCEEDED(hr), "LockRect failed (0x%08x)\n", hr); + ((signed char *) locked_rect.pBits)[0] = (-1.0 / 8.0) * 127; + ((signed char *) locked_rect.pBits)[1] = ( 1.0 / 8.0) * 127; + + hr = IDirect3DTexture9_UnlockRect(texture, 0); + ok(SUCCEEDED(hr), "LockRect failed (0x%08x)\n", hr); + + hr = IDirect3DTexture9_LockRect(texture1, 0, &locked_rect, NULL, 0); + ok(SUCCEEDED(hr), "LockRect failed (0x%08x)\n", hr); + ((signed char *) locked_rect.pBits)[0] = (-2.0 / 8.0) * 127; + ((signed char *) locked_rect.pBits)[1] = (-4.0 / 8.0) * 127; + hr = IDirect3DTexture9_UnlockRect(texture1, 0); + ok(SUCCEEDED(hr), "LockRect failed (0x%08x)\n", hr); + + { + /* Some data without any meaning, just to have an 8x8 array to see which element is picked */ +#define tex 0x00ff0000 +#define tex1 0x0000ff00 +#define origin 0x000000ff + static const DWORD pixel_data[] = { + 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, + 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, + 0x000000ff, tex1 , 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, + 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, + 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, origin, 0x000000ff, tex , 0x000000ff, + 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, + 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, + 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, + }; +#undef tex1 +#undef tex2 +#undef origin + + hr = IDirect3DTexture9_LockRect(texture2, 0, &locked_rect, NULL, 0); + ok(SUCCEEDED(hr), "LockRect failed (0x%08x)\n", hr); + for(i = 0; i < 8; i++) { + memcpy(((char *) locked_rect.pBits) + i * locked_rect.Pitch, pixel_data + 8 * i, 8 * sizeof(DWORD)); + } + hr = IDirect3DTexture9_UnlockRect(texture2, 0); + ok(SUCCEEDED(hr), "LockRect failed (0x%08x)\n", hr); + } + + hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *) texture); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTexture failed (0x%08x)\n", hr); + hr = IDirect3DDevice9_SetTexture(device, 1, (IDirect3DBaseTexture9 *) texture2); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTexture failed (0x%08x)\n", hr); + hr = IDirect3DDevice9_SetTexture(device, 2, (IDirect3DBaseTexture9 *) texture1); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTexture failed (0x%08x)\n", hr); + hr = IDirect3DDevice9_SetTexture(device, 3, (IDirect3DBaseTexture9 *) texture2); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTexture failed (0x%08x)\n", hr); + hr = IDirect3DDevice9_SetPixelShader(device, pixel_shader); + ok(SUCCEEDED(hr), "Direct3DDevice9_SetPixelShader failed (0x%08x)\n", hr); + hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX4); + ok(SUCCEEDED(hr), "Direct3DDevice9_SetPixelShader failed (0x%08x)\n", hr); + + bumpenvmat[0] =-1.0; bumpenvmat[2] = 2.0; + bumpenvmat[1] = 0.0; bumpenvmat[3] = 0.0; + IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_BUMPENVMAT00, *(LPDWORD)&bumpenvmat[0]); + IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_BUMPENVMAT01, *(LPDWORD)&bumpenvmat[1]); + IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_BUMPENVMAT10, *(LPDWORD)&bumpenvmat[2]); + IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_BUMPENVMAT11, *(LPDWORD)&bumpenvmat[3]); + + bumpenvmat[0] = 1.5; bumpenvmat[2] = 0.0; + bumpenvmat[1] = 0.0; bumpenvmat[3] = 0.5; + IDirect3DDevice9_SetTextureStageState(device, 3, D3DTSS_BUMPENVMAT00, *(LPDWORD)&bumpenvmat[0]); + IDirect3DDevice9_SetTextureStageState(device, 3, D3DTSS_BUMPENVMAT01, *(LPDWORD)&bumpenvmat[1]); + IDirect3DDevice9_SetTextureStageState(device, 3, D3DTSS_BUMPENVMAT10, *(LPDWORD)&bumpenvmat[2]); + IDirect3DDevice9_SetTextureStageState(device, 3, D3DTSS_BUMPENVMAT11, *(LPDWORD)&bumpenvmat[3]); + + hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP); + hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP); + hr = IDirect3DDevice9_SetSamplerState(device, 1, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP); + hr = IDirect3DDevice9_SetSamplerState(device, 1, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP); + hr = IDirect3DDevice9_SetSamplerState(device, 2, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP); + hr = IDirect3DDevice9_SetSamplerState(device, 2, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP); + hr = IDirect3DDevice9_SetSamplerState(device, 3, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP); + hr = IDirect3DDevice9_SetSamplerState(device, 3, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP); + + hr = IDirect3DDevice9_BeginScene(device); + ok(SUCCEEDED(hr), "BeginScene failed (0x%08x)\n", hr); + if(SUCCEEDED(hr)) { + static const float double_quad[] = { + -1.0, -1.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.5, 0.5, + 1.0, -1.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.5, 0.5, + -1.0, 1.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.5, 0.5, + 1.0, 1.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.5, 0.5, + }; + + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, double_quad, sizeof(float) * 11); + ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (0x%08x)\n", hr); + hr = IDirect3DDevice9_EndScene(device); + ok(SUCCEEDED(hr), "EndScene failed (0x%08x)\n", hr); + } + hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); + ok(SUCCEEDED(hr), "Present failed (0x%08x)\n", hr); + color = getPixelColor(device, 320, 240); + ok(color == 0x00ffff00, "double texbem failed: Got color 0x%08x, expected 0x00ffff00.\n", color); + + hr = IDirect3DDevice9_SetTexture(device, 0, NULL); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTexture failed (0x%08x)\n", hr); + hr = IDirect3DDevice9_SetTexture(device, 1, NULL); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTexture failed (0x%08x)\n", hr); + hr = IDirect3DDevice9_SetTexture(device, 2, NULL); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTexture failed (0x%08x)\n", hr); + hr = IDirect3DDevice9_SetTexture(device, 3, NULL); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTexture failed (0x%08x)\n", hr); + hr = IDirect3DDevice9_SetPixelShader(device, NULL); + ok(SUCCEEDED(hr), "Direct3DDevice9_SetPixelShader failed (0x%08x)\n", hr); + + IDirect3DPixelShader9_Release(pixel_shader); + IDirect3DTexture9_Release(texture); + IDirect3DTexture9_Release(texture1); + IDirect3DTexture9_Release(texture2); } static void z_range_test(IDirect3DDevice9 *device)
1
0
0
0
← Newer
1
...
82
83
84
85
86
87
88
...
101
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
Results per page:
10
25
50
100
200