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
April 2010
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
898 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Use DOM designMode to switch to editor mode.
by Alexandre Julliard
14 Apr '10
14 Apr '10
Module: wine Branch: master Commit: 80f0f35c504feb47e982cac74cb6ec91bb6854c0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=80f0f35c504feb47e982cac74…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Apr 13 20:01:41 2010 +0200 mshtml: Use DOM designMode to switch to editor mode. --- dlls/mshtml/htmlwindow.c | 20 ++++++++++++++++++++ dlls/mshtml/mshtml_private.h | 1 - dlls/mshtml/nsembed.c | 40 ---------------------------------------- dlls/mshtml/olecmd.c | 3 --- 4 files changed, 20 insertions(+), 44 deletions(-) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 2aafaa3..5dbea55 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -57,6 +57,26 @@ static void window_set_docnode(HTMLWindow *window, HTMLDocumentNode *doc_node) if(doc_node) htmldoc_addref(&doc_node->basedoc); } + + if(doc_node && window->doc_obj->usermode == EDITMODE) { + nsIDOMNSHTMLDocument *nshtmldoc; + nsAString mode_str; + nsresult nsres; + + static const PRUnichar onW[] = {'o','n',0}; + + nsres = nsIDOMHTMLDocument_QueryInterface(doc_node->nsdoc, &IID_nsIDOMNSHTMLDocument, (void**)&nshtmldoc); + if(NS_SUCCEEDED(nsres)) { + nsAString_Init(&mode_str, onW); + nsres = nsIDOMNSHTMLDocument_SetDesignMode(nshtmldoc, &mode_str); + nsAString_Finish(&mode_str); + nsIDOMNSHTMLDocument_Release(nshtmldoc); + if(NS_FAILED(nsres)) + ERR("SetDesignMode failed: %08x\n", nsres); + }else { + ERR("Could not get nsIDOMNSHTMLDocument interface: %08x\n", nsres); + } + } } nsIDOMWindow *get_nsdoc_window(nsIDOMDocument *nsdoc) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 4431d9c..3db8d79 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -843,7 +843,6 @@ void update_title(HTMLDocumentObj*); /* editor */ void init_editor(HTMLDocument*); -void set_ns_editmode(NSContainer*); void handle_edit_event(HTMLDocument*,nsIDOMEvent*); HRESULT editor_exec_copy(HTMLDocument*,DWORD,VARIANT*,VARIANT*); HRESULT editor_exec_cut(HTMLDocument*,DWORD,VARIANT*,VARIANT*); diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index f3e43c8..8a59007 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -767,46 +767,6 @@ void get_editor_controller(NSContainer *This) } } -void set_ns_editmode(NSContainer *This) -{ - nsIEditingSession *editing_session = NULL; - nsIURIContentListener *listener = NULL; - nsIDOMWindow *dom_window = NULL; - nsresult nsres; - - nsres = get_nsinterface((nsISupports*)This->webbrowser, &IID_nsIEditingSession, - (void**)&editing_session); - if(NS_FAILED(nsres)) { - ERR("Could not get nsIEditingSession: %08x\n", nsres); - return; - } - - nsres = nsIWebBrowser_GetContentDOMWindow(This->webbrowser, &dom_window); - if(NS_FAILED(nsres)) { - ERR("Could not get content DOM window: %08x\n", nsres); - nsIEditingSession_Release(editing_session); - return; - } - - nsres = nsIEditingSession_MakeWindowEditable(editing_session, dom_window, - NULL, FALSE, TRUE, TRUE); - nsIEditingSession_Release(editing_session); - nsIDOMWindow_Release(dom_window); - if(NS_FAILED(nsres)) { - ERR("MakeWindowEditable failed: %08x\n", nsres); - return; - } - - /* MakeWindowEditable changes WebBrowser's parent URI content listener. - * It seams to be a bug in Gecko. To workaround it we set our content - * listener again and Gecko's one as its parent. - */ - nsIWebBrowser_GetParentURIContentListener(This->webbrowser, &listener); - nsIURIContentListener_SetParentContentListener(NSURICL(This), listener); - nsIURIContentListener_Release(listener); - nsIWebBrowser_SetParentURIContentListener(This->webbrowser, NSURICL(This)); -} - void close_gecko(void) { TRACE("()\n"); diff --git a/dlls/mshtml/olecmd.c b/dlls/mshtml/olecmd.c index b54f064..4d5967a 100644 --- a/dlls/mshtml/olecmd.c +++ b/dlls/mshtml/olecmd.c @@ -616,9 +616,6 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, IDocHostUIHandler_HideUI(This->doc_obj->hostui); } - if(This->doc_obj->nscontainer) - set_ns_editmode(This->doc_obj->nscontainer); - if(This->doc_obj->ui_active) { RECT rcBorderWidths;
1
0
0
0
Jacek Caban : mshtml: Improved focus handling.
by Alexandre Julliard
14 Apr '10
14 Apr '10
Module: wine Branch: master Commit: 7cdad62b973eb48c2e11aee0fb50c0de96277cb7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7cdad62b973eb48c2e11aee0f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Apr 13 20:01:21 2010 +0200 mshtml: Improved focus handling. --- dlls/mshtml/editor.c | 1 - dlls/mshtml/mshtml_private.h | 2 -- dlls/mshtml/nsembed.c | 24 ++++++------------------ dlls/mshtml/nsevents.c | 4 ++-- dlls/mshtml/view.c | 7 ++++++- 5 files changed, 14 insertions(+), 24 deletions(-) diff --git a/dlls/mshtml/editor.c b/dlls/mshtml/editor.c index 961bb91..14e7ebb 100644 --- a/dlls/mshtml/editor.c +++ b/dlls/mshtml/editor.c @@ -508,7 +508,6 @@ void handle_edit_event(HTMLDocument *This, nsIDOMEvent *event) void handle_edit_load(HTMLDocument *This) { - This->doc_obj->nscontainer->reset_focus = GetFocus(); get_editor_controller(This->doc_obj->nscontainer); } diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index e378f26..4431d9c 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -437,8 +437,6 @@ struct NSContainer { nsIURIContentListener *content_listener; HWND hwnd; - - HWND reset_focus; /* hack */ }; typedef struct nsWineURI nsWineURI; diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index fa8aa41..f3e43c8 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -80,8 +80,6 @@ static const WCHAR wszNsContainer[] = {'N','s','C','o','n','t','a','i','n','e',' static ATOM nscontainer_class; -#define WM_RESETFOCUS_HACK WM_USER+600 - static LRESULT WINAPI nsembed_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { NSContainer *This; @@ -106,20 +104,13 @@ static LRESULT WINAPI nsembed_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP WARN("SetSize failed: %08x\n", nsres); break; - case WM_RESETFOCUS_HACK: - /* - * FIXME - * Gecko grabs focus in edit mode and some apps don't like it. - * We should somehow prevent grabbing focus. - */ - - TRACE("WM_RESETFOCUS_HACK\n"); + case WM_PARENTNOTIFY: + TRACE("WM_PARENTNOTIFY %x\n", (unsigned)wParam); - if(This->reset_focus) { - SetFocus(This->reset_focus); - This->reset_focus = NULL; - if(This->doc) - This->doc->focus = FALSE; + switch(wParam) { + case WM_LBUTTONDOWN: + case WM_RBUTTONDOWN: + nsIWebBrowserFocus_Activate(This->focus); } } @@ -1316,9 +1307,6 @@ static nsresult NSAPI nsEmbeddingSiteWindow_SetFocus(nsIEmbeddingSiteWindow *ifa TRACE("(%p)\n", This); - if(This->reset_focus) - PostMessageW(This->hwnd, WM_RESETFOCUS_HACK, 0, 0); - return nsIBaseWindow_SetFocus(This->window); } diff --git a/dlls/mshtml/nsevents.c b/dlls/mshtml/nsevents.c index c491424..fb2b055 100644 --- a/dlls/mshtml/nsevents.c +++ b/dlls/mshtml/nsevents.c @@ -129,7 +129,7 @@ static nsresult NSAPI handle_blur(nsIDOMEventListener *iface, nsIDOMEvent *event return NS_ERROR_FAILURE; doc_obj = doc->basedoc.doc_obj; - if(!doc_obj->nscontainer->reset_focus && doc_obj->focus && !is_doc_child_focus(doc_obj)) { + if(doc_obj->focus && !is_doc_child_focus(doc_obj)) { doc_obj->focus = FALSE; notif_focus(doc_obj); } @@ -148,7 +148,7 @@ static nsresult NSAPI handle_focus(nsIDOMEventListener *iface, nsIDOMEvent *even return NS_ERROR_FAILURE; doc_obj = doc->basedoc.doc_obj; - if(!doc_obj->nscontainer->reset_focus && !doc_obj->focus) { + if(!doc_obj->focus) { doc_obj->focus = TRUE; notif_focus(doc_obj); } diff --git a/dlls/mshtml/view.c b/dlls/mshtml/view.c index 2561478..5c096ed 100644 --- a/dlls/mshtml/view.c +++ b/dlls/mshtml/view.c @@ -92,7 +92,6 @@ static void activate_gecko(NSContainer *This) nsIBaseWindow_SetVisibility(This->window, TRUE); nsIBaseWindow_SetEnabled(This->window, TRUE); - nsIWebBrowserFocus_Activate(This->focus); } void update_doc(HTMLDocument *This, DWORD flags) @@ -216,6 +215,10 @@ static LRESULT WINAPI serverwnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM break; case WM_TIMER: return on_timer(This); + case WM_SETFOCUS: + TRACE("(%p) WM_SETFOCUS\n", This); + nsIWebBrowserFocus_Activate(This->nscontainer->focus); + break; case WM_MOUSEACTIVATE: return MA_ACTIVATE; } @@ -664,6 +667,8 @@ static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL f This->doc_obj->ui_active = TRUE; }else { + This->doc_obj->focus = FALSE; + nsIWebBrowserFocus_Deactivate(This->doc_obj->nscontainer->focus); if(This->doc_obj->ui_active) { This->doc_obj->ui_active = FALSE; if(This->doc_obj->ip_window)
1
0
0
0
Alexandre Julliard : user32: The Z-order of owned windows doesn' t depend on them having the WS_POPUP style.
by Alexandre Julliard
14 Apr '10
14 Apr '10
Module: wine Branch: master Commit: b6765134a3174d124d24f8ae3345755d21c70982 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b6765134a3174d124d24f8ae3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Apr 13 20:54:15 2010 +0200 user32: The Z-order of owned windows doesn't depend on them having the WS_POPUP style. --- dlls/user32/tests/win.c | 13 +++++++------ dlls/user32/winpos.c | 7 +++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index e3bebe7..a295850 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -2181,7 +2181,7 @@ static void check_z_order_debug(HWND hwnd, HWND next, HWND prev, HWND owner, hwnd, topmost ? "" : "NOT "); } -static void test_popup_zorder(HWND hwnd_D, HWND hwnd_E) +static void test_popup_zorder(HWND hwnd_D, HWND hwnd_E, DWORD style) { HWND hwnd_A, hwnd_B, hwnd_C, hwnd_F; @@ -2205,7 +2205,7 @@ static void test_popup_zorder(HWND hwnd_D, HWND hwnd_E) check_z_order(hwnd_D, hwnd_E, 0, 0, FALSE); hwnd_C = CreateWindowEx(0, "MainWindowClass", NULL, - WS_POPUP, + style, 100, 100, 100, 100, hwnd_F, 0, GetModuleHandle(0), NULL); trace("hwnd_C %p\n", hwnd_C); @@ -2215,7 +2215,7 @@ static void test_popup_zorder(HWND hwnd_D, HWND hwnd_E) check_z_order(hwnd_C, hwnd_D, 0, hwnd_F, FALSE); hwnd_B = CreateWindowEx(WS_EX_TOPMOST, "MainWindowClass", NULL, - WS_POPUP, + style, 100, 100, 100, 100, hwnd_F, 0, GetModuleHandle(0), NULL); trace("hwnd_B %p\n", hwnd_B); @@ -2226,7 +2226,7 @@ static void test_popup_zorder(HWND hwnd_D, HWND hwnd_E) check_z_order(hwnd_B, hwnd_C, 0, hwnd_F, TRUE); hwnd_A = CreateWindowEx(WS_EX_TOPMOST, "MainWindowClass", NULL, - WS_POPUP, + style, 100, 100, 100, 100, 0, 0, GetModuleHandle(0), NULL); trace("hwnd_A %p\n", hwnd_A); @@ -2262,7 +2262,7 @@ static void test_popup_zorder(HWND hwnd_D, HWND hwnd_E) /* make hwnd_C owned by a topmost window */ DestroyWindow( hwnd_C ); hwnd_C = CreateWindowEx(0, "MainWindowClass", NULL, - WS_POPUP, + style, 100, 100, 100, 100, hwnd_A, 0, GetModuleHandle(0), NULL); trace("hwnd_C %p\n", hwnd_C); @@ -6073,7 +6073,8 @@ START_TEST(win) test_NCRedraw(); test_children_zorder(hwndMain); - test_popup_zorder(hwndMain2, hwndMain); + test_popup_zorder(hwndMain2, hwndMain, WS_POPUP); + test_popup_zorder(hwndMain2, hwndMain, 0); test_keyboard_input(hwndMain); test_mouse_input(hwndMain); test_validatergn(hwndMain); diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index f8a3c41..dd529dc 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -1617,13 +1617,14 @@ static inline void get_valid_rects( const RECT *old_client, const RECT *new_clie */ static HWND SWP_DoOwnedPopups(HWND hwnd, HWND hwndInsertAfter) { - LONG style = GetWindowLongW( hwnd, GWL_STYLE ); HWND owner, *list = NULL; unsigned int i; TRACE("(%p) hInsertAfter = %p\n", hwnd, hwndInsertAfter ); - if ((style & WS_POPUP) && (owner = GetWindow( hwnd, GW_OWNER ))) + if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_CHILD) return hwndInsertAfter; + + if ((owner = GetWindow( hwnd, GW_OWNER ))) { /* make sure this popup stays above the owner */ @@ -1650,7 +1651,6 @@ static HWND SWP_DoOwnedPopups(HWND hwnd, HWND hwndInsertAfter) } } } - else if (style & WS_CHILD) return hwndInsertAfter; if (hwndInsertAfter == HWND_BOTTOM) goto done; if (!list && !(list = WIN_ListChildren( GetDesktopWindow() ))) goto done; @@ -1677,7 +1677,6 @@ static HWND SWP_DoOwnedPopups(HWND hwnd, HWND hwndInsertAfter) for ( ; list[i]; i++) { if (list[i] == hwnd) break; - if (!(GetWindowLongW( list[i], GWL_STYLE ) & WS_POPUP)) continue; if (GetWindow( list[i], GW_OWNER ) != hwnd) continue; TRACE( "moving %p owned by %p after %p\n", list[i], hwnd, hwndInsertAfter ); SetWindowPos( list[i], hwndInsertAfter, 0, 0, 0, 0,
1
0
0
0
Roderick Colenbrander : wined3d: Move R32G32F convertion to the formats table.
by Alexandre Julliard
13 Apr '10
13 Apr '10
Module: wine Branch: master Commit: e35f54ef1f6775b6cbf2707450b1930d540d1e12 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e35f54ef1f6775b6cbf270745…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Mon Apr 12 21:00:01 2010 +0200 wined3d: Move R32G32F convertion to the formats table. --- dlls/wined3d/surface.c | 26 -------------------------- dlls/wined3d/utils.c | 27 +++++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 28 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 7d8b7cd..25967b3 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2244,12 +2244,6 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_ desc->conv_byte_count = 6; break; - case WINED3DFMT_R32G32_FLOAT: - if (gl_info->supported[ARB_TEXTURE_RG]) break; - *convert = CONVERT_R32G32F; - desc->conv_byte_count = 12; - break; - default: break; } @@ -2536,26 +2530,6 @@ static HRESULT d3dfmt_convert_surface(const BYTE *src, BYTE *dst, UINT pitch, UI break; } - case CONVERT_R32G32F: - { - unsigned int x, y; - const float *Source; - float *Dest; - for(y = 0; y < height; y++) { - Source = (const float *)(src + y * pitch); - Dest = (float *) (dst + y * outpitch); - for (x = 0; x < width; x++ ) { - float green = (*Source++); - float red = (*Source++); - Dest[0] = green; - Dest[1] = red; - Dest[2] = 1.0f; - Dest += 3; - } - } - break; - } - default: ERR("Unsupported conversion type %#x.\n", convert); } diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 69216c2..b2a35c6 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -417,6 +417,29 @@ static void convert_r16g16_snorm(const BYTE *src, BYTE *dst, UINT pitch, UINT wi } } +static void convert_r32g32_float(const BYTE *src, BYTE *dst, UINT pitch, UINT width, UINT height) +{ + unsigned int x, y; + const float *Source; + float *Dest; + UINT outpitch = (pitch * 3)/2; + + for(y = 0; y < height; y++) + { + Source = (const float *)(src + y * pitch); + Dest = (float *) (dst + y * outpitch); + for (x = 0; x < width; x++ ) + { + float green = (*Source++); + float red = (*Source++); + Dest[0] = green; + Dest[1] = red; + Dest[2] = 1.0f; + Dest += 3; + } + } +} + static void convert_s1_uint_d15_unorm(const BYTE *src, BYTE *dst, UINT pitch, UINT width, UINT height) { unsigned int x, y; @@ -538,9 +561,9 @@ static const struct wined3d_format_texture_info format_texture_info[] = WINED3DFMT_FLAG_RENDERTARGET, ARB_TEXTURE_RG, NULL}, {WINED3DFMT_R32G32_FLOAT, GL_RGB32F_ARB, GL_RGB32F_ARB, 0, - GL_RGB, GL_FLOAT, 0, + GL_RGB, GL_FLOAT, 12, WINED3DFMT_FLAG_RENDERTARGET, - ARB_TEXTURE_FLOAT, NULL}, + ARB_TEXTURE_FLOAT, &convert_r32g32_float}, {WINED3DFMT_R32G32_FLOAT, GL_RG32F, GL_RG32F, 0, GL_RG, GL_FLOAT, 0, WINED3DFMT_FLAG_RENDERTARGET,
1
0
0
0
Roderick Colenbrander : wined3d: Move D15S1 over to the formats table.
by Alexandre Julliard
13 Apr '10
13 Apr '10
Module: wine Branch: master Commit: 5c635f4146542db85e4635014386614e57f8c72b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5c635f4146542db85e4635014…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Mon Apr 12 21:00:00 2010 +0200 wined3d: Move D15S1 over to the formats table. --- dlls/wined3d/surface.c | 31 ------------------------------- dlls/wined3d/utils.c | 30 ++++++++++++++++++++++++++---- 2 files changed, 26 insertions(+), 35 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 0d3a0a2..7d8b7cd 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2250,15 +2250,6 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_ desc->conv_byte_count = 12; break; - case WINED3DFMT_S1_UINT_D15_UNORM: - if (gl_info->supported[ARB_FRAMEBUFFER_OBJECT] - || gl_info->supported[EXT_PACKED_DEPTH_STENCIL]) - { - *convert = CONVERT_D15S1; - desc->conv_byte_count = 4; - } - break; - default: break; } @@ -2565,28 +2556,6 @@ static HRESULT d3dfmt_convert_surface(const BYTE *src, BYTE *dst, UINT pitch, UI break; } - case CONVERT_D15S1: - { - unsigned int x, y; - - for (y = 0; y < height; ++y) - { - const WORD *source = (const WORD *)(src + y * pitch); - DWORD *dest = (DWORD *)(dst + y * outpitch); - - for (x = 0; x < width; ++x) - { - /* The depth data is normalized, so needs to be scaled, - * the stencil data isn't. Scale depth data by - * (2^24-1)/(2^15-1) ~~ (2^9 + 2^-6). */ - WORD d15 = source[x] >> 1; - DWORD d24 = (d15 << 9) + (d15 >> 6); - dest[x] = (d24 << 8) | (source[x] & 0x1); - } - } - break; - } - default: ERR("Unsupported conversion type %#x.\n", convert); } diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 6970ec8..69216c2 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -417,6 +417,28 @@ static void convert_r16g16_snorm(const BYTE *src, BYTE *dst, UINT pitch, UINT wi } } +static void convert_s1_uint_d15_unorm(const BYTE *src, BYTE *dst, UINT pitch, UINT width, UINT height) +{ + unsigned int x, y; + UINT outpitch = pitch * 2; + + for (y = 0; y < height; ++y) + { + const WORD *source = (const WORD *)(src + y * pitch); + DWORD *dest = (DWORD *)(dst + y * outpitch); + + for (x = 0; x < width; ++x) + { + /* The depth data is normalized, so needs to be scaled, + * the stencil data isn't. Scale depth data by + * (2^24-1)/(2^15-1) ~~ (2^9 + 2^-6). */ + WORD d15 = source[x] >> 1; + DWORD d24 = (d15 << 9) + (d15 >> 6); + dest[x] = (d24 << 8) | (source[x] & 0x1); + } + } +} + static void convert_s4x4_uint_d24_unorm(const BYTE *src, BYTE *dst, UINT pitch, UINT width, UINT height) { unsigned int x, y; @@ -690,13 +712,13 @@ static const struct wined3d_format_texture_info format_texture_info[] = WINED3DFMT_FLAG_DEPTH, ARB_DEPTH_TEXTURE, NULL}, {WINED3DFMT_S1_UINT_D15_UNORM, GL_DEPTH24_STENCIL8_EXT, GL_DEPTH24_STENCIL8_EXT, 0, - GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT, 0, + GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT, 4, WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL, - EXT_PACKED_DEPTH_STENCIL, NULL}, + EXT_PACKED_DEPTH_STENCIL, &convert_s1_uint_d15_unorm}, {WINED3DFMT_S1_UINT_D15_UNORM, GL_DEPTH24_STENCIL8, GL_DEPTH24_STENCIL8, 0, - GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 0, + GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 4, WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL, - ARB_FRAMEBUFFER_OBJECT, NULL}, + ARB_FRAMEBUFFER_OBJECT, &convert_s1_uint_d15_unorm}, {WINED3DFMT_D24_UNORM_S8_UINT, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, 0, WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH,
1
0
0
0
Roderick Colenbrander : wined3d: Move D24X4S4 to the formats table.
by Alexandre Julliard
13 Apr '10
13 Apr '10
Module: wine Branch: master Commit: 6a081ef95a074560492babe57039c476b609cb98 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6a081ef95a074560492babe57…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Mon Apr 12 20:59:59 2010 +0200 wined3d: Move D24X4S4 to the formats table. --- dlls/wined3d/surface.c | 26 -------------------------- dlls/wined3d/utils.c | 25 +++++++++++++++++++++---- 2 files changed, 21 insertions(+), 30 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index d54f525..0d3a0a2 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2259,14 +2259,6 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_ } break; - case WINED3DFMT_S4X4_UINT_D24_UNORM: - if (gl_info->supported[ARB_FRAMEBUFFER_OBJECT] - || gl_info->supported[EXT_PACKED_DEPTH_STENCIL]) - { - *convert = CONVERT_D24X4S4; - } - break; - default: break; } @@ -2595,24 +2587,6 @@ static HRESULT d3dfmt_convert_surface(const BYTE *src, BYTE *dst, UINT pitch, UI break; } - case CONVERT_D24X4S4: - { - unsigned int x, y; - - for (y = 0; y < height; ++y) - { - const DWORD *source = (const DWORD *)(src + y * pitch); - DWORD *dest = (DWORD *)(dst + y * outpitch); - - for (x = 0; x < width; ++x) - { - /* Just need to clear out the X4 part. */ - dest[x] = source[x] & ~0xf0; - } - } - break; - } - default: ERR("Unsupported conversion type %#x.\n", convert); } diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index b7efc9a..6970ec8 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -417,6 +417,23 @@ static void convert_r16g16_snorm(const BYTE *src, BYTE *dst, UINT pitch, UINT wi } } +static void convert_s4x4_uint_d24_unorm(const BYTE *src, BYTE *dst, UINT pitch, UINT width, UINT height) +{ + unsigned int x, y; + + for (y = 0; y < height; ++y) + { + const DWORD *source = (const DWORD *)(src + y * pitch); + DWORD *dest = (DWORD *)(dst + y * pitch); + + for (x = 0; x < width; ++x) + { + /* Just need to clear out the X4 part. */ + dest[x] = source[x] & ~0xf0; + } + } +} + static void convert_s8_uint_d24_float(const BYTE *src, BYTE *dst, UINT pitch, UINT width, UINT height) { unsigned int x, y; @@ -701,13 +718,13 @@ static const struct wined3d_format_texture_info format_texture_info[] = WINED3DFMT_FLAG_DEPTH, ARB_DEPTH_TEXTURE, NULL}, {WINED3DFMT_S4X4_UINT_D24_UNORM, GL_DEPTH24_STENCIL8_EXT, GL_DEPTH24_STENCIL8_EXT, 0, - GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT, 0, + GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT, 4, WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL, - EXT_PACKED_DEPTH_STENCIL, NULL}, + EXT_PACKED_DEPTH_STENCIL, &convert_s4x4_uint_d24_unorm}, {WINED3DFMT_S4X4_UINT_D24_UNORM, GL_DEPTH24_STENCIL8, GL_DEPTH24_STENCIL8, 0, - GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 0, + GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 4, WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL, - ARB_FRAMEBUFFER_OBJECT, NULL}, + ARB_FRAMEBUFFER_OBJECT, &convert_s4x4_uint_d24_unorm}, {WINED3DFMT_D16_UNORM, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, 0, WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH,
1
0
0
0
Roderick Colenbrander : wined3d: Move D24FS8 to formats table.
by Alexandre Julliard
13 Apr '10
13 Apr '10
Module: wine Branch: master Commit: 485040bb5c359614e0576b7a18adeaf76b794e4a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=485040bb5c359614e0576b7a1…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Mon Apr 12 20:59:58 2010 +0200 wined3d: Move D24FS8 to formats table. --- dlls/wined3d/surface.c | 27 --------------------------- dlls/wined3d/utils.c | 23 +++++++++++++++++++++-- 2 files changed, 21 insertions(+), 29 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 96e61c6..d54f525 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2267,14 +2267,6 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_ } break; - case WINED3DFMT_S8_UINT_D24_FLOAT: - if (gl_info->supported[ARB_DEPTH_BUFFER_FLOAT]) - { - *convert = CONVERT_D24FS8; - desc->conv_byte_count = 8; - } - break; - default: break; } @@ -2621,25 +2613,6 @@ static HRESULT d3dfmt_convert_surface(const BYTE *src, BYTE *dst, UINT pitch, UI break; } - case CONVERT_D24FS8: - { - unsigned int x, y; - - for (y = 0; y < height; ++y) - { - const DWORD *source = (const DWORD *)(src + y * pitch); - float *dest_f = (float *)(dst + y * outpitch); - DWORD *dest_s = (DWORD *)(dst + y * outpitch); - - for (x = 0; x < width; ++x) - { - dest_f[x * 2] = float_24_to_32((source[x] & 0xffffff00) >> 8); - dest_s[x * 2 + 1] = source[x] & 0xff; - } - } - break; - } - default: ERR("Unsupported conversion type %#x.\n", convert); } diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 43f7340..b7efc9a 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -417,6 +417,25 @@ static void convert_r16g16_snorm(const BYTE *src, BYTE *dst, UINT pitch, UINT wi } } +static void convert_s8_uint_d24_float(const BYTE *src, BYTE *dst, UINT pitch, UINT width, UINT height) +{ + unsigned int x, y; + UINT outpitch = pitch * 2; + + for (y = 0; y < height; ++y) + { + const DWORD *source = (const DWORD *)(src + y * pitch); + float *dest_f = (float *)(dst + y * outpitch); + DWORD *dest_s = (DWORD *)(dst + y * outpitch); + + for (x = 0; x < width; ++x) + { + dest_f[x * 2] = float_24_to_32((source[x] & 0xffffff00) >> 8); + dest_s[x * 2 + 1] = source[x] & 0xff; + } + } +} + static const struct wined3d_format_texture_info format_texture_info[] = { /* WINED3DFORMAT internal srgbInternal rtInternal @@ -702,9 +721,9 @@ static const struct wined3d_format_texture_info format_texture_info[] = WINED3DFMT_FLAG_DEPTH, ARB_DEPTH_BUFFER_FLOAT, NULL}, {WINED3DFMT_S8_UINT_D24_FLOAT, GL_DEPTH32F_STENCIL8, GL_DEPTH32F_STENCIL8, 0, - GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, 0, + GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, 8, WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL, - ARB_DEPTH_BUFFER_FLOAT, NULL}, + ARB_DEPTH_BUFFER_FLOAT, &convert_s8_uint_d24_float}, /* Vendor-specific formats */ {WINED3DFMT_ATI2N, GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI, GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, 0,
1
0
0
0
Roderick Colenbrander : wined3d: Move L6V5U5 conversion to the formats table.
by Alexandre Julliard
13 Apr '10
13 Apr '10
Module: wine Branch: master Commit: 798ba56c1b64fef02918988361ef212b827e7b08 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=798ba56c1b64fef0291898836…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Mon Apr 12 20:59:57 2010 +0200 wined3d: Move L6V5U5 conversion to the formats table. --- dlls/wined3d/surface.c | 69 ------------------------------------------------ dlls/wined3d/utils.c | 68 ++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 64 insertions(+), 73 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 1a9b6b0..96e61c6 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2224,18 +2224,6 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_ } break; - case WINED3DFMT_R5G5_SNORM_L6_UNORM: - *convert = CONVERT_L6V5U5; - if (gl_info->supported[NV_TEXTURE_SHADER]) - { - desc->conv_byte_count = 3; - /* Use format and types from table */ - } else { - /* Load it into unsigned R5G6B5, swap L and V channels, and revert that in the shader */ - desc->conv_byte_count = 2; - } - break; - case WINED3DFMT_L4A4_UNORM: /* WINED3DFMT_L4A4_UNORM exists as an internal gl format, but for some reason there is not * format+type combination to load it. Thus convert it to A8L8, then load it @@ -2385,8 +2373,6 @@ void d3dfmt_p8_init_palette(IWineD3DSurfaceImpl *This, BYTE table[256][4], BOOL static HRESULT d3dfmt_convert_surface(const BYTE *src, BYTE *dst, UINT pitch, UINT width, UINT height, UINT outpitch, CONVERT_TYPES convert, IWineD3DSurfaceImpl *This) { - IWineD3DDeviceImpl *device = This->resource.device; - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; const BYTE *source; BYTE *dest; TRACE("(%p)->(%p),(%d,%d,%d,%d,%p)\n", src, dst, pitch, height, outpitch, convert,This); @@ -2532,61 +2518,6 @@ static HRESULT d3dfmt_convert_surface(const BYTE *src, BYTE *dst, UINT pitch, UI } break; - case CONVERT_L6V5U5: - { - unsigned int x, y; - const WORD *Source; - unsigned char *Dest; - - if (gl_info->supported[NV_TEXTURE_SHADER]) - { - /* This makes the gl surface bigger(24 bit instead of 16), but it works with - * fixed function and shaders without further conversion once the surface is - * loaded - */ - for(y = 0; y < height; y++) { - Source = (const WORD *)(src + y * pitch); - Dest = dst + y * outpitch; - for (x = 0; x < width; x++ ) { - short color = (*Source++); - unsigned char l = ((color >> 10) & 0xfc); - char v = ((color >> 5) & 0x3e); - char u = ((color ) & 0x1f); - - /* 8 bits destination, 6 bits source, 8th bit is the sign. gl ignores the sign - * and doubles the positive range. Thus shift left only once, gl does the 2nd - * shift. GL reads a signed value and converts it into an unsigned value. - */ - /* M */ Dest[2] = l << 1; - - /* Those are read as signed, but kept signed. Just left-shift 3 times to scale - * from 5 bit values to 8 bit values. - */ - /* V */ Dest[1] = v << 3; - /* U */ Dest[0] = u << 3; - Dest += 3; - } - } - } else { - for(y = 0; y < height; y++) { - unsigned short *Dest_s = (unsigned short *) (dst + y * outpitch); - Source = (const WORD *)(src + y * pitch); - for (x = 0; x < width; x++ ) { - short color = (*Source++); - unsigned char l = ((color >> 10) & 0xfc); - short v = ((color >> 5) & 0x3e); - short u = ((color ) & 0x1f); - short v_conv = v + 16; - short u_conv = u + 16; - - *Dest_s = ((v_conv << 11) & 0xf800) | ((l << 5) & 0x7e0) | (u_conv & 0x1f); - Dest_s += 1; - } - } - } - break; - } - case CONVERT_A4L4: { unsigned int x, y; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 9a3e762..43f7340 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -241,6 +241,66 @@ struct wined3d_format_texture_info void (*convert)(const BYTE *src, BYTE *dst, UINT pitch, UINT width, UINT height); }; +static void convert_r5g5_snorm_l6_unorm(const BYTE *src, BYTE *dst, UINT pitch, UINT width, UINT height) +{ + unsigned int x, y; + const WORD *Source; + + for(y = 0; y < height; y++) + { + unsigned short *Dest_s = (unsigned short *) (dst + y * pitch); + Source = (const WORD *)(src + y * pitch); + for (x = 0; x < width; x++ ) + { + short color = (*Source++); + unsigned char l = ((color >> 10) & 0xfc); + short v = ((color >> 5) & 0x3e); + short u = ((color ) & 0x1f); + short v_conv = v + 16; + short u_conv = u + 16; + + *Dest_s = ((v_conv << 11) & 0xf800) | ((l << 5) & 0x7e0) | (u_conv & 0x1f); + Dest_s += 1; + } + } +} + +static void convert_r5g5_snorm_l6_unorm_nv(const BYTE *src, BYTE *dst, UINT pitch, UINT width, UINT height) +{ + unsigned int x, y; + const WORD *Source; + unsigned char *Dest; + UINT outpitch = (pitch * 3)/2; + + /* This makes the gl surface bigger(24 bit instead of 16), but it works with + * fixed function and shaders without further conversion once the surface is + * loaded + */ + for(y = 0; y < height; y++) { + Source = (const WORD *)(src + y * pitch); + Dest = dst + y * outpitch; + for (x = 0; x < width; x++ ) { + short color = (*Source++); + unsigned char l = ((color >> 10) & 0xfc); + char v = ((color >> 5) & 0x3e); + char u = ((color ) & 0x1f); + + /* 8 bits destination, 6 bits source, 8th bit is the sign. gl ignores the sign + * and doubles the positive range. Thus shift left only once, gl does the 2nd + * shift. GL reads a signed value and converts it into an unsigned value. + */ + /* M */ Dest[2] = l << 1; + + /* Those are read as signed, but kept signed. Just left-shift 3 times to scale + * from 5 bit values to 8 bit values. + */ + /* V */ Dest[1] = v << 3; + /* U */ Dest[0] = u << 3; + Dest += 3; + } + } +} + static void convert_r8g8_snorm(const BYTE *src, BYTE *dst, UINT pitch, UINT width, UINT height) { unsigned int x, y; @@ -549,13 +609,13 @@ static const struct wined3d_format_texture_info format_texture_info[] = WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING, NV_TEXTURE_SHADER, NULL}, {WINED3DFMT_R5G5_SNORM_L6_UNORM, GL_RGB5, GL_RGB5, 0, - GL_RGB, GL_UNSIGNED_SHORT_5_6_5, 0, + GL_RGB, GL_UNSIGNED_SHORT_5_6_5, 2, WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING, - WINED3D_GL_EXT_NONE, NULL}, + WINED3D_GL_EXT_NONE, &convert_r5g5_snorm_l6_unorm}, {WINED3DFMT_R5G5_SNORM_L6_UNORM, GL_DSDT8_MAG8_NV, GL_DSDT8_MAG8_NV, 0, - GL_DSDT_MAG_NV, GL_BYTE, 0, + GL_DSDT_MAG_NV, GL_BYTE, 3, WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING, - NV_TEXTURE_SHADER, NULL}, + NV_TEXTURE_SHADER, &convert_r5g5_snorm_l6_unorm_nv}, {WINED3DFMT_R8G8_SNORM_L8X8_UNORM, GL_RGB8, GL_RGB8, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, 4, WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING,
1
0
0
0
Alexandre Julliard : msvcrt: Export a few more C++ functions that actually call standard C functions.
by Alexandre Julliard
13 Apr '10
13 Apr '10
Module: wine Branch: master Commit: 6000b08ca7d6d59b2edafcbdf09ad319717ee2f6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6000b08ca7d6d59b2edafcbdf…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Apr 13 17:52:31 2010 +0200 msvcrt: Export a few more C++ functions that actually call standard C functions. --- dlls/msvcr71/msvcr71.spec | 4 ++-- dlls/msvcr80/msvcr80.spec | 12 ++++++------ dlls/msvcr90/msvcr90.spec | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dlls/msvcr71/msvcr71.spec b/dlls/msvcr71/msvcr71.spec index c9542bc..c16de92 100644 --- a/dlls/msvcr71/msvcr71.spec +++ b/dlls/msvcr71/msvcr71.spec @@ -43,11 +43,11 @@ @ cdecl ?set_terminate@@YAP6AXXZP6AXXZ@Z(ptr) msvcrt.?set_terminate@@YAP6AXXZP6AXXZ@Z @ cdecl ?set_unexpected@@YAP6AXXZP6AXXZ@Z(ptr) msvcrt.?set_unexpected@@YAP6AXXZP6AXXZ@Z @ varargs ?swprintf@@YAHPAGIPBGZZ(ptr long wstr) msvcrt._snwprintf -@ stub ?swprintf@@YAHPA_WIPB_WZZ +@ varargs ?swprintf@@YAHPA_WIPB_WZZ(ptr long wstr) msvcrt._snwprintf @ cdecl ?terminate@@YAXXZ() msvcrt.?terminate@@YAXXZ @ cdecl ?unexpected@@YAXXZ() msvcrt.?unexpected@@YAXXZ @ cdecl ?vswprintf@@YAHPAGIPBGPAD@Z(ptr long wstr ptr) msvcrt._vsnwprintf -@ stub ?vswprintf@@YAHPA_WIPB_WPAD@Z +@ cdecl ?vswprintf@@YAHPA_WIPB_WPAD@Z(ptr long wstr ptr) msvcrt._vsnwprintf @ cdecl -i386 ?what@exception@@UBEPBDXZ() msvcrt.?what@exception@@UBEPBDXZ @ cdecl $I10_OUTPUT() msvcrt.$I10_OUTPUT @ cdecl -arch=i386 _CIacos() msvcrt._CIacos diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 3540296..2154478 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -53,10 +53,10 @@ @ cdecl ?_set_new_mode@@YAHH@Z(long) msvcrt.?_set_new_mode@@YAHH@Z @ stub ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZH@Z @ cdecl ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z(ptr) msvcrt.?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z -@ stub ?_sopen@@YAHPBDHHH@Z +@ cdecl ?_sopen@@YAHPBDHHH@Z(str long long long) msvcrt._sopen @ stub ?_type_info_dtor_internal_method@type_info@@QAEXXZ -@ stub ?_wopen@@YAHPB_WHH@Z -@ stub ?_wsopen@@YAHPB_WHHH@Z +@ cdecl ?_wopen@@YAHPB_WHH@Z(wstr long long) msvcrt._wopen +@ cdecl ?_wsopen@@YAHPB_WHHH@Z(wstr long long long) msvcrt._wsopen @ cdecl -i386 -norelay ?before@type_info@@QBEHABV1@@Z(ptr) msvcrt.?before@type_info@@QBEHABV1@@Z @ stub ?name@type_info@@QBEPBDPAU__type_info_node@@@Z @ cdecl -i386 -norelay ?raw_name@type_info@@QBEPBDXZ() msvcrt.?raw_name@type_info@@QBEPBDXZ @@ -65,11 +65,11 @@ @ cdecl ?set_terminate@@YAP6AXXZP6AXXZ@Z(ptr) msvcrt.?set_terminate@@YAP6AXXZP6AXXZ@Z @ stub ?set_unexpected@@YAP6AXXZH@Z @ cdecl ?set_unexpected@@YAP6AXXZP6AXXZ@Z(ptr) msvcrt.?set_unexpected@@YAP6AXXZP6AXXZ@Z -@ stub ?swprintf@@YAHPAGIPBGZZ -@ stub ?swprintf@@YAHPA_WIPB_WZZ +@ varargs ?swprintf@@YAHPAGIPBGZZ(ptr long wstr) msvcrt._snwprintf +@ varargs ?swprintf@@YAHPA_WIPB_WZZ(ptr long wstr) msvcrt._snwprintf @ cdecl ?terminate@@YAXXZ() msvcrt.?terminate@@YAXXZ @ cdecl ?unexpected@@YAXXZ() msvcrt.?unexpected@@YAXXZ -@ stub ?vswprintf@@YAHPA_WIPB_WPAD@Z +@ cdecl ?vswprintf@@YAHPA_WIPB_WPAD@Z(ptr long wstr ptr) msvcrt._vsnwprintf @ cdecl -i386 -norelay ?what@exception@std@@UBEPBDXZ() msvcrt.?what@exception@@UBEPBDXZ @ stub @_calloc_crt@8 @ cdecl @_malloc_crt@4(long) msvcrt.malloc diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 218ae78..1b85a6e 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -53,10 +53,10 @@ @ cdecl ?_set_new_mode@@YAHH@Z(long) msvcrt.?_set_new_mode@@YAHH@Z @ stub ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZH@Z @ cdecl ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z(ptr) msvcrt.?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z -@ stub ?_sopen@@YAHPBDHHH@Z +@ cdecl ?_sopen@@YAHPBDHHH@Z(str long long long) msvcrt._sopen @ stub ?_type_info_dtor_internal_method@type_info@@QAEXXZ -@ stub ?_wopen@@YAHPB_WHH@Z -@ stub ?_wsopen@@YAHPB_WHHH@Z +@ cdecl ?_wopen@@YAHPB_WHH@Z(wstr long long) msvcrt._wopen +@ cdecl ?_wsopen@@YAHPB_WHHH@Z(wstr long long long) msvcrt._wsopen @ cdecl -i386 -norelay ?before@type_info@@QBEHABV1@@Z(ptr) msvcrt.?before@type_info@@QBEHABV1@@Z @ stub ?name@type_info@@QBEPBDPAU__type_info_node@@@Z @ cdecl -i386 -norelay ?raw_name@type_info@@QBEPBDXZ() msvcrt.?raw_name@type_info@@QBEPBDXZ @@ -65,11 +65,11 @@ @ cdecl ?set_terminate@@YAP6AXXZP6AXXZ@Z(ptr) msvcrt.?set_terminate@@YAP6AXXZP6AXXZ@Z @ stub ?set_unexpected@@YAP6AXXZH@Z @ cdecl ?set_unexpected@@YAP6AXXZP6AXXZ@Z(ptr) msvcrt.?set_unexpected@@YAP6AXXZP6AXXZ@Z -@ stub ?swprintf@@YAHPAGIPBGZZ -@ stub ?swprintf@@YAHPA_WIPB_WZZ +@ varargs ?swprintf@@YAHPAGIPBGZZ(ptr long wstr) msvcrt._snwprintf +@ varargs ?swprintf@@YAHPA_WIPB_WZZ(ptr long wstr) msvcrt._snwprintf @ cdecl ?terminate@@YAXXZ() msvcrt.?terminate@@YAXXZ @ cdecl ?unexpected@@YAXXZ() msvcrt.?unexpected@@YAXXZ -@ stub ?vswprintf@@YAHPA_WIPB_WPAD@Z +@ cdecl ?vswprintf@@YAHPA_WIPB_WPAD@Z(ptr long wstr ptr) msvcrt._vsnwprintf @ cdecl -i386 -norelay ?what@exception@std@@UBEPBDXZ() msvcrt.?what@exception@@UBEPBDXZ @ cdecl $I10_OUTPUT() msvcrt.$I10_OUTPUT @ cdecl -arch=i386 _CIacos() msvcrt._CIacos
1
0
0
0
Alexandre Julliard : msvcrt: Add support for VC7 and VC8 extensions to the C++ exception handler.
by Alexandre Julliard
13 Apr '10
13 Apr '10
Module: wine Branch: master Commit: 5807b5e55c9647dbd68454aab08f5f7e86436793 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5807b5e55c9647dbd68454aab…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Apr 13 17:21:06 2010 +0200 msvcrt: Add support for VC7 and VC8 extensions to the C++ exception handler. --- dlls/msvcr80/msvcr80.spec | 4 ++-- dlls/msvcr90/msvcr90.spec | 4 ++-- dlls/msvcrt/cppexcept.c | 17 +++++++++++++---- dlls/msvcrt/cppexcept.h | 13 ++++++++++--- dlls/msvcrt/msvcrt.spec | 4 ++-- 5 files changed, 29 insertions(+), 13 deletions(-) diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index ec80a7f..3540296 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -118,8 +118,8 @@ @ cdecl __CxxDetectRethrow(ptr) msvcrt.__CxxDetectRethrow @ stub __CxxExceptionFilter @ cdecl -i386 -norelay __CxxFrameHandler(ptr ptr ptr ptr) msvcrt.__CxxFrameHandler -@ stub __CxxFrameHandler2 -@ stub __CxxFrameHandler3 +@ cdecl -i386 -norelay __CxxFrameHandler2(ptr ptr ptr ptr) msvcrt.__CxxFrameHandler +@ cdecl -i386 -norelay __CxxFrameHandler3(ptr ptr ptr ptr) msvcrt.__CxxFrameHandler @ stdcall -i386 __CxxLongjmpUnwind(ptr) msvcrt.__CxxLongjmpUnwind @ cdecl __CxxQueryExceptionSize() msvcrt.__CxxQueryExceptionSize @ stub __CxxRegisterExceptionObject diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 5854663..218ae78 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -115,8 +115,8 @@ @ cdecl __CxxDetectRethrow(ptr) msvcrt.__CxxDetectRethrow @ stub __CxxExceptionFilter @ cdecl -i386 -norelay __CxxFrameHandler(ptr ptr ptr ptr) msvcrt.__CxxFrameHandler -@ stub __CxxFrameHandler2 -@ stub __CxxFrameHandler3 +@ cdecl -i386 -norelay __CxxFrameHandler2(ptr ptr ptr ptr) msvcrt.__CxxFrameHandler +@ cdecl -i386 -norelay __CxxFrameHandler3(ptr ptr ptr ptr) msvcrt.__CxxFrameHandler @ stdcall -i386 __CxxLongjmpUnwind(ptr) msvcrt.__CxxLongjmpUnwind @ cdecl __CxxQueryExceptionSize() msvcrt.__CxxQueryExceptionSize @ stub __CxxRegisterExceptionObject diff --git a/dlls/msvcrt/cppexcept.c b/dlls/msvcrt/cppexcept.c index 4bdd59c..a07d544 100644 --- a/dlls/msvcrt/cppexcept.c +++ b/dlls/msvcrt/cppexcept.c @@ -138,6 +138,10 @@ static void dump_function_descr( const cxx_function_descr *descr ) ptr->type_info, dbgstr_type_info( ptr->type_info ) ); } } + if (descr->magic <= CXX_FRAME_MAGIC_VC6) return; + TRACE( "expect list: %p\n", descr->expect_list ); + if (descr->magic <= CXX_FRAME_MAGIC_VC7) return; + TRACE( "flags: %08x\n", descr->flags ); } /* check if the exception type is caught by a given catch block, and return the type that matched */ @@ -363,11 +367,16 @@ DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame { cxx_exception_type *exc_type; - if (descr->magic != CXX_FRAME_MAGIC) + if (descr->magic < CXX_FRAME_MAGIC_VC6 || descr->magic > CXX_FRAME_MAGIC_VC8) { ERR( "invalid frame magic %x\n", descr->magic ); return ExceptionContinueSearch; } + if (descr->magic >= CXX_FRAME_MAGIC_VC8 && + (descr->flags & FUNC_DESCR_SYNCHRONOUS) && + (rec->ExceptionCode != CXX_EXCEPTION)) + return ExceptionContinueSearch; /* handle only c++ exceptions */ + if (rec->ExceptionFlags & (EH_UNWINDING|EH_EXIT_UNWIND)) { if (descr->unwind_count && !nested_trylevel) cxx_local_unwind( frame, descr, -1 ); @@ -379,7 +388,7 @@ DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame { exc_type = (cxx_exception_type *)rec->ExceptionInformation[2]; - if (rec->ExceptionInformation[0] > CXX_FRAME_MAGIC && + if (rec->ExceptionInformation[0] > CXX_FRAME_MAGIC_VC8 && exc_type->custom_handler) { return exc_type->custom_handler( rec, frame, context, dispatch, @@ -466,7 +475,7 @@ void CDECL _CxxThrowException( exception *object, const cxx_exception_type *type { ULONG_PTR args[3]; - args[0] = CXX_FRAME_MAGIC; + args[0] = CXX_FRAME_MAGIC_VC6; args[1] = (ULONG_PTR)object; args[2] = (ULONG_PTR)type; RaiseException( CXX_EXCEPTION, EH_NONCONTINUABLE, 3, args ); @@ -486,7 +495,7 @@ BOOL CDECL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs) if (rec->ExceptionCode == CXX_EXCEPTION && rec->NumberParameters == 3 && - rec->ExceptionInformation[0] == CXX_FRAME_MAGIC && + rec->ExceptionInformation[0] == CXX_FRAME_MAGIC_VC6 && rec->ExceptionInformation[2]) { ptrs->ExceptionRecord = msvcrt_get_thread_data()->exc_record; diff --git a/dlls/msvcrt/cppexcept.h b/dlls/msvcrt/cppexcept.h index 7afb078..a46f222 100644 --- a/dlls/msvcrt/cppexcept.h +++ b/dlls/msvcrt/cppexcept.h @@ -21,8 +21,10 @@ #ifndef __MSVCRT_CPPEXCEPT_H #define __MSVCRT_CPPEXCEPT_H -#define CXX_FRAME_MAGIC 0x19930520 -#define CXX_EXCEPTION 0xe06d7363 +#define CXX_FRAME_MAGIC_VC6 0x19930520 +#define CXX_FRAME_MAGIC_VC7 0x19930521 +#define CXX_FRAME_MAGIC_VC8 0x19930522 +#define CXX_EXCEPTION 0xe06d7363 typedef void (*vtable_ptr)(void); @@ -87,9 +89,14 @@ typedef struct __cxx_function_descr const unwind_info *unwind_table; /* array of unwind handlers */ UINT tryblock_count; /* number of try blocks */ const tryblock_info *tryblock; /* array of try blocks */ - UINT unknown[3]; + UINT ipmap_count; + const void *ipmap; + const void *expect_list; /* expected exceptions list when magic >= VC7 */ + UINT flags; /* flags when magic >= VC8 */ } cxx_function_descr; +#define FUNC_DESCR_SYNCHRONOUS 1 /* synchronous exceptions only (built with /EHs) */ + typedef void (*cxx_copy_ctor)(void); /* offsets for computing the this pointer */ diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index c90110f..8482863 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -114,8 +114,8 @@ @ cdecl __CxxDetectRethrow(ptr) # stub __CxxExceptionFilter @ cdecl -i386 -norelay __CxxFrameHandler(ptr ptr ptr ptr) -# stub __CxxFrameHandler2 -# stub __CxxFrameHandler3 +@ cdecl -i386 -norelay __CxxFrameHandler2(ptr ptr ptr ptr) __CxxFrameHandler +@ cdecl -i386 -norelay __CxxFrameHandler3(ptr ptr ptr ptr) __CxxFrameHandler @ stdcall -arch=x86_64 __C_specific_handler(ptr long ptr ptr) ntdll.__C_specific_handler @ stdcall -i386 __CxxLongjmpUnwind(ptr) @ cdecl __CxxQueryExceptionSize()
1
0
0
0
← Newer
1
...
53
54
55
56
57
58
59
...
90
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
Results per page:
10
25
50
100
200