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
March 2009
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
834 discussions
Start a n
N
ew thread
Alexandre Julliard : ifsmgr.vxd: Load winedos dynamically.
by Alexandre Julliard
13 Mar '09
13 Mar '09
Module: wine Branch: master Commit: bc553a09cab7cb4a3a110baf406d97df1b5a3de4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bc553a09cab7cb4a3a110baf4…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Mar 13 11:59:32 2009 +0100 ifsmgr.vxd: Load winedos dynamically. --- dlls/ifsmgr.vxd/Makefile.in | 2 +- dlls/ifsmgr.vxd/ifsmgr.c | 26 ++++++++++++++++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/dlls/ifsmgr.vxd/Makefile.in b/dlls/ifsmgr.vxd/Makefile.in index 9a2a914..aace959 100644 --- a/dlls/ifsmgr.vxd/Makefile.in +++ b/dlls/ifsmgr.vxd/Makefile.in @@ -3,7 +3,7 @@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = ifsmgr.vxd -IMPORTS = winedos kernel32 +IMPORTS = kernel32 C_SRCS = \ ifsmgr.c diff --git a/dlls/ifsmgr.vxd/ifsmgr.c b/dlls/ifsmgr.vxd/ifsmgr.c index 47053e0..1e60ad5 100644 --- a/dlls/ifsmgr.vxd/ifsmgr.c +++ b/dlls/ifsmgr.vxd/ifsmgr.c @@ -36,8 +36,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(vxd); -extern void WINAPI CallBuiltinHandler( CONTEXT86 *context, BYTE intnum ); /* from winedos */ - /* * IFSMgr DeviceIO service */ @@ -99,6 +97,23 @@ static void CONTEXT_2_win32apieq(const CONTEXT86 *pCxt, struct win32apireq *pOut /* FIXME: pOut->ar_pad ignored */ } +typedef void (WINAPI *CallBuiltinHandler)( CONTEXT *context, BYTE intnum ); + +static CallBuiltinHandler load_builtin_handler(void) +{ + static CallBuiltinHandler handler; + static BOOL init_done; + + if (!init_done) + { + HMODULE mod = LoadLibraryA( "winedos.dll" ); + if (mod) handler = (void *)GetProcAddress( mod, "CallBuiltinHandler" ); + if (!handler) FIXME( "DOS calls not supported\n" ); + init_done = TRUE; + } + return handler; +} + /*********************************************************************** * DeviceIoControl (IFSMGR.VXD.@) */ @@ -119,6 +134,9 @@ BOOL WINAPI IFSMGR_DeviceIoControl(DWORD dwIoControlCode, LPVOID lpvInBuffer, DW CONTEXT86 cxt; struct win32apireq *pIn=lpvInBuffer; struct win32apireq *pOut=lpvOutBuffer; + CallBuiltinHandler handler; + + if (!(handler = load_builtin_handler())) return FALSE; TRACE( "Control '%s': " "proid=0x%08lx, eax=0x%08lx, ebx=0x%08lx, ecx=0x%08lx, " @@ -132,9 +150,9 @@ BOOL WINAPI IFSMGR_DeviceIoControl(DWORD dwIoControlCode, LPVOID lpvInBuffer, DW win32apieq_2_CONTEXT(pIn,&cxt); if(dwIoControlCode==IFS_IOCTL_21) - CallBuiltinHandler( &cxt, 0x21 ); + handler( &cxt, 0x21 ); else - CallBuiltinHandler( &cxt, 0x2f ); + handler( &cxt, 0x2f ); CONTEXT_2_win32apieq(&cxt,pOut); return TRUE;
1
0
0
0
Alexandre Julliard : ntdll: Move the copy_context function into the respective CPU-specific files.
by Alexandre Julliard
13 Mar '09
13 Mar '09
Module: wine Branch: master Commit: 75be87dd7506f24a8430c2c78cbcb4750b9692e1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=75be87dd7506f24a8430c2c78…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Mar 13 11:31:25 2009 +0100 ntdll: Move the copy_context function into the respective CPU-specific files. --- dlls/ntdll/ntdll_misc.h | 1 + dlls/ntdll/signal_i386.c | 53 ++++++++++ dlls/ntdll/signal_powerpc.c | 89 ++++++++++++++++ dlls/ntdll/signal_sparc.c | 59 +++++++++++ dlls/ntdll/signal_x86_64.c | 58 +++++++++++ dlls/ntdll/thread.c | 233 ------------------------------------------- 6 files changed, 260 insertions(+), 233 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=75be87dd7506f24a8430c…
1
0
0
0
Alexandre Julliard : user32/tests: Print a more useful line number in check_class and check_instance tests.
by Alexandre Julliard
13 Mar '09
13 Mar '09
Module: wine Branch: master Commit: 10350c19a07b43a2a2e90b8769502dd3ab9c005f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=10350c19a07b43a2a2e90b876…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Mar 13 11:30:15 2009 +0100 user32/tests: Print a more useful line number in check_class and check_instance tests. --- dlls/user32/tests/class.c | 40 +++++++++++++++++++++++----------------- 1 files changed, 23 insertions(+), 17 deletions(-) diff --git a/dlls/user32/tests/class.c b/dlls/user32/tests/class.c index a1ae4bd..f3e8242 100644 --- a/dlls/user32/tests/class.c +++ b/dlls/user32/tests/class.c @@ -234,42 +234,48 @@ static void test_styles(void) check_style( "#32772", 1, 0, 0 ); /* icon title */ } -static void check_class(HINSTANCE inst, const char *name, const char *menu_name) +static void check_class_(int line, HINSTANCE inst, const char *name, const char *menu_name) { WNDCLASS wc; UINT atom = GetClassInfo(inst,name,&wc); - ok( atom, "Class %s %p not found\n", name, inst ); + ok_(__FILE__,line)( atom, "Class %s %p not found\n", name, inst ); if (atom) { if (wc.lpszMenuName && menu_name) - ok( !strcmp( menu_name, wc.lpszMenuName ), "Wrong name %s/%s for class %s %p\n", - wc.lpszMenuName, menu_name, name, inst ); + ok_(__FILE__,line)( !strcmp( menu_name, wc.lpszMenuName ), + "Wrong name %s/%s for class %s %p\n", + wc.lpszMenuName, menu_name, name, inst ); else - ok( !menu_name == !wc.lpszMenuName, "Wrong name %p/%p for class %s %p\n", - wc.lpszMenuName, menu_name, name, inst ); + ok_(__FILE__,line)( !menu_name == !wc.lpszMenuName, "Wrong name %p/%p for class %s %p\n", + wc.lpszMenuName, menu_name, name, inst ); } } +#define check_class(inst,name,menu) check_class_(__LINE__,inst,name,menu) -static void check_instance( const char *name, HINSTANCE inst, HINSTANCE info_inst, HINSTANCE gcl_inst ) +static void check_instance_( int line, const char *name, HINSTANCE inst, + HINSTANCE info_inst, HINSTANCE gcl_inst ) { WNDCLASSA wc; HWND hwnd; - ok( GetClassInfo( inst, name, &wc ), "Couldn't find class %s inst %p\n", name, inst ); - ok( wc.hInstance == info_inst, "Wrong info instance %p/%p for class %s\n", - wc.hInstance, info_inst, name ); + ok_(__FILE__,line)( GetClassInfo( inst, name, &wc ), "Couldn't find class %s inst %p\n", name, inst ); + ok_(__FILE__,line)( wc.hInstance == info_inst, "Wrong info instance %p/%p for class %s\n", + wc.hInstance, info_inst, name ); hwnd = CreateWindowExA( 0, name, "test_window", 0, 0, 0, 0, 0, 0, 0, inst, 0 ); - ok( hwnd != NULL, "Couldn't create window for class %s inst %p\n", name, inst ); - ok( (HINSTANCE)GetClassLongPtrA( hwnd, GCLP_HMODULE ) == gcl_inst, - "Wrong GCL instance %p/%p for class %s\n", + ok_(__FILE__,line)( hwnd != NULL, "Couldn't create window for class %s inst %p\n", name, inst ); + ok_(__FILE__,line)( (HINSTANCE)GetClassLongPtrA( hwnd, GCLP_HMODULE ) == gcl_inst, + "Wrong GCL instance %p/%p for class %s\n", (HINSTANCE)GetClassLongPtrA( hwnd, GCLP_HMODULE ), gcl_inst, name ); - ok( (HINSTANCE)GetWindowLongPtrA( hwnd, GWLP_HINSTANCE ) == inst, - "Wrong GWL instance %p/%p for window %s\n", + ok_(__FILE__,line)( (HINSTANCE)GetWindowLongPtrA( hwnd, GWLP_HINSTANCE ) == inst, + "Wrong GWL instance %p/%p for window %s\n", (HINSTANCE)GetWindowLongPtrA( hwnd, GWLP_HINSTANCE ), inst, name ); - ok(!UnregisterClassA(name, inst), "UnregisterClassA should fail while exists a class window\n"); - ok(GetLastError() == ERROR_CLASS_HAS_WINDOWS, "GetLastError() should be set to ERROR_CLASS_HAS_WINDOWS not %d\n", GetLastError()); + ok_(__FILE__,line)(!UnregisterClassA(name, inst), + "UnregisterClassA should fail while exists a class window\n"); + ok_(__FILE__,line)(GetLastError() == ERROR_CLASS_HAS_WINDOWS, + "GetLastError() should be set to ERROR_CLASS_HAS_WINDOWS not %d\n", GetLastError()); DestroyWindow(hwnd); } +#define check_instance(name,inst,info_inst,gcl_inst) check_instance_(__LINE__,name,inst,info_inst,gcl_inst) struct class_info {
1
0
0
0
Alexandre Julliard : user32/tests: Add optional restore sequence for Vista.
by Alexandre Julliard
13 Mar '09
13 Mar '09
Module: wine Branch: master Commit: 0caa310c37c57a6413282ed47b6e0d81297b54b1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0caa310c37c57a6413282ed47…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Mar 13 11:29:53 2009 +0100 user32/tests: Add optional restore sequence for Vista. --- dlls/user32/tests/msg.c | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index d1825d3..7ea47e7 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -590,10 +590,34 @@ static const struct message WmShowMinOverlappedSeq[] = { { WM_GETTEXT, sent|defwinproc|optional }, { WM_ACTIVATE, sent }, { WM_ACTIVATEAPP, sent|wparam, 0 }, + /* Vista sometimes restores the window right away... */ { WM_SYSCOMMAND, sent|optional|wparam, SC_RESTORE }, { HCBT_SYSCOMMAND, hook|optional|wparam, SC_RESTORE }, { HCBT_MINMAX, hook|optional|lparam, 0, SW_RESTORE }, + { WM_QUERYOPEN, sent|optional }, + { WM_WINDOWPOSCHANGING, sent|optional|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, + { WM_GETMINMAXINFO, sent|optional|defwinproc }, + { WM_NCCALCSIZE, sent|optional|wparam, TRUE }, + { HCBT_ACTIVATE, hook|optional }, + { WM_ACTIVATEAPP, sent|optional|wparam, 1 }, + { WM_NCACTIVATE, sent|optional }, + { WM_GETTEXT, sent|optional }, + { WM_ACTIVATE, sent|optional|wparam, 1 }, + { HCBT_SETFOCUS, hook|optional }, + { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, + { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, + { WM_SETFOCUS, sent|optional }, + { WM_NCPAINT, sent|optional }, + { WM_GETTEXT, sent|defwinproc|optional }, + { WM_ERASEBKGND, sent|optional }, + { WM_WINDOWPOSCHANGED, sent|optional|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, + { WM_MOVE, sent|defwinproc|optional }, + { WM_SIZE, sent|defwinproc|optional|wparam, SIZE_RESTORED }, + { WM_ACTIVATE, sent|optional|wparam, 1 }, + { WM_SYSCOMMAND, sent|optional|wparam, SC_RESTORE }, + { HCBT_SYSCOMMAND, hook|optional|wparam, SC_RESTORE }, + { WM_PAINT, sent|optional }, { WM_NCPAINT, sent|beginpaint|optional }, { WM_ERASEBKGND, sent|beginpaint|optional }, @@ -8229,6 +8253,7 @@ static const struct message ScrollWindowPaint1[] = { { WM_NCPAINT, sent|beginpaint|optional }, { WM_GETTEXT, sent|beginpaint|optional }, { WM_GETTEXT, sent|beginpaint|optional }, + { WM_GETTEXT, sent|beginpaint|optional }, { WM_ERASEBKGND, sent|beginpaint|optional }, { 0 } };
1
0
0
0
Henri Verbeet : wined3d: Remove the format field from IWineD3DResourceClass .
by Alexandre Julliard
13 Mar '09
13 Mar '09
Module: wine Branch: master Commit: 2dc7fc291680ca84eead1be2f2fb19844af73ff8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2dc7fc291680ca84eead1be2f…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Mar 13 10:44:18 2009 +0100 wined3d: Remove the format field from IWineD3DResourceClass. --- dlls/wined3d/buffer.c | 4 +- dlls/wined3d/context.c | 23 +++++--- dlls/wined3d/cubetexture.c | 3 +- dlls/wined3d/device.c | 34 +++++++---- dlls/wined3d/resource.c | 6 +- dlls/wined3d/surface.c | 125 +++++++++++++++++++++++---------------- dlls/wined3d/surface_base.c | 40 ++++++------ dlls/wined3d/surface_gdi.c | 8 ++- dlls/wined3d/swapchain.c | 2 +- dlls/wined3d/texture.c | 4 +- dlls/wined3d/volume.c | 5 +- dlls/wined3d/wined3d_private.h | 4 +- 12 files changed, 150 insertions(+), 108 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=2dc7fc291680ca84eead1…
1
0
0
0
Henri Verbeet : wined3d: Only return a pointer to struct GlPixelFormatDesc from getFormatDescEntry( ).
by Alexandre Julliard
13 Mar '09
13 Mar '09
Module: wine Branch: master Commit: a56e3a102b31c53e2c6acd5e9151e3e960d66a12 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a56e3a102b31c53e2c6acd5e9…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Mar 13 10:44:18 2009 +0100 wined3d: Only return a pointer to struct GlPixelFormatDesc from getFormatDescEntry(). --- dlls/wined3d/arb_program_shader.c | 2 +- dlls/wined3d/context.c | 22 ++++---- dlls/wined3d/device.c | 32 ++++++------ dlls/wined3d/directx.c | 100 ++++++++++++++++++++----------------- dlls/wined3d/resource.c | 2 +- dlls/wined3d/state.c | 19 ++----- dlls/wined3d/surface_base.c | 53 ++++++++++--------- dlls/wined3d/surface_gdi.c | 16 +++--- dlls/wined3d/utils.c | 62 +++++++++++------------ dlls/wined3d/wined3d_private.h | 16 ++----- 10 files changed, 159 insertions(+), 165 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=a56e3a102b31c53e2c6ac…
1
0
0
0
Henri Verbeet : wined3d: Add fields from StaticPixelFormatDesc to struct GlPixelFormatDesc.
by Alexandre Julliard
13 Mar '09
13 Mar '09
Module: wine Branch: master Commit: 53bf5c26585a22bb4a988baaf071106d8c0cfbe3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=53bf5c26585a22bb4a988baaf…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Mar 13 10:44:17 2009 +0100 wined3d: Add fields from StaticPixelFormatDesc to struct GlPixelFormatDesc. The idea here is that we should lookup format information in struct GlPixelFormatDesc, while StaticPixelFormatDesc and GlPixelFormatDescTemplate will only be used to build the table. --- dlls/wined3d/directx.c | 2 + dlls/wined3d/utils.c | 56 +++++++++++++++++++++++++++++---- dlls/wined3d/wined3d_private.h | 10 ++++++ dlls/wined3d/wined3d_private_types.h | 1 + 4 files changed, 62 insertions(+), 7 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 55b2b7e..fddc856 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -4458,6 +4458,8 @@ nogl_adapter: This->adapters[0].TextureRam = 8 * 1024 * 1024; /* This is plenty for a DDraw-only card */ } + initPixelFormatsNoGL(&This->adapters[0].gl_info); + This->adapter_count = 1; return FALSE; } diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index e6a6de0..7385654 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -365,6 +365,35 @@ static inline int getFmtIdx(WINED3DFORMAT fmt) { return -1; } +BOOL initPixelFormatsNoGL(WineD3D_GL_Info *gl_info) +{ + UINT format_count = sizeof(formats) / sizeof(*formats); + UINT i; + + gl_info->gl_formats = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, format_count * sizeof(*gl_info->gl_formats)); + if (!gl_info->gl_formats) + { + ERR("Failed to allocate memory.\n"); + return FALSE; + } + + for (i = 0; i < format_count; ++i) + { + struct GlPixelFormatDesc *desc = &gl_info->gl_formats[i]; + desc->format = formats[i].format; + desc->red_mask = formats[i].redMask; + desc->green_mask = formats[i].greenMask; + desc->blue_mask = formats[i].blueMask; + desc->alpha_mask = formats[i].alphaMask; + desc->byte_count = formats[i].bpp; + desc->depth_size = formats[i].depthSize; + desc->stencil_size = formats[i].stencilSize; + if (formats[i].isFourcc) desc->Flags |= WINED3DFMT_FLAG_FOURCC; + } + + return TRUE; +} + #define GLINFO_LOCATION (*gl_info) BOOL initPixelFormats(WineD3D_GL_Info *gl_info) { @@ -379,14 +408,27 @@ BOOL initPixelFormats(WineD3D_GL_Info *gl_info) * after this loop */ for(src = 0; src < sizeof(gl_formats_template) / sizeof(gl_formats_template[0]); src++) { + struct GlPixelFormatDesc *desc; dst = getFmtIdx(gl_formats_template[src].fmt); - gl_info->gl_formats[dst].glInternal = gl_formats_template[src].glInternal; - gl_info->gl_formats[dst].glGammaInternal = gl_formats_template[src].glGammaInternal; - gl_info->gl_formats[dst].glFormat = gl_formats_template[src].glFormat; - gl_info->gl_formats[dst].glType = gl_formats_template[src].glType; - gl_info->gl_formats[dst].color_fixup = COLOR_FIXUP_IDENTITY; - gl_info->gl_formats[dst].Flags = gl_formats_template[src].Flags; - gl_info->gl_formats[dst].heightscale = 1.0; + desc = &gl_info->gl_formats[dst]; + + desc->format = formats[dst].format; + desc->red_mask = formats[dst].redMask; + desc->green_mask = formats[dst].greenMask; + desc->blue_mask = formats[dst].blueMask; + desc->alpha_mask = formats[dst].alphaMask; + desc->byte_count = formats[dst].bpp; + desc->depth_size = formats[dst].depthSize; + desc->stencil_size = formats[dst].stencilSize; + if (formats[dst].isFourcc) desc->Flags |= WINED3DFMT_FLAG_FOURCC; + + desc->glInternal = gl_formats_template[src].glInternal; + desc->glGammaInternal = gl_formats_template[src].glGammaInternal; + desc->glFormat = gl_formats_template[src].glFormat; + desc->glType = gl_formats_template[src].glType; + desc->color_fixup = COLOR_FIXUP_IDENTITY; + desc->Flags |= gl_formats_template[src].Flags; + desc->heightscale = 1.0; if(wined3d_settings.offscreen_rendering_mode == ORM_FBO && gl_formats_template[src].rtInternal != 0) { diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index b2cc872..eade311 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -939,6 +939,7 @@ struct WineD3DAdapter }; extern BOOL initPixelFormats(WineD3D_GL_Info *gl_info); +BOOL initPixelFormatsNoGL(WineD3D_GL_Info *gl_info); extern long WineD3DAdapterChangeGLRam(IWineD3DDeviceImpl *D3DDevice, long glram); extern void add_gl_compat_wrappers(WineD3D_GL_Info *gl_info); @@ -2479,6 +2480,15 @@ extern WINED3DFORMAT pixelformat_for_depth(DWORD depth); struct GlPixelFormatDesc { + WINED3DFORMAT format; + DWORD red_mask; + DWORD green_mask; + DWORD blue_mask; + DWORD alpha_mask; + UINT byte_count; + WORD depth_size; + WORD stencil_size; + GLint glInternal; GLint glGammaInternal; GLint rtInternal; diff --git a/dlls/wined3d/wined3d_private_types.h b/dlls/wined3d/wined3d_private_types.h index 343244e..e5b4c3d 100644 --- a/dlls/wined3d/wined3d_private_types.h +++ b/dlls/wined3d/wined3d_private_types.h @@ -29,6 +29,7 @@ #define WINED3DFMT_FLAG_DEPTH 0x4 #define WINED3DFMT_FLAG_STENCIL 0x8 #define WINED3DFMT_FLAG_RENDERTARGET 0x10 +#define WINED3DFMT_FLAG_FOURCC 0x20 /** DCL usage masks **/ #define WINED3DSP_DCL_USAGE_SHIFT 0
1
0
0
0
Henri Verbeet : wined3d: Remove the width and height fields from IWineD3DTextureImpl.
by Alexandre Julliard
13 Mar '09
13 Mar '09
Module: wine Branch: master Commit: fbfc7c974294388c190f426b8783619e10531ced URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fbfc7c974294388c190f426b8…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Mar 13 10:44:17 2009 +0100 wined3d: Remove the width and height fields from IWineD3DTextureImpl. --- dlls/wined3d/device.c | 2 -- dlls/wined3d/wined3d_private.h | 3 --- 2 files changed, 0 insertions(+), 5 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 26759cb..54b371a 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -994,8 +994,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, *ppTexture = (IWineD3DTexture *)object; basetexture_init(&object->baseTexture, Levels, Usage); - object->width = Width; - object->height = Height; if (object->resource.format_desc->Flags & WINED3DFMT_FLAG_FILTERING) { diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 68629c6..b2cc872 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1385,9 +1385,6 @@ typedef struct IWineD3DTextureImpl /* IWineD3DTexture */ IWineD3DSurface *surfaces[MAX_LEVELS]; - - UINT width; - UINT height; UINT target; BOOL cond_np2;
1
0
0
0
Henri Verbeet : wined3d: Remove some redundant fields from struct glDescriptor.
by Alexandre Julliard
13 Mar '09
13 Mar '09
Module: wine Branch: master Commit: a3657c164d251d1d3ab219b6b9d81a187765ba19 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a3657c164d251d1d3ab219b6b…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Mar 13 10:44:17 2009 +0100 wined3d: Remove some redundant fields from struct glDescriptor. --- dlls/wined3d/device.c | 27 +++++++++++---------------- dlls/wined3d/surface.c | 36 ++++++++++++++---------------------- include/wine/wined3d.idl | 3 --- 3 files changed, 25 insertions(+), 41 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 4cefa18..26759cb 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -6028,6 +6028,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, int offset = 0; int rowoffset = 0; /* how many bytes to add onto the end of a row to wraparound to the beginning of the next */ glDescriptor *glDescription = NULL; + const struct GlPixelFormatDesc *dst_format_desc; GLenum dummy; int sampler; int bpp; @@ -6091,6 +6092,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, IWineD3DSurface_GetGlDesc(pDestinationSurface, &glDescription); + dst_format_desc = ((IWineD3DSurfaceImpl *)pDestinationSurface)->resource.format_desc; + /* this needs to be done in lines if the sourceRect != the sourceWidth */ srcWidth = pSourceRect ? pSourceRect->right - pSourceRect->left : srcSurfaceWidth; srcHeight = pSourceRect ? pSourceRect->bottom - pSourceRect->top : srcSurfaceHeight; @@ -6112,8 +6115,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, offset += pSourceRect->top * srcSurfaceWidth * pSrcSurface->bytesPerPixel; } TRACE("(%p) glTexSubImage2D, level %d, left %d, top %d, width %d, height %d, fmt %#x, type %#x, memory %p+%#x\n", - This, glDescription->level, destLeft, destTop, srcWidth, srcHeight, glDescription->glFormat, - glDescription->glType, IWineD3DSurface_GetData(pSourceSurface), offset); + This, glDescription->level, destLeft, destTop, srcWidth, srcHeight, dst_format_desc->glFormat, + dst_format_desc->glType, IWineD3DSurface_GetData(pSourceSurface), offset); /* Sanity check */ if (IWineD3DSurface_GetData(pSourceSurface) == NULL) { @@ -6132,18 +6135,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, /* hopefully using pointer addition will be quicker than using a point + j * rowoffset */ const unsigned char* data =((const unsigned char *)IWineD3DSurface_GetData(pSourceSurface)) + offset; - for(j = destTop ; j < (srcHeight + destTop) ; j++){ - - glTexSubImage2D(glDescription->target - ,glDescription->level - ,destLeft - ,j - ,srcWidth - ,1 - ,glDescription->glFormat - ,glDescription->glType - ,data /* could be quicker using */ - ); + for (j = destTop; j < (srcHeight + destTop); ++j) + { + glTexSubImage2D(glDescription->target, glDescription->level, destLeft, j, + srcWidth, 1, dst_format_desc->glFormat, dst_format_desc->glType,data); data += rowoffset; } @@ -6163,7 +6158,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, FIXME("Updating mixed format compressed texture is not curretly support\n"); } else { GL_EXTCALL(glCompressedTexImage2DARB(glDescription->target, glDescription->level, - glDescription->glFormatInternal, srcWidth, srcHeight, 0, destSize, data)); + dst_format_desc->glInternal, srcWidth, srcHeight, 0, destSize, data)); } } else { FIXME("Attempting to update a DXT compressed texture without hardware support\n"); @@ -6172,7 +6167,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, } else { glTexSubImage2D(glDescription->target, glDescription->level, destLeft, destTop, - srcWidth, srcHeight, glDescription->glFormat, glDescription->glType, data); + srcWidth, srcHeight, dst_format_desc->glFormat, dst_format_desc->glType, data); } } checkGLcall("glTexSubImage2D"); diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 7ccc3e0..8f79da0 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -138,12 +138,16 @@ static BOOL primary_render_target_is_p8(IWineD3DDeviceImpl *device) /* This call just downloads data, the caller is responsible for activating the * right context and binding the correct texture. */ static void surface_download_data(IWineD3DSurfaceImpl *This) { + const struct GlPixelFormatDesc *format_desc; + /* Only support read back of converted P8 surfaces */ if(This->Flags & SFLAG_CONVERTED && (This->resource.format != WINED3DFMT_P8)) { FIXME("Read back converted textures unsupported, format=%s\n", debug_d3dformat(This->resource.format)); return; } + format_desc = This->resource.format_desc; + ENTER_GL(); if (This->resource.format == WINED3DFMT_DXT1 || @@ -153,8 +157,9 @@ static void surface_download_data(IWineD3DSurfaceImpl *This) { if (!GL_SUPPORT(EXT_TEXTURE_COMPRESSION_S3TC)) { /* We can assume this as the texture would not have been created otherwise */ FIXME("(%p) : Attempting to lock a compressed texture when texture compression isn't supported by opengl\n", This); } else { - TRACE("(%p) : Calling glGetCompressedTexImageARB level %d, format %#x, type %#x, data %p\n", This, This->glDescription.level, - This->glDescription.glFormat, This->glDescription.glType, This->resource.allocatedMemory); + TRACE("(%p) : Calling glGetCompressedTexImageARB level %d, format %#x, type %#x, data %p\n", + This, This->glDescription.level, format_desc->glFormat, format_desc->glType, + This->resource.allocatedMemory); if(This->Flags & SFLAG_PBO) { GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, This->pbo)); @@ -171,8 +176,8 @@ static void surface_download_data(IWineD3DSurfaceImpl *This) { LEAVE_GL(); } else { void *mem; - GLenum format = This->glDescription.glFormat; - GLenum type = This->glDescription.glType; + GLenum format = format_desc->glFormat; + GLenum type = format_desc->glType; int src_pitch = 0; int dst_pitch = 0; @@ -829,8 +834,8 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, CONST RECT *rect, v default: mem = dest; - fmt = This->glDescription.glFormat; - type = This->glDescription.glType; + fmt = This->resource.format_desc->glFormat; + type = This->resource.format_desc->glType; bpp = This->bytesPerPixel; } @@ -2557,20 +2562,13 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_SaveSnapshot(IWineD3DSurface *iface, c static HRESULT WINAPI IWineD3DSurfaceImpl_SetFormat(IWineD3DSurface *iface, WINED3DFORMAT format) { IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; HRESULT hr; - const struct GlPixelFormatDesc *glDesc; - getFormatDescEntry(format, &GLINFO_LOCATION, &glDesc); TRACE("(%p) : Calling base function first\n", This); hr = IWineD3DBaseSurfaceImpl_SetFormat(iface, format); if(SUCCEEDED(hr)) { - /* Setup some glformat defaults */ - This->glDescription.glFormat = glDesc->glFormat; - This->glDescription.glFormatInternal = glDesc->glInternal; - This->glDescription.glType = glDesc->glType; - This->Flags &= ~(SFLAG_ALLOCATED | SFLAG_SRGBALLOCATED); - TRACE("(%p) : glFormat %d, glFotmatInternal %d, glType %d\n", This, - This->glDescription.glFormat, This->glDescription.glFormatInternal, This->glDescription.glType); + TRACE("(%p) : glFormat %d, glFormatInternal %d, glType %d\n", This, This->resource.format_desc->glFormat, + This->resource.format_desc->glInternal, This->resource.format_desc->glType); } return hr; } @@ -3837,14 +3835,8 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_RealizePalette(IWineD3DSurface *iface) static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) { /** Check against the maximum texture sizes supported by the video card **/ IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - const struct GlPixelFormatDesc *glDesc = This->resource.format_desc; unsigned int pow2Width, pow2Height; - /* Setup some glformat defaults */ - This->glDescription.glFormat = glDesc->glFormat; - This->glDescription.glFormatInternal = glDesc->glInternal; - This->glDescription.glType = glDesc->glType; - This->glDescription.textureName = 0; This->glDescription.target = GL_TEXTURE_2D; @@ -4126,7 +4118,7 @@ void surface_load_ds_location(IWineD3DSurface *iface, DWORD location) { glBindTexture(bind_target, device->depth_blt_texture); glCopyTexImage2D(bind_target, This->glDescription.level, - This->glDescription.glFormatInternal, + This->resource.format_desc->glInternal, 0, 0, This->currentDesc.Width, diff --git a/include/wine/wined3d.idl b/include/wine/wined3d.idl index b2ecfa0..5d502f1 100644 --- a/include/wine/wined3d.idl +++ b/include/wine/wined3d.idl @@ -1911,9 +1911,6 @@ typedef struct glDescriptor UINT textureName, srgbTextureName; int level; int /*GLenum*/ target; - int /*GLenum*/ glFormat; - int /*GLenum*/ glFormatInternal; - int /*GLenum*/ glType; } glDescriptor; typedef struct WineDirect3DStridedData
1
0
0
0
Henri Verbeet : wined3d: Eliminate the heightscale field from IWineD3DSurfaceImpl.
by Alexandre Julliard
13 Mar '09
13 Mar '09
Module: wine Branch: master Commit: a139683a601747e524c99de6cd6e8af4f3958dde URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a139683a601747e524c99de6c…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Mar 13 10:44:17 2009 +0100 wined3d: Eliminate the heightscale field from IWineD3DSurfaceImpl. --- dlls/wined3d/device.c | 1 - dlls/wined3d/surface.c | 6 ++++-- dlls/wined3d/wined3d_private.h | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 52df212..4cefa18 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -802,7 +802,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, U object->currentDesc.MultiSampleType = MultiSample; object->currentDesc.MultiSampleQuality = MultisampleQuality; object->glDescription.level = Level; - object->heightscale = glDesc->heightscale != 0.0 ? glDesc->heightscale : 1.0; list_init(&object->overlays); /* Flags */ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index c4c0b4b..7ccc3e0 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -287,8 +287,9 @@ static void surface_download_data(IWineD3DSurfaceImpl *This) { /* This call just uploads data, the caller is responsible for activating the * right context and binding the correct texture. */ static void surface_upload_data(IWineD3DSurfaceImpl *This, GLenum internal, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *data) { + const struct GlPixelFormatDesc *format_desc = This->resource.format_desc; - if(This->heightscale != 1.0 && This->heightscale != 0.0) height *= This->heightscale; + if (format_desc->heightscale != 1.0 && format_desc->heightscale != 0.0) height *= format_desc->heightscale; if (This->resource.format == WINED3DFMT_DXT1 || This->resource.format == WINED3DFMT_DXT2 || This->resource.format == WINED3DFMT_DXT3 || @@ -349,10 +350,11 @@ static void surface_upload_data(IWineD3DSurfaceImpl *This, GLenum internal, GLsi /* This call just allocates the texture, the caller is responsible for * activating the right context and binding the correct texture. */ static void surface_allocate_surface(IWineD3DSurfaceImpl *This, GLenum internal, GLsizei width, GLsizei height, GLenum format, GLenum type) { + const struct GlPixelFormatDesc *format_desc = This->resource.format_desc; BOOL enable_client_storage = FALSE; const BYTE *mem = NULL; - if(This->heightscale != 1.0 && This->heightscale != 0.0) height *= This->heightscale; + if (format_desc->heightscale != 1.0 && format_desc->heightscale != 0.0) height *= format_desc->heightscale; TRACE("(%p) : Creating surface (target %#x) level %d, d3d format %s, internal format %#x, width %d, height %d, gl format %#x, gl type=%#x\n", This, This->glDescription.target, This->glDescription.level, debug_d3dformat(This->resource.format), internal, width, height, format, type); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 570ab7f..68629c6 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1531,7 +1531,6 @@ struct IWineD3DSurfaceImpl UINT pow2Width; UINT pow2Height; - float heightscale; /* A method to retrieve the drawable size. Not in the Vtable to make it changeable */ void (*get_drawable_size)(IWineD3DSurfaceImpl *This, UINT *width, UINT *height);
1
0
0
0
← Newer
1
...
36
37
38
39
40
41
42
...
84
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
Results per page:
10
25
50
100
200