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
June 2007
----- 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
5 participants
856 discussions
Start a n
N
ew thread
Misha Koshelev : winemenubuilder: Create/ release semaphore only around call to wineshelllink.
by Alexandre Julliard
28 Jun '07
28 Jun '07
Module: wine Branch: master Commit: e340cafe741ee7d686ce63e145313b44677e1852 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e340cafe741ee7d686ce63e14…
Author: Misha Koshelev <mk144210(a)bcm.edu> Date: Wed Jun 27 20:23:30 2007 -0500 winemenubuilder: Create/release semaphore only around call to wineshelllink. --- programs/winemenubuilder/winemenubuilder.c | 25 +++++++++++++------------ 1 files changed, 13 insertions(+), 12 deletions(-) diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c index 7c537ca..cac3abf 100644 --- a/programs/winemenubuilder/winemenubuilder.c +++ b/programs/winemenubuilder/winemenubuilder.c @@ -907,6 +907,7 @@ static BOOL InvokeShellLinker( IShellLinkW *sl, LPCWSTR link, BOOL bAgain ) WCHAR szArgs[INFOTIPSIZE], szIconPath[MAX_PATH]; int iIconId = 0, r = -1; DWORD csidl = -1; + HANDLE hsem = NULL; if ( !link ) { @@ -1015,11 +1016,23 @@ static BOOL InvokeShellLinker( IShellLinkW *sl, LPCWSTR link, BOOL bAgain ) escaped_args = escape(szArgs); escaped_description = escape(szDescription); + /* running multiple instances of wineshelllink + at the same time may be dangerous */ + hsem = CreateSemaphoreA( NULL, 1, 1, "winemenubuilder_semaphore"); + if( WAIT_OBJECT_0 != WaitForSingleObject( hsem, INFINITE ) ) + { + WINE_ERR("failed wait for semaphore\n"); + goto cleanup; + } + r = fork_and_wait("wineshelllink", link_name, escaped_path, in_desktop_dir(csidl), escaped_args, icon_name, work_dir ? work_dir : "", escaped_description); + ReleaseSemaphore( hsem, 1, NULL ); + cleanup: + if (hsem) CloseHandle( hsem ); HeapFree( GetProcessHeap(), 0, icon_name ); HeapFree( GetProcessHeap(), 0, work_dir ); HeapFree( GetProcessHeap(), 0, link_name ); @@ -1147,17 +1160,8 @@ int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show { LPSTR token = NULL, p; BOOL bAgain = FALSE; - HANDLE hsem = CreateSemaphoreA( NULL, 1, 1, "winemenubuilder_semaphore"); int ret = 0; - /* running multiple instances of wineshelllink - at the same time may be dangerous */ - if( WAIT_OBJECT_0 != WaitForSingleObject( hsem, INFINITE ) ) - { - CloseHandle(hsem); - return FALSE; - } - for( p = cmdline; p && *p; ) { token = next_token( &p ); @@ -1182,8 +1186,5 @@ int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show } } - ReleaseSemaphore( hsem, 1, NULL ); - CloseHandle( hsem ); - return ret; }
1
0
0
0
Aric Stewart : riched20: Make richedit control IME aware.
by Alexandre Julliard
28 Jun '07
28 Jun '07
Module: wine Branch: master Commit: c03125a1be04d4a2c9f047d92a32b4eb6869ae68 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c03125a1be04d4a2c9f047d92…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Wed Jun 27 07:57:51 2007 -0500 riched20: Make richedit control IME aware. --- dlls/riched20/Makefile.in | 2 +- dlls/riched20/editor.c | 59 +++++++++++++++++++++++++++++++++++++++++++++ dlls/riched20/editstr.h | 2 + 3 files changed, 62 insertions(+), 1 deletions(-) diff --git a/dlls/riched20/Makefile.in b/dlls/riched20/Makefile.in index 87feccd..6b974e5 100644 --- a/dlls/riched20/Makefile.in +++ b/dlls/riched20/Makefile.in @@ -4,7 +4,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = riched20.dll IMPORTLIB = libriched20.$(IMPLIBEXT) -IMPORTS = ole32 user32 gdi32 kernel32 +IMPORTS = ole32 imm32 user32 gdi32 kernel32 EXTRALIBS = -luuid C_SRCS = \ diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index b83fb41..4cdb54a 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -227,6 +227,7 @@ #define NO_SHLWAPI_STREAM #include "shlwapi.h" #include "rtf.h" +#include "imm.h" #define STACK_SIZE_DEFAULT 100 #define STACK_SIZE_MAX 1000 @@ -2515,6 +2516,64 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, ME_RewrapRepaint(editor); return DefWindowProcW(hWnd, msg, wParam, lParam); } + /* IME messages to make richedit controls IME aware */ + case WM_IME_SETCONTEXT: + case WM_IME_CONTROL: + case WM_IME_SELECT: + case WM_IME_COMPOSITIONFULL: + return 0; + case WM_IME_STARTCOMPOSITION: + { + editor->imeStartIndex=ME_GetCursorOfs(editor,0); + ME_DeleteSelection(editor); + ME_CommitUndo(editor); + ME_UpdateRepaint(editor); + return 0; + } + case WM_IME_COMPOSITION: + { + HIMC hIMC; + + ME_Style *style = ME_GetInsertStyle(editor, 0); + hIMC = ImmGetContext(hWnd); + ME_DeleteSelection(editor); + ME_CommitUndo(editor); + ME_SaveTempStyle(editor); + if (lParam & GCS_RESULTSTR) + { + LPWSTR lpCompStr = NULL; + DWORD dwBufLen; + + dwBufLen = ImmGetCompositionStringW(hIMC, GCS_RESULTSTR, NULL, 0); + lpCompStr = HeapAlloc(GetProcessHeap(),0,dwBufLen + sizeof(WCHAR)); + ImmGetCompositionStringW(hIMC, GCS_RESULTSTR, lpCompStr, dwBufLen); + lpCompStr[dwBufLen/sizeof(WCHAR)] = 0; + ME_InsertTextFromCursor(editor,0,lpCompStr,dwBufLen/sizeof(WCHAR),style); + } + else if (lParam & GCS_COMPSTR) + { + LPWSTR lpCompStr = NULL; + DWORD dwBufLen; + + dwBufLen = ImmGetCompositionStringW(hIMC, GCS_COMPSTR, NULL, 0); + lpCompStr = HeapAlloc(GetProcessHeap(),0,dwBufLen + sizeof(WCHAR)); + ImmGetCompositionStringW(hIMC, GCS_COMPSTR, lpCompStr, dwBufLen); + lpCompStr[dwBufLen/sizeof(WCHAR)] = 0; + + ME_InsertTextFromCursor(editor,0,lpCompStr,dwBufLen/sizeof(WCHAR),style); + ME_SetSelection(editor,editor->imeStartIndex, + editor->imeStartIndex + dwBufLen/sizeof(WCHAR)); + } + ME_ReleaseStyle(style); + ME_UpdateRepaint(editor); + return 0; + } + case WM_IME_ENDCOMPOSITION: + { + ME_DeleteSelection(editor); + editor->imeStartIndex=-1; + return 0; + } case EM_GETOLEINTERFACE: { LPVOID *ppvObj = (LPVOID*) lParam; diff --git a/dlls/riched20/editstr.h b/dlls/riched20/editstr.h index ee5dfe3..7bb91d5 100644 --- a/dlls/riched20/editstr.h +++ b/dlls/riched20/editstr.h @@ -322,6 +322,8 @@ typedef struct tagME_TextEditor BOOL AutoURLDetect_bEnable; WCHAR cPasswordMask; BOOL bHaveFocus; + /*for IME */ + int imeStartIndex; } ME_TextEditor; typedef struct tagME_Context
1
0
0
0
Jeff Latimer : cabinet: Fix a potential NULL reference.
by Alexandre Julliard
28 Jun '07
28 Jun '07
Module: wine Branch: master Commit: 33af21fdcf368c1afb3b24ded32bb4b7afcfd76c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=33af21fdcf368c1afb3b24ded…
Author: Jeff Latimer <lats(a)yless4u.com.au> Date: Wed Jun 27 22:10:38 2007 +1000 cabinet: Fix a potential NULL reference. --- dlls/cabinet/fci.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/dlls/cabinet/fci.c b/dlls/cabinet/fci.c index 112c06b..b5e6c9c 100644 --- a/dlls/cabinet/fci.c +++ b/dlls/cabinet/fci.c @@ -173,7 +173,11 @@ HFCI __cdecl FCICreate( int err; PFCI_Int p_fci_internal; - if ((!perf) || (!pfnalloc) || (!pfnfree) || (!pfnopen) || (!pfnread) || + if (!perf) { + SetLastError(ERROR_BAD_ARGUMENTS); + return NULL; + } + if ((!pfnalloc) || (!pfnfree) || (!pfnopen) || (!pfnread) || (!pfnwrite) || (!pfnclose) || (!pfnseek) || (!pfndelete) || (!pfnfcigtf) || (!pccab)) { perf->erfOper = FCIERR_NONE;
1
0
0
0
Vitaliy Margolen : dinput: Combine all Release functionality into base class.
by Alexandre Julliard
28 Jun '07
28 Jun '07
Module: wine Branch: master Commit: fb1082ae737e9d5eea68c1c5e9b42df2589cce1e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fb1082ae737e9d5eea68c1c5e…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Wed Jun 27 06:58:27 2007 -0600 dinput: Combine all Release functionality into base class. --- dlls/dinput/device.c | 20 +++++++++++++--- dlls/dinput/joystick_linux.c | 43 +----------------------------------- dlls/dinput/joystick_linuxinput.c | 37 +------------------------------ dlls/dinput/keyboard.c | 29 +----------------------- dlls/dinput/mouse.c | 33 +-------------------------- 5 files changed, 24 insertions(+), 138 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=fb1082ae737e9d5eea68c…
1
0
0
0
Vitaliy Margolen : dinput: Move parent dinput reference into base class.
by Alexandre Julliard
28 Jun '07
28 Jun '07
Module: wine Branch: master Commit: d2966c2dfb89f9c7479dbfd93446c7556d238511 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d2966c2dfb89f9c7479dbfd93…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Wed Jun 27 06:58:08 2007 -0600 dinput: Move parent dinput reference into base class. --- dlls/dinput/device_private.h | 2 ++ dlls/dinput/joystick_linux.c | 13 +++++-------- dlls/dinput/joystick_linuxinput.c | 13 +++++-------- dlls/dinput/keyboard.c | 16 +++++++--------- dlls/dinput/mouse.c | 18 ++++++++---------- 5 files changed, 27 insertions(+), 35 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=d2966c2dfb89f9c7479db…
1
0
0
0
Vitaliy Margolen : dinput: Remove duplicate code.
by Alexandre Julliard
28 Jun '07
28 Jun '07
Module: wine Branch: master Commit: 75a17709ea982642753af8ff0dc99282b38a201f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=75a17709ea982642753af8ff0…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Wed Jun 27 06:57:57 2007 -0600 dinput: Remove duplicate code. --- dlls/dinput/dinput_main.c | 72 ++++++++++----------------------------------- 1 files changed, 16 insertions(+), 56 deletions(-) diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index 402855e..28718fa 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -297,62 +297,6 @@ static HRESULT WINAPI IDirectInputWImpl_QueryInterface(LPDIRECTINPUT7W iface, RE return E_FAIL; } -static HRESULT WINAPI IDirectInputAImpl_CreateDevice( - LPDIRECTINPUT7A iface,REFGUID rguid,LPDIRECTINPUTDEVICEA* pdev, - LPUNKNOWN punk -) { - IDirectInputImpl *This = (IDirectInputImpl *)iface; - HRESULT ret_value = DIERR_DEVICENOTREG; - int i; - - TRACE("(this=%p,%s,%p,%p)\n",This,debugstr_guid(rguid),pdev,punk); - - if (pdev == NULL) { - WARN("invalid pointer: pdev == NULL\n"); - return E_POINTER; - } - - if (rguid == NULL) { - WARN("invalid pointer: rguid == NULL\n"); - return E_POINTER; - } - - /* Loop on all the devices to see if anyone matches the given GUID */ - for (i = 0; i < NB_DINPUT_DEVICES; i++) { - HRESULT ret; - if (!dinput_devices[i]->create_deviceA) continue; - if ((ret = dinput_devices[i]->create_deviceA(This, rguid, NULL, pdev)) == DI_OK) - return DI_OK; - - if (ret == DIERR_NOINTERFACE) - ret_value = DIERR_NOINTERFACE; - } - - return ret_value; -} - -static HRESULT WINAPI IDirectInputWImpl_CreateDevice(LPDIRECTINPUT7W iface, - REFGUID rguid, LPDIRECTINPUTDEVICEW* pdev, LPUNKNOWN punk) { - IDirectInputImpl *This = (IDirectInputImpl *)iface; - HRESULT ret_value = DIERR_DEVICENOTREG; - int i; - - TRACE("(this=%p,%s,%p,%p)\n",This,debugstr_guid(rguid),pdev,punk); - - /* Loop on all the devices to see if anyone matches the given GUID */ - for (i = 0; i < NB_DINPUT_DEVICES; i++) { - HRESULT ret; - if (!dinput_devices[i]->create_deviceW) continue; - if ((ret = dinput_devices[i]->create_deviceW(This, rguid, NULL, pdev)) == DI_OK) - return DI_OK; - - if (ret == DIERR_NOINTERFACE) - ret_value = DIERR_NOINTERFACE; - } - - return ret_value; -} - static HRESULT WINAPI IDirectInputAImpl_Initialize(LPDIRECTINPUT7A iface, HINSTANCE hinst, DWORD x) { TRACE("(this=%p,%p,%x)\n",iface, hinst, x); @@ -406,6 +350,8 @@ static HRESULT WINAPI IDirectInput7AImpl_CreateDeviceEx(LPDIRECTINPUT7A iface, R TRACE("(%p)->(%s, %s, %p, %p)\n", This, debugstr_guid(rguid), debugstr_guid(riid), pvOut, lpUnknownOuter); + if (!rguid || !pvOut) return E_POINTER; + /* Loop on all the devices to see if anyone matches the given GUID */ for (i = 0; i < NB_DINPUT_DEVICES; i++) { HRESULT ret; @@ -429,6 +375,8 @@ static HRESULT WINAPI IDirectInput7WImpl_CreateDeviceEx(LPDIRECTINPUT7W iface, R TRACE("(%p)->(%s, %s, %p, %p)\n", This, debugstr_guid(rguid), debugstr_guid(riid), pvOut, lpUnknownOuter); + if (!rguid || !pvOut) return E_POINTER; + /* Loop on all the devices to see if anyone matches the given GUID */ for (i = 0; i < NB_DINPUT_DEVICES; i++) { HRESULT ret; @@ -443,6 +391,18 @@ static HRESULT WINAPI IDirectInput7WImpl_CreateDeviceEx(LPDIRECTINPUT7W iface, R return ret_value; } +static HRESULT WINAPI IDirectInputAImpl_CreateDevice(LPDIRECTINPUT7A iface, REFGUID rguid, + LPDIRECTINPUTDEVICEA* pdev, LPUNKNOWN punk) +{ + return IDirectInput7AImpl_CreateDeviceEx(iface, rguid, NULL, (LPVOID*)pdev, punk); +} + +static HRESULT WINAPI IDirectInputWImpl_CreateDevice(LPDIRECTINPUT7W iface, REFGUID rguid, + LPDIRECTINPUTDEVICEW* pdev, LPUNKNOWN punk) +{ + return IDirectInput7WImpl_CreateDeviceEx(iface, rguid, NULL, (LPVOID*)pdev, punk); +} + static HRESULT WINAPI IDirectInput8AImpl_QueryInterface(LPDIRECTINPUT8A iface, REFIID riid, LPVOID *ppobj) { IDirectInputImpl *This = (IDirectInputImpl *)iface;
1
0
0
0
H. Verbeet : wined3d: Check more thoroughly if a stage references a texture .
by Alexandre Julliard
28 Jun '07
28 Jun '07
Module: wine Branch: master Commit: 47708a771714ea9853d4b1490530f675a5e32fb3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=47708a771714ea9853d4b1490…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Wed Jun 27 23:47:24 2007 +0200 wined3d: Check more thoroughly if a stage references a texture. --- dlls/wined3d/device.c | 33 ++++++++++++++++++++++++++++++++- 1 files changed, 32 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 1385c37..55b161d 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3222,7 +3222,38 @@ static void device_update_fixed_function_usage_map(IWineD3DDeviceImpl *This) { int i; for (i = 0; i < MAX_TEXTURES; ++i) { - This->fixed_function_usage_map[i] = This->stateBlock->textures[i] ? TRUE : FALSE; + WINED3DTEXTUREOP color_op = This->stateBlock->textureState[i][WINED3DTSS_COLOROP]; + WINED3DTEXTUREOP alpha_op = This->stateBlock->textureState[i][WINED3DTSS_ALPHAOP]; + DWORD color_arg1 = This->stateBlock->textureState[i][WINED3DTSS_COLORARG1] & WINED3DTA_SELECTMASK; + DWORD color_arg2 = This->stateBlock->textureState[i][WINED3DTSS_COLORARG2] & WINED3DTA_SELECTMASK; + DWORD color_arg3 = This->stateBlock->textureState[i][WINED3DTSS_COLORARG0] & WINED3DTA_SELECTMASK; + DWORD alpha_arg1 = This->stateBlock->textureState[i][WINED3DTSS_ALPHAARG1] & WINED3DTA_SELECTMASK; + DWORD alpha_arg2 = This->stateBlock->textureState[i][WINED3DTSS_ALPHAARG2] & WINED3DTA_SELECTMASK; + DWORD alpha_arg3 = This->stateBlock->textureState[i][WINED3DTSS_ALPHAARG0] & WINED3DTA_SELECTMASK; + + if (color_op == WINED3DTOP_DISABLE) { + /* Not used, and disable higher stages */ + while (i < MAX_TEXTURES) { + This->fixed_function_usage_map[i] = FALSE; + ++i; + } + break; + } + + if (((color_arg1 == WINED3DTA_TEXTURE) && color_op != WINED3DTOP_SELECTARG2) + || ((color_arg2 == WINED3DTA_TEXTURE) && color_op != WINED3DTOP_SELECTARG1) + || ((color_arg3 == WINED3DTA_TEXTURE) && (color_op == WINED3DTOP_MULTIPLYADD || color_op == WINED3DTOP_LERP)) + || ((alpha_arg1 == WINED3DTA_TEXTURE) && alpha_op != WINED3DTOP_SELECTARG2) + || ((alpha_arg2 == WINED3DTA_TEXTURE) && alpha_op != WINED3DTOP_SELECTARG1) + || ((alpha_arg3 == WINED3DTA_TEXTURE) && (alpha_op == WINED3DTOP_MULTIPLYADD || alpha_op == WINED3DTOP_LERP))) { + This->fixed_function_usage_map[i] = TRUE; + } else { + This->fixed_function_usage_map[i] = FALSE; + } + + if ((color_op == WINED3DTOP_BUMPENVMAP || color_op == WINED3DTOP_BUMPENVMAPLUMINANCE) && i < MAX_TEXTURES - 1) { + This->fixed_function_usage_map[i+1] = TRUE; + } } }
1
0
0
0
H. Verbeet : wined3d: Map vertex samplers to a texturing unit.
by Alexandre Julliard
28 Jun '07
28 Jun '07
Module: wine Branch: master Commit: d2d6952fd587b3a38c251070a2035b084e1d7792 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d2d6952fd587b3a38c251070a…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Wed Jun 27 23:47:06 2007 +0200 wined3d: Map vertex samplers to a texturing unit. --- dlls/wined3d/device.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 66 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 8f2905f..1385c37 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3297,7 +3297,69 @@ static void device_map_psamplers(IWineD3DDeviceImpl *This) { } } +static BOOL device_unit_free_for_vs(IWineD3DDeviceImpl *This, DWORD *pshader_sampler_tokens, DWORD *vshader_sampler_tokens, int unit) { + int current_mapping = This->rev_tex_unit_map[unit]; + + if (current_mapping == -1) { + /* Not currently used */ + return TRUE; + } + + if (current_mapping < MAX_FRAGMENT_SAMPLERS) { + /* Used by a fragment sampler */ + + if (!pshader_sampler_tokens) { + /* No pixel shader, check fixed function */ + return current_mapping >= MAX_TEXTURES || !This->fixed_function_usage_map[current_mapping]; + } + + /* Pixel shader, check the shader's sampler map */ + return !pshader_sampler_tokens[current_mapping]; + } + + /* Used by a vertex sampler */ + return !vshader_sampler_tokens[current_mapping]; +} + +static void device_map_vsamplers(IWineD3DDeviceImpl *This, BOOL ps) { + DWORD *vshader_sampler_tokens = ((IWineD3DVertexShaderImpl *)This->stateBlock->vertexShader)->baseShader.reg_maps.samplers; + DWORD *pshader_sampler_tokens = NULL; + int start = GL_LIMITS(combined_samplers) - 1; + int i; + + if (ps) { + IWineD3DPixelShaderImpl *pshader = (IWineD3DPixelShaderImpl *)This->stateBlock->pixelShader; + + /* Make sure the shader's reg_maps are up to date. This is only relevant for 1.x pixelshaders. */ + IWineD3DPixelShader_CompileShader((IWineD3DPixelShader *)pshader); + pshader_sampler_tokens = pshader->baseShader.reg_maps.samplers; + } + + for (i = 0; i < MAX_VERTEX_SAMPLERS; ++i) { + int vsampler_idx = i + MAX_FRAGMENT_SAMPLERS; + if (vshader_sampler_tokens[i]) { + if (This->texUnitMap[vsampler_idx] != -1) { + /* Already mapped somewhere */ + continue; + } + + while (start >= 0) { + if (device_unit_free_for_vs(This, pshader_sampler_tokens, vshader_sampler_tokens, start)) { + device_map_stage(This, vsampler_idx, start); + IWineD3DDeviceImpl_MarkStateDirty(This, STATE_SAMPLER(vsampler_idx)); + + --start; + break; + } + + --start; + } + } + } +} + void IWineD3DDeviceImpl_FindTexUnitMap(IWineD3DDeviceImpl *This) { + BOOL vs = use_vs(This); BOOL ps = use_ps(This); /* This code can assume that GL_NV_register_combiners are supported, otherwise * it is never called. @@ -3313,6 +3375,10 @@ void IWineD3DDeviceImpl_FindTexUnitMap(IWineD3DDeviceImpl *This) { } else { device_map_fixed_function_samplers(This); } + + if (vs) { + device_map_vsamplers(This, ps); + } } static HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShader(IWineD3DDevice *iface, IWineD3DPixelShader *pShader) {
1
0
0
0
H. Verbeet : wined3d: Implement texldl.
by Alexandre Julliard
28 Jun '07
28 Jun '07
Module: wine Branch: master Commit: 1d4042cee10b0647d8de730632a13e7319de1140 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1d4042cee10b0647d8de73063…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Wed Jun 27 23:46:53 2007 +0200 wined3d: Implement texldl. --- dlls/wined3d/glsl_shader.c | 56 ++++++++++++++++++++++++++++++++++++++++ dlls/wined3d/pixelshader.c | 2 +- dlls/wined3d/vertexshader.c | 2 +- dlls/wined3d/wined3d_private.h | 1 + 4 files changed, 59 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 11ede05..1e77b96 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -99,6 +99,29 @@ static void shader_glsl_load_psamplers( } } +static void shader_glsl_load_vsamplers(WineD3D_GL_Info *gl_info, IWineD3DStateBlock* iface) { + IWineD3DStateBlockImpl* stateBlock = (IWineD3DStateBlockImpl*) iface; + GLhandleARB programId = stateBlock->glsl_program->programId; + GLhandleARB name_loc; + char sampler_name[20]; + int i; + + for (i = 0; i < MAX_VERTEX_SAMPLERS; ++i) { + snprintf(sampler_name, sizeof(sampler_name), "Vsampler%d", i); + name_loc = GL_EXTCALL(glGetUniformLocationARB(programId, sampler_name)); + if (name_loc != -1) { + int mapped_unit = stateBlock->wineD3DDevice->texUnitMap[MAX_FRAGMENT_SAMPLERS + i]; + if (mapped_unit != -1 && mapped_unit < GL_LIMITS(combined_samplers)) { + TRACE("Loading %s for texture %d\n", sampler_name, mapped_unit); + GL_EXTCALL(glUniform1iARB(name_loc, mapped_unit)); + checkGLcall("glUniform1iARB"); + } else { + ERR("Trying to load sampler %s on unsupported unit %d\n", sampler_name, mapped_unit); + } + } + } +} + /** * Loads floating point constants (aka uniforms) into the currently set GLSL program. * When constant_list == NULL, it will load all the constants. @@ -308,6 +331,9 @@ void shader_glsl_load_constants( constant_locations = stateBlock->glsl_program->vuniformF_locations; constant_list = &stateBlock->set_vconstantsF; + /* Load vertex shader samplers */ + shader_glsl_load_vsamplers(gl_info, (IWineD3DStateBlock*)stateBlock); + /* Load DirectX 9 float constants/uniforms for vertex shader */ shader_glsl_load_constantsF(vshader, gl_info, GL_LIMITS(vshader_constantsF), stateBlock->vertexShaderConstantF, constant_locations, constant_list); @@ -1563,6 +1589,36 @@ void pshader_glsl_tex(SHADER_OPCODE_ARG* arg) { } } +void shader_glsl_texldl(SHADER_OPCODE_ARG* arg) { + IWineD3DBaseShaderImpl* This = (IWineD3DBaseShaderImpl*)arg->shader; + glsl_sample_function_t sample_function; + glsl_src_param_t coord_param, lod_param; + char dst_swizzle[6]; + DWORD sampler_type; + DWORD sampler_idx; + + shader_glsl_append_dst(arg->buffer, arg); + shader_glsl_get_swizzle(arg->src[1], FALSE, arg->dst, dst_swizzle); + + sampler_idx = arg->src[1] & WINED3DSP_REGNUM_MASK; + sampler_type = arg->reg_maps->samplers[sampler_idx] & WINED3DSP_TEXTURETYPE_MASK; + shader_glsl_get_sample_function(sampler_type, FALSE, &sample_function); + shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], sample_function.coord_mask, &coord_param); + + shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_3, &lod_param); + + if (shader_is_pshader_version(This->baseShader.hex_version)) { + /* The GLSL spec claims the Lod sampling functions are only supported in vertex shaders. + * However, they seem to work just fine in fragment shaders as well. */ + WARN("Using %sLod in fragment shader.\n", sample_function.name); + shader_addline(arg->buffer, "%sLod(Psampler%u, %s, %s)%s);\n", + sample_function.name, sampler_idx, coord_param.param_str, lod_param.param_str, dst_swizzle); + } else { + shader_addline(arg->buffer, "%sLod(Vsampler%u, %s, %s)%s);\n", + sample_function.name, sampler_idx, coord_param.param_str, lod_param.param_str, dst_swizzle); + } +} + void pshader_glsl_texcoord(SHADER_OPCODE_ARG* arg) { /* FIXME: Make this work for more than just 2D textures */ diff --git a/dlls/wined3d/pixelshader.c b/dlls/wined3d/pixelshader.c index 1f81fbd..eb41d1f 100644 --- a/dlls/wined3d/pixelshader.c +++ b/dlls/wined3d/pixelshader.c @@ -256,7 +256,7 @@ CONST SHADER_OPCODE IWineD3DPixelShaderImpl_shader_ins[] = { {WINED3DSIO_DSY, "dsy", GLNAME_REQUIRE_GLSL, 1, 2, NULL, NULL, 0, 0}, {WINED3DSIO_TEXLDD, "texldd", GLNAME_REQUIRE_GLSL, 1, 5, NULL, NULL, WINED3DPS_VERSION(2,1), -1}, {WINED3DSIO_SETP, "setp", GLNAME_REQUIRE_GLSL, 1, 3, NULL, NULL, 0, 0}, - {WINED3DSIO_TEXLDL, "texldl", GLNAME_REQUIRE_GLSL, 1, 3, NULL, NULL, 0, 0}, + {WINED3DSIO_TEXLDL, "texldl", NULL, 1, 3, NULL, shader_glsl_texldl, WINED3DPS_VERSION(3,0), -1}, {WINED3DSIO_PHASE, "phase", GLNAME_REQUIRE_GLSL, 0, 0, NULL, NULL, 0, 0}, {0, NULL, NULL, 0, 0, NULL, NULL, 0, 0} }; diff --git a/dlls/wined3d/vertexshader.c b/dlls/wined3d/vertexshader.c index af6bc36..cb3b873 100644 --- a/dlls/wined3d/vertexshader.c +++ b/dlls/wined3d/vertexshader.c @@ -156,7 +156,7 @@ CONST SHADER_OPCODE IWineD3DVertexShaderImpl_shader_ins[] = { {WINED3DSIO_LABEL, "label", NULL, 0, 1, NULL, shader_glsl_label, WINED3DVS_VERSION(2,0), -1}, {WINED3DSIO_SETP, "setp", GLNAME_REQUIRE_GLSL, 1, 3, NULL, NULL, 0, 0}, - {WINED3DSIO_TEXLDL, "texdl", GLNAME_REQUIRE_GLSL, 1, 3, NULL, NULL, 0, 0}, + {WINED3DSIO_TEXLDL, "texldl", NULL, 1, 3, NULL, shader_glsl_texldl, WINED3DVS_VERSION(3,0), -1}, {0, NULL, NULL, 0, 0, NULL, NULL, 0, 0} }; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index dd9a67d..135114f 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1737,6 +1737,7 @@ extern void shader_glsl_call(SHADER_OPCODE_ARG* arg); extern void shader_glsl_callnz(SHADER_OPCODE_ARG* arg); extern void shader_glsl_label(SHADER_OPCODE_ARG* arg); extern void shader_glsl_pow(SHADER_OPCODE_ARG* arg); +extern void shader_glsl_texldl(SHADER_OPCODE_ARG* arg); /** GLSL Pixel Shader Prototypes */ extern void pshader_glsl_tex(SHADER_OPCODE_ARG* arg);
1
0
0
0
Michael Stefaniuc : winefile: Do not use the TEXT() macro on character constants. The implicit cast from char to WCHAR works as well in UNICODE mode.
by Alexandre Julliard
28 Jun '07
28 Jun '07
Module: wine Branch: master Commit: fa684a717aac92173fd60f7e48e28a0aa9d9e25f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fa684a717aac92173fd60f7e4…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jun 27 22:54:56 2007 +0200 winefile: Do not use the TEXT() macro on character constants. The implicit cast from char to WCHAR works as well in UNICODE mode. --- programs/winefile/winefile.c | 64 +++++++++++++++++++++--------------------- 1 files changed, 32 insertions(+), 32 deletions(-) diff --git a/programs/winefile/winefile.c b/programs/winefile/winefile.c index 7a0577e..860ecd2 100644 --- a/programs/winefile/winefile.c +++ b/programs/winefile/winefile.c @@ -455,7 +455,7 @@ static Entry* find_entry_win(Entry* dir, LPCTSTR name) LPCTSTR q = entry->data.cFileName; do { - if (!*p || *p==TEXT('\\') || *p==TEXT('/')) + if (!*p || *p == '\\' || *p == '/') return entry; } while(tolower(*p++) == tolower(*q++)); @@ -463,7 +463,7 @@ static Entry* find_entry_win(Entry* dir, LPCTSTR name) q = entry->data.cAlternateFileName; do { - if (!*p || *p==TEXT('\\') || *p==TEXT('/')) + if (!*p || *p == '\\' || *p == '/') return entry; } while(tolower(*p++) == tolower(*q++)); } @@ -486,14 +486,14 @@ static Entry* read_tree_win(Root* root, LPCTSTR path, SORT_ORDER sortOrder, HWND #endif while(entry) { - while(*s && *s!=TEXT('\\') && *s!=TEXT('/')) + while(*s && *s != '\\' && *s != '/') *d++ = *s++; - while(*s==TEXT('\\') || *s==TEXT('/')) + while(*s == '\\' || *s == '/') s++; - *d++ = TEXT('\\'); - *d = TEXT('\0'); + *d++ = '\\'; + *d = '\0'; read_directory(entry, buffer, sortOrder, hwnd); @@ -634,7 +634,7 @@ static Entry* find_entry_unix(Entry* dir, LPCTSTR name) LPCTSTR q = entry->data.cFileName; do { - if (!*p || *p==TEXT('/')) + if (!*p || *p == '/') return entry; } while(*p++ == *q++); } @@ -654,14 +654,14 @@ static Entry* read_tree_unix(Root* root, LPCTSTR path, SORT_ORDER sortOrder, HWN entry->etype = ET_UNIX; while(entry) { - while(*s && *s!=TEXT('/')) + while(*s && *s != '/') *d++ = *s++; - while(*s == TEXT('/')) + while(*s == '/') s++; - *d++ = TEXT('/'); - *d = TEXT('\0'); + *d++ = '/'; + *d = '\0'; read_directory(entry, buffer, sortOrder, hwnd); @@ -1195,8 +1195,8 @@ static int compareExt(const void* arg1, const void* arg2) name1 = fd1->cFileName; name2 = fd2->cFileName; - ext1 = _tcsrchr(name1, TEXT('.')); - ext2 = _tcsrchr(name2, TEXT('.')); + ext1 = _tcsrchr(name1, '.'); + ext2 = _tcsrchr(name2, '.'); if (ext1) ext1++; @@ -1308,7 +1308,7 @@ static void read_directory(Entry* dir, LPCTSTR path, SORT_ORDER sortOrder, HWND while(*s) *d++ = *s++; - *d++ = TEXT('\\'); + *d++ = '\\'; for(entry=dir->down; entry; entry=entry->next) if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { @@ -1331,7 +1331,7 @@ static void read_directory(Entry* dir, LPCTSTR path, SORT_ORDER sortOrder, HWND while(*s) *d++ = *s++; - *d++ = TEXT('/'); + *d++ = '/'; for(entry=dir->down; entry; entry=entry->next) if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { @@ -1353,7 +1353,7 @@ static void read_directory(Entry* dir, LPCTSTR path, SORT_ORDER sortOrder, HWND while(*s) *d++ = *s++; - *d++ = TEXT('\\'); + *d++ = '\\'; for(entry=dir->down; entry; entry=entry->next) if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { @@ -1521,7 +1521,7 @@ static void get_path(Entry* dir, PTSTR path) SFGAOF attribs; HRESULT hr = S_OK; - path[0] = TEXT('\0'); + path[0] = '\0'; attribs = 0; @@ -1546,7 +1546,7 @@ static void get_path(Entry* dir, PTSTR path) name = entry->data.cFileName; s = name; - for(l=0; *s && *s!=TEXT('/') && *s!=TEXT('\\'); s++) + for(l=0; *s && *s != '/' && *s != '\\'; s++) l++; } @@ -1558,10 +1558,10 @@ static void get_path(Entry* dir, PTSTR path) #ifndef _NO_EXTENSIONS if (entry->etype == ET_UNIX) - path[0] = TEXT('/'); + path[0] = '/'; else #endif - path[0] = TEXT('\\'); + path[0] = '\\'; } entry = entry->up; @@ -1576,13 +1576,13 @@ static void get_path(Entry* dir, PTSTR path) if (!level) { #ifndef _NO_EXTENSIONS if (entry->etype == ET_UNIX) - path[len++] = TEXT('/'); + path[len++] = '/'; else #endif - path[len++] = TEXT('\\'); + path[len++] = '\\'; } - path[len] = TEXT('\0'); + path[len] = '\0'; } } @@ -2651,7 +2651,7 @@ static void init_output(HWND hwnd) if (GetNumberFormat(LOCALE_USER_DEFAULT, 0, s1000, 0, b, 16) > 4) Globals.num_sep = b[1]; else - Globals.num_sep = TEXT('.'); + Globals.num_sep = '.'; old_font = SelectObject(hdc, Globals.hfont); GetTextExtentPoint32(hdc, sSpace, 1, &Globals.spaceSize); @@ -2877,12 +2877,12 @@ static int insert_entries(Pane* pane, Entry* dir, LPCTSTR pattern, int filter_fl if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { /* don't display entries "." and ".." in the left pane */ - if (pane->treePane && entry->data.cFileName[0]==TEXT('.')) + if (pane->treePane && entry->data.cFileName[0] == '.') if ( #ifndef _NO_EXTENSIONS - entry->data.cFileName[1]==TEXT('\0') || + entry->data.cFileName[1] == '\0' || #endif - (entry->data.cFileName[1]==TEXT('.') && entry->data.cFileName[2]==TEXT('\0'))) + (entry->data.cFileName[1] == '.' && entry->data.cFileName[2] == '\0')) continue; /* filter directories in right pane */ @@ -3015,7 +3015,7 @@ static void format_date(const FILETIME* ft, TCHAR* buffer, int visible_cols) FILETIME lft; int len = 0; - *buffer = TEXT('\0'); + *buffer = '\0'; if (!ft->dwLowDateTime && !ft->dwHighDateTime) return; @@ -3039,7 +3039,7 @@ static void format_date(const FILETIME* ft, TCHAR* buffer, int visible_cols) buffer[len++] = ' '; if (!GetTimeFormat(LOCALE_USER_DEFAULT, 0, &systime, 0, buffer+len, BUFFER_LEN-len)) - buffer[len] = TEXT('\0'); + buffer[len] = '\0'; } } @@ -3200,11 +3200,11 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi attrs = entry->data.dwFileAttributes; if (attrs & FILE_ATTRIBUTE_DIRECTORY) { - if (entry->data.cFileName[0]==TEXT('.') && entry->data.cFileName[1]==TEXT('.') - && entry->data.cFileName[2]==TEXT('\0')) + if (entry->data.cFileName[0] == '.' && entry->data.cFileName[1] == '.' + && entry->data.cFileName[2] == '\0') img = IMG_FOLDER_UP; #ifndef _NO_EXTENSIONS - else if (entry->data.cFileName[0]==TEXT('.') && entry->data.cFileName[1]==TEXT('\0')) + else if (entry->data.cFileName[0] == '.' && entry->data.cFileName[1] == '\0') img = IMG_FOLDER_CUR; #endif else if (
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
86
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
Results per page:
10
25
50
100
200