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 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
3 participants
919 discussions
Start a n
N
ew thread
Matteo Bruni : d3dx9: Implement D3DXAssembleShader function, really basic shader assembler.
by Alexandre Julliard
30 Mar '10
30 Mar '10
Module: wine Branch: master Commit: 95afbeadf5d34310632cc829bcffd2eff447cfba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=95afbeadf5d34310632cc829b…
Author: Matteo Bruni <matteo.mystral(a)gmail.com> Date: Sun Mar 28 21:16:09 2010 +0200 d3dx9: Implement D3DXAssembleShader function, really basic shader assembler. Currently it only accepts a minimal subset of the syntax (e.g. just an instruction and two register types supported) and doesn't produce any real output (i.e. shader bytecode). --- .gitignore | 3 + dlls/d3dx9_36/Makefile.in | 6 + dlls/d3dx9_36/asmparser.c | 143 ++++++++++++++++ dlls/d3dx9_36/asmshader.l | 131 ++++++++++++++ dlls/d3dx9_36/asmshader.y | 345 ++++++++++++++++++++++++++++++++++++++ dlls/d3dx9_36/asmutils.c | 58 +++++++ dlls/d3dx9_36/bytecodewriter.c | 139 +++++++++++++++ dlls/d3dx9_36/d3dx9_36_private.h | 266 +++++++++++++++++++++++++++++ dlls/d3dx9_36/shader.c | 65 +++++++- dlls/d3dx9_36/tests/asm.c | 6 +- 10 files changed, 1159 insertions(+), 3 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=95afbeadf5d34310632cc…
1
0
0
0
Matteo Bruni : d3dx9: Partial implementation of D3DXAssembleShader function .
by Alexandre Julliard
30 Mar '10
30 Mar '10
Module: wine Branch: master Commit: 75454161330d95e163cf7146e16672151e8a6c48 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=75454161330d95e163cf7146e…
Author: Matteo Bruni <matteo.mystral(a)gmail.com> Date: Sun Mar 28 16:00:36 2010 +0200 d3dx9: Partial implementation of D3DXAssembleShader function. This only executes the preprocessing pass. No parsing of the shader yet. --- dlls/d3dx9_36/Makefile.in | 1 + dlls/d3dx9_36/d3dx9_36_private.h | 7 + dlls/d3dx9_36/shader.c | 300 +++++++++++++++++++++++++++++++++++++- 3 files changed, 307 insertions(+), 1 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=75454161330d95e163cf7…
1
0
0
0
Alexandre Julliard : wpp: Build with -fPIC to allow libwpp to be used from dlls.
by Alexandre Julliard
30 Mar '10
30 Mar '10
Module: wine Branch: master Commit: ced7d134c75cb0337e65de9fc5efcb556fe60a0c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ced7d134c75cb0337e65de9fc…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 30 15:52:53 2010 +0200 wpp: Build with -fPIC to allow libwpp to be used from dlls. --- libs/wpp/Makefile.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/libs/wpp/Makefile.in b/libs/wpp/Makefile.in index 950712f..acd74b6 100644 --- a/libs/wpp/Makefile.in +++ b/libs/wpp/Makefile.in @@ -2,6 +2,7 @@ TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ +DLLFLAGS = @DLLFLAGS@ MODULE = libwpp.a C_SRCS = \
1
0
0
0
Alexandre Julliard : wpp: Get rid of wpp_parse_temp, temp file management is better left to callers.
by Alexandre Julliard
30 Mar '10
30 Mar '10
Module: wine Branch: master Commit: bd94f959388d6027dc72210a56f14d6400b74a11 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bd94f959388d6027dc72210a5…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 30 15:34:29 2010 +0200 wpp: Get rid of wpp_parse_temp, temp file management is better left to callers. --- include/wine/wpp.h | 1 - libs/wpp/wpp.c | 37 ------------------------------------- 2 files changed, 0 insertions(+), 38 deletions(-) diff --git a/include/wine/wpp.h b/include/wine/wpp.h index daba277..2d284f1 100644 --- a/include/wine/wpp.h +++ b/include/wine/wpp.h @@ -57,7 +57,6 @@ extern void wpp_set_pedantic( int on ); extern int wpp_add_include_path( const char *path ); extern char *wpp_find_include( const char *name, const char *parent_name ); extern int wpp_parse( const char *input, FILE *output ); -extern int wpp_parse_temp( const char *input, const char *output_base, char **output_name ); extern void wpp_set_callbacks( const struct wpp_callbacks *callbacks ); #endif /* __WINE_WPP_H */ diff --git a/libs/wpp/wpp.c b/libs/wpp/wpp.c index de4286f..582ad6f 100644 --- a/libs/wpp/wpp.c +++ b/libs/wpp/wpp.c @@ -203,43 +203,6 @@ int wpp_parse( const char *input, FILE *output ) } -/* parse into a temporary file */ -int wpp_parse_temp( const char *input, const char *output_base, char **output_name ) -{ - FILE *output; - int ret, fd; - char *temp_name; - - if (!output_base || !output_base[0]) output_base = "wpptmp"; - - temp_name = pp_xmalloc( strlen(output_base) + 8 ); - if(!temp_name) - return 1; - strcpy( temp_name, output_base ); - strcat( temp_name, ".XXXXXX" ); - - if((fd = mkstemps( temp_name, 0 )) == -1) - { - ppy_error("Could not generate a temp name from %s\n", temp_name); - free( temp_name ); - return 2; - } - - if (!(output = fdopen(fd, "wt"))) - { - ppy_error("Could not open fd %s for writing\n", temp_name); - close( fd ); - unlink( temp_name ); - free( temp_name ); - return 2; - } - - *output_name = temp_name; - ret = wpp_parse( input, output ); - fclose( output ); - return ret; -} - void wpp_set_callbacks( const struct wpp_callbacks *callbacks ) { wpp_callbacks = callbacks;
1
0
0
0
Alexandre Julliard : widl: Move temp file management from wpp to widl.
by Alexandre Julliard
30 Mar '10
30 Mar '10
Module: wine Branch: master Commit: 4d55592540c7cd1e8f6e0e449402930fbf6d38fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4d55592540c7cd1e8f6e0e449…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 30 15:34:12 2010 +0200 widl: Move temp file management from wpp to widl. --- tools/widl/parser.l | 18 ++++++++++++++---- tools/widl/widl.c | 17 ++++++++++++++++- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/tools/widl/parser.l b/tools/widl/parser.l index 5db9560..e7673d1 100644 --- a/tools/widl/parser.l +++ b/tools/widl/parser.l @@ -42,6 +42,7 @@ double [0-9]+\.[0-9]+([eE][+-]?[0-9]+)* %{ #include "config.h" +#include "wine/port.h" #include <stdio.h> #include <stdlib.h> @@ -442,10 +443,10 @@ struct imports { int do_import(char *fname) { FILE *f; - char *path; + char *path, *name; struct imports *import; int ptr = import_stack_ptr; - int ret; + int ret, fd; import = first_import; while (import && strcmp(import->name, fname)) @@ -460,7 +461,7 @@ int do_import(char *fname) /* don't search for a file name with a path in the include directories, * for compatibility with MIDL */ if (strchr( fname, '/' ) || strchr( fname, '\\' )) - path = strdup( fname ); + path = xstrdup( fname ); else if (!(path = wpp_find_include( fname, input_name ))) error_loc("Unable to open include file %s\n", fname); @@ -471,7 +472,16 @@ int do_import(char *fname) input_name = path; line_number = 1; - ret = wpp_parse_temp( path, NULL, &temp_name ); + name = xstrdup( "widl.XXXXXX" ); + if((fd = mkstemps( name, 0 )) == -1) + error("Could not generate a temp name from %s\n", name); + + temp_name = name; + if (!(f = fdopen(fd, "wt"))) + error("Could not open fd %s for writing\n", name); + + ret = wpp_parse( path, f ); + fclose( f ); if (ret) exit(1); if((f = fopen(temp_name, "r")) == NULL) diff --git a/tools/widl/widl.c b/tools/widl/widl.c index 8c76c24..8c0d0c9 100644 --- a/tools/widl/widl.c +++ b/tools/widl/widl.c @@ -701,7 +701,22 @@ int main(int argc,char *argv[]) if (!preprocess_only) { - ret = wpp_parse_temp( input_name, header_name, &temp_name ); + FILE *output; + int fd; + char *name = xmalloc( strlen(header_name) + 8 ); + + strcpy( name, header_name ); + strcat( name, ".XXXXXX" ); + + if ((fd = mkstemps( name, 0 )) == -1) + error("Could not generate a temp name from %s\n", name); + + temp_name = name; + if (!(output = fdopen(fd, "wt"))) + error("Could not open fd %s for writing\n", name); + + ret = wpp_parse( input_name, output ); + fclose( output ); } else {
1
0
0
0
Alexandre Julliard : wrc: Move temp file management from wpp directly into the load_file function.
by Alexandre Julliard
30 Mar '10
30 Mar '10
Module: wine Branch: master Commit: cb9be96437a82639e61b712721bf89ec6b62a2df URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cb9be96437a82639e61b71272…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 30 15:33:54 2010 +0200 wrc: Move temp file management from wpp directly into the load_file function. --- tools/wrc/wrc.c | 52 +++++++++++++++++++++++++++++++--------------------- 1 files changed, 31 insertions(+), 21 deletions(-) diff --git a/tools/wrc/wrc.c b/tools/wrc/wrc.c index 931af46..2919d38 100644 --- a/tools/wrc/wrc.c +++ b/tools/wrc/wrc.c @@ -256,40 +256,50 @@ static int load_file( const char *input_name, const char *output_name ) /* Run the preprocessor on the input */ if(!no_preprocess) { + FILE *output; + int ret, fd; + char *name; + /* * Preprocess the input to a temp-file, or stdout if * no output was given. */ - chat("Starting preprocess\n"); - - if (!preprocess_only) - { - ret = wpp_parse_temp( input_name, output_name, &temp_name ); - } - else if (output_name) + if (preprocess_only) { - FILE *output; + if (output_name) + { + if (!(output = fopen( output_name, "w" ))) + fatal_perror( "Could not open %s for writing", output_name ); + ret = wpp_parse( input_name, output ); + fclose( output ); + } + else ret = wpp_parse( input_name, stdout ); - if (!(output = fopen( output_name, "w" ))) - fatal_perror( "Could not open %s for writing", output_name ); - ret = wpp_parse( input_name, output ); - fclose( output ); + if (ret) return ret; + output_name = NULL; + exit(0); } - else + + if (output_name && output_name[0]) { - ret = wpp_parse( input_name, stdout ); + name = xmalloc( strlen(output_name) + 8 ); + strcpy( name, output_name ); + strcat( name, ".XXXXXX" ); } + else name = xstrdup( "wrc.XXXXXX" ); - if (ret) return ret; + if ((fd = mkstemps( name, 0 )) == -1) + error("Could not generate a temp name from %s\n", name); - if(preprocess_only) - { - output_name = NULL; - exit(0); - } + temp_name = name; + if (!(output = fdopen(fd, "wt"))) + error("Could not open fd %s for writing\n", name); - input_name = temp_name; + ret = wpp_parse( input_name, output ); + fclose( output ); + if (ret) return ret; + input_name = name; } /* Reset the language */
1
0
0
0
Jörg Höhle : winmm/tests: Use cpp' s __LINE__ to print meaningful line numbers.
by Alexandre Julliard
30 Mar '10
30 Mar '10
Module: wine Branch: master Commit: 74ad854e4101c96558f03f9bfc119b8dc500c351 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=74ad854e4101c96558f03f9bf…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Mon Mar 29 10:15:16 2010 +0200 winmm/tests: Use cpp's __LINE__ to print meaningful line numbers. --- dlls/winmm/tests/mci.c | 13 +++++++------ dlls/winmm/tests/midi.c | 21 +++++++++++---------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/dlls/winmm/tests/mci.c b/dlls/winmm/tests/mci.c index bbc21dd..0e7ce9d 100644 --- a/dlls/winmm/tests/mci.c +++ b/dlls/winmm/tests/mci.c @@ -136,7 +136,8 @@ static BOOL spurious_message(LPMSG msg) } /* A single ok() in each code path allows to prefix this with todo_wine */ -static void test_notification(HWND hwnd, const char* command, WPARAM type) +#define test_notification(hwnd, command, type) test_notification_dbg(hwnd, command, type, __LINE__) +static void test_notification_dbg(HWND hwnd, const char* command, WPARAM type, int line) { /* Use type 0 as meaning no message */ MSG msg; BOOL seen; @@ -145,17 +146,17 @@ static void test_notification(HWND hwnd, const char* command, WPARAM type) if(type && !seen) { /* We observe transient delayed notification, mostly on native. * Notification is not always present right when mciSend returns. */ - trace("Waiting for delayed notification from %s\n", command); + trace_(__FILE__,line)("Waiting for delayed notification from %s\n", command); MsgWaitForMultipleObjects(0, NULL, FALSE, 3000, QS_POSTMESSAGE); seen = PeekMessageA(&msg, hwnd, MM_MCINOTIFY, MM_MCINOTIFY, PM_REMOVE); } if(!seen) - ok(type==0, "Expect message %04lx from %s\n", type, command); + ok_(__FILE__,line)(type==0, "Expect message %04lx from %s\n", type, command); else if(msg.hwnd != hwnd) - ok(msg.hwnd == hwnd, "Didn't get the handle to our test window\n"); + ok_(__FILE__,line)(msg.hwnd == hwnd, "Didn't get the handle to our test window\n"); else if(msg.message != MM_MCINOTIFY) - ok(msg.message == MM_MCINOTIFY, "got %04x instead of MM_MCINOTIFY from command %s\n", msg.message, command); - else ok(msg.wParam == type, "got %04lx instead of MCI_NOTIFY_xyz %04lx from command %s\n", msg.wParam, type, command); + ok_(__FILE__,line)(msg.message == MM_MCINOTIFY, "got %04x instead of MM_MCINOTIFY from command %s\n", msg.message, command); + else ok_(__FILE__,line)(msg.wParam == type, "got %04lx instead of MCI_NOTIFY_xyz %04lx from command %s\n", msg.wParam, type, command); } static void test_openCloseWAVE(HWND hwnd) diff --git a/dlls/winmm/tests/midi.c b/dlls/winmm/tests/midi.c index e531d04..3abdb1d 100644 --- a/dlls/winmm/tests/midi.c +++ b/dlls/winmm/tests/midi.c @@ -61,7 +61,8 @@ static void CALLBACK callback_func(HWAVEOUT hwo, UINT uMsg, cbinst = dwInstance; /* MYCBINST, see midiOut/StreamOpen */ } -static void test_notification(HWND hwnd, const char* command, UINT m1, DWORD_PTR p2) +#define test_notification(hwnd, command, m1, p2) test_notification_dbg(hwnd, command, m1, p2, __LINE__) +static void test_notification_dbg(HWND hwnd, const char* command, UINT m1, DWORD_PTR p2, int line) { /* Use message type 0 as meaning no message */ MSG msg; if (hwnd) { @@ -74,29 +75,29 @@ static void test_notification(HWND hwnd, const char* command, UINT m1, DWORD_PTR * Perhaps the OS preempts the player thread after setting MHDR_DONE * or clearing MHDR_INQUEUE, before calling DriverCallback. */ DWORD rc; - trace("Waiting for delayed message %x from %s\n", m1, command); + trace_(__FILE__,line)("Waiting for delayed message %x from %s\n", m1, command); SetLastError(0xDEADBEEF); rc = MsgWaitForMultipleObjects(0, NULL, FALSE, 3000, QS_POSTMESSAGE); - ok(rc==WAIT_OBJECT_0, "Wait failed: %04x %d\n", rc, GetLastError()); + ok_(__FILE__,line)(rc==WAIT_OBJECT_0, "Wait failed: %04x %d\n", rc, GetLastError()); seen = PeekMessageA(&msg, hwnd, 0, 0, PM_REMOVE); } if (seen) { - trace("Message %x, wParam=%lx, lParam=%lx from %s\n", + trace_(__FILE__,line)("Message %x, wParam=%lx, lParam=%lx from %s\n", msg.message, msg.wParam, msg.lParam, command); - ok(msg.hwnd==hwnd, "Didn't get the handle to our test window\n"); - ok(msg.message==m1 && msg.lParam==p2, "bad message %x/%lx from %s, expect %x/%lx\n", msg.message, msg.lParam, command, m1, p2); + ok_(__FILE__,line)(msg.hwnd==hwnd, "Didn't get the handle to our test window\n"); + ok_(__FILE__,line)(msg.message==m1 && msg.lParam==p2, "bad message %x/%lx from %s, expect %x/%lx\n", msg.message, msg.lParam, command, m1, p2); } - else ok(m1==0, "Expect message %x from %s\n", m1, command); + else ok_(__FILE__,line)(m1==0, "Expect message %x from %s\n", m1, command); } else { /* FIXME: MOM_POSITIONCB and MOM_DONE are so close that a queue is needed. */ if (cbmsg) { - ok(cbmsg==m1 && cbval1==p2 && cbval2==0, "bad callback %x/%lx/%lx from %s, expect %x/%lx\n", cbmsg, cbval1, cbval2, command, m1, p2); + ok_(__FILE__,line)(cbmsg==m1 && cbval1==p2 && cbval2==0, "bad callback %x/%lx/%lx from %s, expect %x/%lx\n", cbmsg, cbval1, cbval2, command, m1, p2); cbmsg = 0; /* Mark as read */ cbval1 = cbval2 = WHATEVER; - ok(cbinst==MYCBINST, "callback dwInstance changed to %lx\n", cbinst); + ok_(__FILE__,line)(cbinst==MYCBINST, "callback dwInstance changed to %lx\n", cbinst); } - else ok(m1==0, "Expect callback %x from %s\n", m1, command); + else ok_(__FILE__,line)(m1==0, "Expect callback %x from %s\n", m1, command); } }
1
0
0
0
Henri Verbeet : wined3d: Get rid of destFormat and srcFormat in IWineD3DDeviceImpl_UpdateSurface().
by Alexandre Julliard
30 Mar '10
30 Mar '10
Module: wine Branch: master Commit: 72be7fe3a57e3431bedecc7d2212a28f6f33031a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=72be7fe3a57e3431bedecc7d2…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Mar 30 11:24:48 2010 +0200 wined3d: Get rid of destFormat and srcFormat in IWineD3DDeviceImpl_UpdateSurface(). --- dlls/wined3d/device.c | 42 ++++++++++++++++++++---------------------- 1 files changed, 20 insertions(+), 22 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 4f6e54e..0c67849 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5151,8 +5151,9 @@ static float WINAPI IWineD3DDeviceImpl_GetNPatchMode(IWineD3DDevice *iface) } static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, IWineD3DSurface *pSourceSurface, CONST RECT* pSourceRect, IWineD3DSurface *pDestinationSurface, CONST POINT* pDestPoint) { - const struct wined3d_format_desc *src_format_desc, *dst_format_desc; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; + const struct wined3d_format_desc *src_format; + const struct wined3d_format_desc *dst_format; /** TODO: remove casts to IWineD3DSurfaceImpl * NOTE: move code to surface to accomplish this ****************************************/ @@ -5160,7 +5161,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, IWineD3DSurfaceImpl *dst_impl = (IWineD3DSurfaceImpl *)pDestinationSurface; int srcWidth, srcHeight; unsigned int srcSurfaceWidth, srcSurfaceHeight; - WINED3DFORMAT destFormat, srcFormat; int destLeft, destTop; WINED3DPOOL srcPool, destPool; GLenum dummy; @@ -5178,18 +5178,19 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, srcSurfaceWidth = winedesc.width; srcSurfaceHeight = winedesc.height; srcPool = winedesc.pool; - srcFormat = winedesc.format; IWineD3DSurface_GetDesc(pDestinationSurface, &winedesc); destPool = winedesc.pool; - destFormat = winedesc.format; if(srcPool != WINED3DPOOL_SYSTEMMEM || destPool != WINED3DPOOL_DEFAULT){ WARN("source %p must be SYSTEMMEM and dest %p must be DEFAULT, returning WINED3DERR_INVALIDCALL\n", pSourceSurface, pDestinationSurface); return WINED3DERR_INVALIDCALL; } - if (srcFormat != destFormat) + src_format = pSrcSurface->resource.format_desc; + dst_format = dst_impl->resource.format_desc; + + if (src_format->format != dst_format->format) { WARN("Source and destination surfaces should have the same format.\n"); return WINED3DERR_INVALIDCALL; @@ -5218,9 +5219,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, surface_internal_preload(pDestinationSurface, SRGB_RGB); IWineD3DSurface_BindTexture(pDestinationSurface, FALSE); - src_format_desc = ((IWineD3DSurfaceImpl *)pSrcSurface)->resource.format_desc; - dst_format_desc = dst_impl->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; @@ -5232,26 +5230,26 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, ENTER_GL(); - if (dst_format_desc->Flags & WINED3DFMT_FLAG_COMPRESSED) + if (dst_format->Flags & WINED3DFMT_FLAG_COMPRESSED) { - UINT row_length = (srcWidth / src_format_desc->block_width) * src_format_desc->block_byte_count; - UINT row_count = srcHeight / src_format_desc->block_height; + UINT row_length = (srcWidth / src_format->block_width) * src_format->block_byte_count; + UINT row_count = srcHeight / src_format->block_height; UINT src_pitch = IWineD3DSurface_GetPitch(pSourceSurface); if (pSourceRect) { - data += (pSourceRect->top / src_format_desc->block_height) * src_pitch; - data += (pSourceRect->left / src_format_desc->block_width) * src_format_desc->block_byte_count; + data += (pSourceRect->top / src_format->block_height) * src_pitch; + data += (pSourceRect->left / src_format->block_width) * src_format->block_byte_count; } TRACE("glCompressedTexSubImage2DARB, target %#x, level %d, x %d, y %d, w %d, h %d, " "format %#x, image_size %#x, data %p.\n", dst_impl->texture_target, dst_impl->texture_level, - destLeft, destTop, srcWidth, srcHeight, dst_format_desc->glFormat, row_count * row_length, data); + destLeft, destTop, srcWidth, srcHeight, dst_format->glFormat, row_count * row_length, data); if (row_length == src_pitch) { GL_EXTCALL(glCompressedTexSubImage2DARB(dst_impl->texture_target, dst_impl->texture_level, - destLeft, destTop, srcWidth, srcHeight, dst_format_desc->glInternal, row_count * row_length, data)); + destLeft, destTop, srcWidth, srcHeight, dst_format->glInternal, row_count * row_length, data)); } else { @@ -5262,9 +5260,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, for (row = 0, y = destTop; row < row_count; ++row) { GL_EXTCALL(glCompressedTexSubImage2DARB(dst_impl->texture_target, dst_impl->texture_level, - destLeft, y, srcWidth, src_format_desc->block_height, - dst_format_desc->glInternal, row_length, data)); - y += src_format_desc->block_height; + destLeft, y, srcWidth, src_format->block_height, + dst_format->glInternal, row_length, data)); + y += src_format->block_height; data += src_pitch; } } @@ -5274,17 +5272,17 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, { if (pSourceRect) { - data += pSourceRect->top * srcSurfaceWidth * src_format_desc->byte_count; - data += pSourceRect->left * src_format_desc->byte_count; + data += pSourceRect->top * srcSurfaceWidth * src_format->byte_count; + data += pSourceRect->left * src_format->byte_count; } TRACE("glTexSubImage2D, target %#x, level %d, x %d, y %d, w %d, h %d, format %#x, type %#x, data %p.\n", dst_impl->texture_target, dst_impl->texture_level, destLeft, destTop, - srcWidth, srcHeight, dst_format_desc->glFormat, dst_format_desc->glType, data); + srcWidth, srcHeight, dst_format->glFormat, dst_format->glType, data); glPixelStorei(GL_UNPACK_ROW_LENGTH, srcSurfaceWidth); glTexSubImage2D(dst_impl->texture_target, dst_impl->texture_level, destLeft, destTop, - srcWidth, srcHeight, dst_format_desc->glFormat, dst_format_desc->glType, data); + srcWidth, srcHeight, dst_format->glFormat, dst_format->glType, data); glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); checkGLcall("glTexSubImage2D"); }
1
0
0
0
Henri Verbeet : wined3d: Calculate "offset" in the appropriate path in IWineD3DDeviceImpl_UpdateSurface().
by Alexandre Julliard
30 Mar '10
30 Mar '10
Module: wine Branch: master Commit: eced5fe8ec16c9bc502f293754774d1763eef004 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eced5fe8ec16c9bc502f29375…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Mar 30 11:24:47 2010 +0200 wined3d: Calculate "offset" in the appropriate path in IWineD3DDeviceImpl_UpdateSurface(). --- dlls/wined3d/device.c | 40 +++++++++++++++++----------------------- 1 files changed, 17 insertions(+), 23 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 09946c6..4f6e54e 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5161,14 +5161,14 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, int srcWidth, srcHeight; unsigned int srcSurfaceWidth, srcSurfaceHeight; WINED3DFORMAT destFormat, srcFormat; - int srcLeft, destLeft, destTop; + int destLeft, destTop; WINED3DPOOL srcPool, destPool; - int offset = 0; GLenum dummy; DWORD sampler; int bpp; CONVERT_TYPES convert = NO_CONVERSION; struct wined3d_context *context; + const unsigned char *data; WINED3DSURFACE_DESC winedesc; @@ -5224,34 +5224,16 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, /* 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; - srcLeft = pSourceRect ? pSourceRect->left : 0; destLeft = pDestPoint ? pDestPoint->x : 0; destTop = pDestPoint ? pDestPoint->y : 0; - if(srcWidth != srcSurfaceWidth || srcLeft ){ - offset += srcLeft * src_format_desc->byte_count; - /* TODO: do we ever get 3bpp?, would a shift and an add be quicker than a mul (well maybe a cycle or two) */ - } - - if(pSourceRect != NULL && pSourceRect->top != 0){ - offset += pSourceRect->top * srcSurfaceWidth * src_format_desc->byte_count; - } - TRACE("(%p) glTexSubImage2D, level %d, left %d, top %d, width %d, height %d, fmt %#x, type %#x, memory %p+%#x\n", - This, dst_impl->texture_level, destLeft, destTop, srcWidth, srcHeight, dst_format_desc->glFormat, - dst_format_desc->glType, IWineD3DSurface_GetData(pSourceSurface), offset); - - /* Sanity check */ - if (IWineD3DSurface_GetData(pSourceSurface) == NULL) { - - /* need to lock the surface to get the data */ - FIXME("Surfaces has no allocated memory, but should be an in memory only surface\n"); - } + data = IWineD3DSurface_GetData(pSourceSurface); + if (!data) ERR("Source surface has no allocated memory, but should be a sysmem surface.\n"); ENTER_GL(); if (dst_format_desc->Flags & WINED3DFMT_FLAG_COMPRESSED) { - const unsigned char *data = ((const unsigned char *)IWineD3DSurface_GetData(pSourceSurface)); UINT row_length = (srcWidth / src_format_desc->block_width) * src_format_desc->block_byte_count; UINT row_count = srcHeight / src_format_desc->block_height; UINT src_pitch = IWineD3DSurface_GetPitch(pSourceSurface); @@ -5262,6 +5244,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, data += (pSourceRect->left / src_format_desc->block_width) * src_format_desc->block_byte_count; } + TRACE("glCompressedTexSubImage2DARB, target %#x, level %d, x %d, y %d, w %d, h %d, " + "format %#x, image_size %#x, data %p.\n", dst_impl->texture_target, dst_impl->texture_level, + destLeft, destTop, srcWidth, srcHeight, dst_format_desc->glFormat, row_count * row_length, data); + if (row_length == src_pitch) { GL_EXTCALL(glCompressedTexSubImage2DARB(dst_impl->texture_target, dst_impl->texture_level, @@ -5286,7 +5272,15 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, } else { - const unsigned char *data = ((const unsigned char *)IWineD3DSurface_GetData(pSourceSurface)) + offset; + if (pSourceRect) + { + data += pSourceRect->top * srcSurfaceWidth * src_format_desc->byte_count; + data += pSourceRect->left * src_format_desc->byte_count; + } + + TRACE("glTexSubImage2D, target %#x, level %d, x %d, y %d, w %d, h %d, format %#x, type %#x, data %p.\n", + dst_impl->texture_target, dst_impl->texture_level, destLeft, destTop, + srcWidth, srcHeight, dst_format_desc->glFormat, dst_format_desc->glType, data); glPixelStorei(GL_UNPACK_ROW_LENGTH, srcSurfaceWidth); glTexSubImage2D(dst_impl->texture_target, dst_impl->texture_level, destLeft, destTop,
1
0
0
0
Henri Verbeet : wined3d: Add more general support for partial updates of compressed surfaces to IWineD3DDeviceImpl_UpdateSurface ().
by Alexandre Julliard
30 Mar '10
30 Mar '10
Module: wine Branch: master Commit: bb94bc382329f4c9950aad1aa6f32fe0514f1dd9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bb94bc382329f4c9950aad1aa…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Mar 30 11:24:46 2010 +0200 wined3d: Add more general support for partial updates of compressed surfaces to IWineD3DDeviceImpl_UpdateSurface(). --- dlls/wined3d/device.c | 48 ++++++++++++++++++------------------------------ 1 files changed, 18 insertions(+), 30 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index caa9568..09946c6 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5159,13 +5159,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, IWineD3DSurfaceImpl *pSrcSurface = (IWineD3DSurfaceImpl *)pSourceSurface; IWineD3DSurfaceImpl *dst_impl = (IWineD3DSurfaceImpl *)pDestinationSurface; int srcWidth, srcHeight; - unsigned int srcSurfaceWidth, srcSurfaceHeight, destSurfaceWidth, destSurfaceHeight; + unsigned int srcSurfaceWidth, srcSurfaceHeight; WINED3DFORMAT destFormat, srcFormat; - UINT destSize; int srcLeft, destLeft, destTop; WINED3DPOOL srcPool, destPool; 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 */ GLenum dummy; DWORD sampler; int bpp; @@ -5183,11 +5181,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, srcFormat = winedesc.format; IWineD3DSurface_GetDesc(pDestinationSurface, &winedesc); - destSurfaceWidth = winedesc.width; - destSurfaceHeight = winedesc.height; destPool = winedesc.pool; destFormat = winedesc.format; - destSize = winedesc.size; if(srcPool != WINED3DPOOL_SYSTEMMEM || destPool != WINED3DPOOL_DEFAULT){ WARN("source %p must be SYSTEMMEM and dest %p must be DEFAULT, returning WINED3DERR_INVALIDCALL\n", pSourceSurface, pDestinationSurface); @@ -5233,15 +5228,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, destLeft = pDestPoint ? pDestPoint->x : 0; destTop = pDestPoint ? pDestPoint->y : 0; - - /* This function doesn't support compressed textures - the pitch is just bytesPerPixel * width */ if(srcWidth != srcSurfaceWidth || srcLeft ){ - rowoffset = srcSurfaceWidth * src_format_desc->byte_count; offset += srcLeft * src_format_desc->byte_count; /* TODO: do we ever get 3bpp?, would a shift and an add be quicker than a mul (well maybe a cycle or two) */ } - /* TODO DXT formats */ if(pSourceRect != NULL && pSourceRect->top != 0){ offset += pSourceRect->top * srcSurfaceWidth * src_format_desc->byte_count; @@ -5262,19 +5252,28 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, if (dst_format_desc->Flags & WINED3DFMT_FLAG_COMPRESSED) { const unsigned char *data = ((const unsigned char *)IWineD3DSurface_GetData(pSourceSurface)); + UINT row_length = (srcWidth / src_format_desc->block_width) * src_format_desc->block_byte_count; + UINT row_count = srcHeight / src_format_desc->block_height; + UINT src_pitch = IWineD3DSurface_GetPitch(pSourceSurface); - if (rowoffset) + if (pSourceRect) { - UINT row_length = (srcWidth / src_format_desc->block_width) * src_format_desc->block_byte_count; - UINT row_count = srcHeight / src_format_desc->block_height; - UINT src_pitch = IWineD3DSurface_GetPitch(pSourceSurface); - UINT y = destTop; - UINT row; - data += (pSourceRect->top / src_format_desc->block_height) * src_pitch; data += (pSourceRect->left / src_format_desc->block_width) * src_format_desc->block_byte_count; + } + + if (row_length == src_pitch) + { + GL_EXTCALL(glCompressedTexSubImage2DARB(dst_impl->texture_target, dst_impl->texture_level, + destLeft, destTop, srcWidth, srcHeight, dst_format_desc->glInternal, row_count * row_length, data)); + } + else + { + UINT row, y; - for (row = 0; row < row_count; ++row) + /* glCompressedTexSubImage2DARB() ignores pixel store state, so we + * can't use the unpack row length like below. */ + for (row = 0, y = destTop; row < row_count; ++row) { GL_EXTCALL(glCompressedTexSubImage2DARB(dst_impl->texture_target, dst_impl->texture_level, destLeft, y, srcWidth, src_format_desc->block_height, @@ -5283,17 +5282,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, data += src_pitch; } } - else - { - if (destSurfaceHeight != srcHeight || destSurfaceWidth != srcWidth) - { - /* FIXME: The easy way to do this is to lock the destination, and copy the bits across. */ - FIXME("Updating part of a compressed texture is not supported.\n"); - } - - GL_EXTCALL(glCompressedTexImage2DARB(dst_impl->texture_target, dst_impl->texture_level, - dst_format_desc->glInternal, srcWidth, srcHeight, 0, destSize, data)); - } checkGLcall("glCompressedTexSubImage2DARB"); } else
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
92
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Results per page:
10
25
50
100
200