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 2014
----- 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
500 discussions
Start a n
N
ew thread
Dmitry Timoshkov : widl: Pass type attributes from write_array_tfs to write_pointer_description.
by Alexandre Julliard
02 Apr '14
02 Apr '14
Module: wine Branch: master Commit: eb54b5b4dffd8f170a75d67b88de56c1a0678eb9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eb54b5b4dffd8f170a75d67b8…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Apr 2 18:37:27 2014 +0900 widl: Pass type attributes from write_array_tfs to write_pointer_description. This allows to differentiate strings and write appropriate rpc type (FC_C_C[W]STRING instead of FC_[W]CHAR). --- tools/widl/typegen.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 37d18f5..889d8c5 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -2728,7 +2728,7 @@ static int write_varying_array_pointer_descriptions( return pointer_count; } -static void write_pointer_description(FILE *file, type_t *type, +static void write_pointer_description(FILE *file, const attr_list_t *attrs, type_t *type, unsigned int *typestring_offset) { unsigned int offset_in_buffer; @@ -2757,7 +2757,7 @@ static void write_pointer_description(FILE *file, type_t *type, if (is_conformant_array(type) && (type_array_is_decl_as_ptr(type) || !current_structure)) write_conformant_array_pointer_descriptions( - file, NULL, type, 0, typestring_offset); + file, attrs, type, 0, typestring_offset); else if (type_get_type(type) == TYPE_STRUCT && get_struct_fc(type) == RPC_FC_CPSTRUCT) { @@ -2962,7 +2962,7 @@ static unsigned int write_array_tfs(FILE *file, const attr_list_t *attrs, type_t print_file(file, 2, "0x%x,\t/* FC_PP */\n", RPC_FC_PP); print_file(file, 2, "0x%x,\t/* FC_PAD */\n", RPC_FC_PAD); *typestring_offset += 2; - write_pointer_description(file, type, typestring_offset); + write_pointer_description(file, is_string_type(attrs, type) ? attrs : NULL, type, typestring_offset); print_file(file, 2, "0x%x,\t/* FC_END */\n", RPC_FC_END); *typestring_offset += 1; } @@ -3149,7 +3149,7 @@ static unsigned int write_struct_tfs(FILE *file, type_t *type, print_file(file, 2, "0x%x,\t/* FC_PP */\n", RPC_FC_PP); print_file(file, 2, "0x%x,\t/* FC_PAD */\n", RPC_FC_PAD); *tfsoff += 2; - write_pointer_description(file, type, tfsoff); + write_pointer_description(file, NULL, type, tfsoff); print_file(file, 2, "0x%x,\t/* FC_END */\n", RPC_FC_END); *tfsoff += 1; }
1
0
0
0
Alexandre Julliard : makedep: Add helper functions to get and set variables in string arrays.
by Alexandre Julliard
02 Apr '14
02 Apr '14
Module: wine Branch: master Commit: 43fd82c61215ef1e29d995749aa28a38acfa4596 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=43fd82c61215ef1e29d995749…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Apr 2 14:10:45 2014 +0200 makedep: Add helper functions to get and set variables in string arrays. --- tools/makedep.c | 63 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 22 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index 9ec8aef..73bf3f0 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -345,6 +345,42 @@ static void strarray_add_uniq( struct strarray *array, const char *str ) /******************************************************************* + * strarray_get_value + * + * Find a value in a name/value pair string array. + */ +static char *strarray_get_value( const struct strarray *array, const char *name ) +{ + unsigned int i; + + for (i = 0; i < array->count; i += 2) + if (!strcmp( array->str[i], name )) return xstrdup( array->str[i + 1] ); + return NULL; +} + + +/******************************************************************* + * strarray_set_value + * + * Define a value in a name/value pair string array. + */ +static void strarray_set_value( struct strarray *array, const char *name, const char *value ) +{ + unsigned int i; + + /* redefining a variable replaces the previous value */ + for (i = 0; i < array->count; i += 2) + { + if (strcmp( array->str[i], name )) continue; + array->str[i + 1] = value; + return; + } + strarray_add( array, name ); + strarray_add( array, value ); +} + + +/******************************************************************* * output_filename */ static void output_filename( const char *name ) @@ -1226,19 +1262,11 @@ static struct incl_file *add_src_file( const char *name ) */ static char *get_make_variable( const char *name ) { - unsigned int i; - - for (i = 0; i < cmdline_vars.count; i += 2) - if (!strcmp( cmdline_vars.str[i], name )) - return xstrdup( cmdline_vars.str[i + 1] ); - - for (i = 0; i < make_vars.count; i += 2) - if (!strcmp( make_vars.str[i], name )) - return xstrdup( make_vars.str[i + 1] ); + char *ret; - for (i = 0; i < top_make_vars.count; i += 2) - if (!strcmp( top_make_vars.str[i], name )) - return xstrdup( top_make_vars.str[i + 1] ); + if ((ret = strarray_get_value( &cmdline_vars, name ))) return ret; + if ((ret = strarray_get_value( &make_vars, name ))) return ret; + if ((ret = strarray_get_value( &top_make_vars, name ))) return ret; return NULL; } @@ -1312,7 +1340,6 @@ static struct strarray get_expanded_make_var_array( const char *name ) */ static int set_make_variable( struct strarray *array, const char *assignment ) { - unsigned int i; char *p, *name; p = name = xstrdup( assignment ); @@ -1327,15 +1354,7 @@ static int set_make_variable( struct strarray *array, const char *assignment ) *p++ = 0; while (isspace(*p)) p++; - /* redefining a variable replaces the previous value */ - for (i = 0; i < array->count; i += 2) - { - if (strcmp( array->str[i], name )) continue; - array->str[i + 1] = p; - return 1; - } - strarray_add( array, name ); - strarray_add( array, p ); + strarray_set_value( array, name, p ); return 1; }
1
0
0
0
Alexandre Julliard : makedep: Allow the top-level makefile to set default values for make variables.
by Alexandre Julliard
02 Apr '14
02 Apr '14
Module: wine Branch: master Commit: 83fe4ffb36cf43b225b9f24c1c6c711e57004a3a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=83fe4ffb36cf43b225b9f24c1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Apr 2 14:10:45 2014 +0200 makedep: Allow the top-level makefile to set default values for make variables. --- tools/makedep.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index 8c6758c..9ec8aef 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -104,6 +104,7 @@ static struct strarray cpp_flags; static struct strarray unwind_flags; static struct strarray libs; static struct strarray cmdline_vars; +static struct strarray top_make_vars; static const char *root_src_dir; static const char *tools_dir; static const char *tools_ext; @@ -1234,6 +1235,10 @@ static char *get_make_variable( const char *name ) for (i = 0; i < make_vars.count; i += 2) if (!strcmp( make_vars.str[i], name )) return xstrdup( make_vars.str[i + 1] ); + + for (i = 0; i < top_make_vars.count; i += 2) + if (!strcmp( top_make_vars.str[i], name )) + return xstrdup( top_make_vars.str[i + 1] ); return NULL; } @@ -1338,12 +1343,12 @@ static int set_make_variable( struct strarray *array, const char *assignment ) /******************************************************************* * parse_makefile */ -static void parse_makefile( const char *name, const char *separator ) +static void parse_makefile( const char *name, const char *separator, struct strarray *vars ) { char *buffer; FILE *file; - make_vars = empty_strarray; + *vars = empty_strarray; input_file_name = name; if (!(file = fopen( input_file_name, "r" ))) fatal_perror( "open" ); @@ -1354,7 +1359,7 @@ static void parse_makefile( const char *name, const char *separator ) if (*buffer == '\t') continue; /* command */ while (isspace( *buffer )) buffer++; if (*buffer == '#') continue; /* comment */ - set_make_variable( &make_vars, buffer ); + set_make_variable( vars, buffer ); } fclose( file ); input_file_name = NULL; @@ -2316,7 +2321,7 @@ static void update_makefile( const char *path ) base_dir = path; if (!strcmp( base_dir, "." )) base_dir = NULL; output_file_name = base_dir_path( makefile_name ); - parse_makefile( output_file_name, Separator ); + parse_makefile( output_file_name, Separator, &make_vars ); src_dir = get_expanded_make_variable( "srcdir" ); top_src_dir = get_expanded_make_variable( "top_srcdir" ); @@ -2476,7 +2481,7 @@ int main( int argc, char *argv[] ) signal( SIGHUP, exit_on_signal ); #endif - parse_makefile( makefile_name, "# End of common header" ); + parse_makefile( makefile_name, "# End of common header", &top_make_vars ); linguas = get_expanded_make_var_array( "LINGUAS" ); target_flags = get_expanded_make_var_array( "TARGETFLAGS" );
1
0
0
0
Alexandre Julliard : makedep: Load some variables from the top-level makefile.
by Alexandre Julliard
02 Apr '14
02 Apr '14
Module: wine Branch: master Commit: 39173131544ec83214313e7057dbc4d245459937 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=39173131544ec83214313e705…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Apr 2 14:09:42 2014 +0200 makedep: Load some variables from the top-level makefile. --- tools/makedep.c | 172 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 98 insertions(+), 74 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=39173131544ec83214313…
1
0
0
0
Alexandre Julliard : makedep: Add phony install targets for fonts also for the ttf case.
by Alexandre Julliard
02 Apr '14
02 Apr '14
Module: wine Branch: master Commit: 6bfd2e9a75bf562996111d631bc1712b3e5dc9dd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6bfd2e9a75bf562996111d631…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Apr 2 10:58:30 2014 +0200 makedep: Add phony install targets for fonts also for the ttf case. --- tools/makedep.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index d878869..3be431a 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -1663,6 +1663,7 @@ static struct strarray output_sources(void) output( "%s: %s\n", ttf_file, source->filename ); output( "\t%s -script %s %s $@\n", fontforge, top_dir_path( "fonts/genttf.ff" ), source->filename ); + if (!(source->flags & FLAG_SFD_FONTS)) output( "all: %s\n", ttf_file ); } if (source->flags & FLAG_INSTALL) { @@ -1687,13 +1688,14 @@ static struct strarray output_sources(void) output( "\t$(INSTALL_DATA) %s $(DESTDIR)$(fontdir)/%s\n", font, font ); output( "uninstall::\n" ); output( "\t$(RM) $(DESTDIR)$(fontdir)/%s\n", font ); - strarray_add_uniq( &phony_targets, "install" ); - strarray_add_uniq( &phony_targets, "install-lib" ); - strarray_add_uniq( &phony_targets, "uninstall" ); } } - else output( "all: %s\n", ttf_file ); - + if (source->flags & (FLAG_INSTALL | FLAG_SFD_FONTS)) + { + strarray_add_uniq( &phony_targets, "install" ); + strarray_add_uniq( &phony_targets, "install-lib" ); + strarray_add_uniq( &phony_targets, "uninstall" ); + } continue; /* no dependencies */ } else if (!strcmp( ext, "svg" )) /* svg file */
1
0
0
0
Henri Verbeet : d3d9/tests: Use a separate device for loop_index_test().
by Alexandre Julliard
02 Apr '14
02 Apr '14
Module: wine Branch: master Commit: f350774c777ee5f9b6acfbc8bd96bf278ad9a41e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f350774c777ee5f9b6acfbc8b…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Apr 2 09:11:14 2014 +0200 d3d9/tests: Use a separate device for loop_index_test(). --- dlls/d3d9/tests/visual.c | 63 +++++++++++++++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 17 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 562e3f0..6c257a3 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -11755,8 +11755,18 @@ done: DestroyWindow(window); } -static void loop_index_test(IDirect3DDevice9 *device) +static void loop_index_test(void) { + IDirect3DVertexShader9 *shader; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + float values[4]; + ULONG refcount; + D3DCAPS9 caps; + DWORD color; + HWND window; + HRESULT hr; + static const DWORD shader_code[] = { 0xfffe0200, /* vs_2_0 */ @@ -11769,19 +11779,35 @@ static void loop_index_test(IDirect3DDevice9 *device) 0x02000001, 0xd00f0000, 0x80e40000, /* mov oD0, r0 */ 0x0000ffff /* END */ }; - IDirect3DVertexShader9 *shader; - HRESULT hr; - DWORD color; - const float quad[] = { - -1.0, -1.0, 0.1, - 1.0, -1.0, 0.1, - -1.0, 1.0, 0.1, - 1.0, 1.0, 0.1 + static const float quad[] = + { + -1.0f, -1.0f, 0.1f, + -1.0f, 1.0f, 0.1f, + 1.0f, -1.0f, 0.1f, + 1.0f, 1.0f, 0.1f, }; - const float zero[4] = {0, 0, 0, 0}; - const float one[4] = {1, 1, 1, 1}; - int i0[4] = {2, 10, -3, 0}; - float values[4]; + static const float zero[4] = {0.0f, 0.0f, 0.0f, 0.0f}; + static const float one[4] = {1.0f, 1.0f, 1.0f, 1.0f}; + static const int i0[4] = {2, 10, -3, 0}; + + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + if (caps.VertexShaderVersion < D3DVS_VERSION(2, 0)) + { + skip("No vs_2_0 support, skipping tests.\n"); + IDirect3DDevice9_Release(device); + goto done; + } hr = IDirect3DDevice9_CreateVertexShader(device, shader_code, &shader); ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader failed with %08x\n", hr); @@ -11789,7 +11815,7 @@ static void loop_index_test(IDirect3DDevice9 *device) ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader failed with %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %08x\n", hr); - hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x00ff0000, 0.0, 0); + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0x00ff0000, 1.0f, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_SetVertexShaderConstantF(device, 0, zero, 1); @@ -11851,9 +11877,12 @@ static void loop_index_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); - hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader failed with %08x\n", hr); IDirect3DVertexShader9_Release(shader); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void sgn_test(void) @@ -16295,13 +16324,13 @@ START_TEST(visual) if (caps.VertexShaderVersion >= D3DVS_VERSION(2, 0)) { test_mova(device_ptr); - loop_index_test(device_ptr); } else skip("No vs_2_0 support\n"); cleanup_device(device_ptr); device_ptr = NULL; + loop_index_test(); sincos_test(); sgn_test(); clip_planes_test();
1
0
0
0
Henri Verbeet : d3d9/tests: Use a separate device for sincos_test().
by Alexandre Julliard
02 Apr '14
02 Apr '14
Module: wine Branch: master Commit: 47786eb64a4f53d6acb825227c80d2f284a63bcf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=47786eb64a4f53d6acb825227…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Apr 2 09:11:13 2014 +0200 d3d9/tests: Use a separate device for sincos_test(). --- dlls/d3d9/tests/visual.c | 49 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index c34a7fa..562e3f0 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -11648,8 +11648,18 @@ static void alphatest_test(IDirect3DDevice9 *device) { ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed with 0x%08x\n", hr); } -static void sincos_test(IDirect3DDevice9 *device) +static void sincos_test(void) { + IDirect3DVertexShader9 *sin_shader, *cos_shader; + IDirect3DDevice9 *device; + struct vec3 data[1280]; + IDirect3D9 *d3d; + unsigned int i; + ULONG refcount; + D3DCAPS9 caps; + HWND window; + HRESULT hr; + static const DWORD sin_shader_code[] = { 0xfffe0200, /* vs_2_0 */ @@ -11674,14 +11684,27 @@ static void sincos_test(IDirect3DDevice9 *device) 0x02000001, 0xd00f0000, 0xa0a90002, /* mov oD0, c2.yzzz */ 0x0000ffff /* end */ }; - IDirect3DVertexShader9 *sin_shader, *cos_shader; - HRESULT hr; - struct { - float x, y, z; - } data[1280]; - unsigned int i; - float sincosc1[4] = {D3DSINCOSCONST1}; - float sincosc2[4] = {D3DSINCOSCONST2}; + static const float sincosc1[4] = {D3DSINCOSCONST1}; + static const float sincosc2[4] = {D3DSINCOSCONST2}; + + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + if (caps.VertexShaderVersion < D3DVS_VERSION(2, 0)) + { + skip("No vs_2_0 support, skipping tests.\n"); + IDirect3DDevice9_Release(device); + goto done; + } hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0x00000000, 1.0f, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with 0x%08x\n", hr); @@ -11723,9 +11746,13 @@ static void sincos_test(IDirect3DDevice9 *device) ok(SUCCEEDED(hr), "IDirect3DDevice9_Present returned %#x.\n", hr); /* TODO: Find a way to properly validate the lines. Precicion issues make this a kinda nasty task */ - IDirect3DDevice9_SetVertexShader(device, NULL); IDirect3DVertexShader9_Release(sin_shader); IDirect3DVertexShader9_Release(cos_shader); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void loop_index_test(IDirect3DDevice9 *device) @@ -16269,13 +16296,13 @@ START_TEST(visual) { test_mova(device_ptr); loop_index_test(device_ptr); - sincos_test(device_ptr); } else skip("No vs_2_0 support\n"); cleanup_device(device_ptr); device_ptr = NULL; + sincos_test(); sgn_test(); clip_planes_test(); test_vshader_input();
1
0
0
0
Henri Verbeet : d3d9/tests: Use a separate device for sgn_test().
by Alexandre Julliard
02 Apr '14
02 Apr '14
Module: wine Branch: master Commit: 94e337df19c0f17078ee6c1fb3b57f8625deaa43 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=94e337df19c0f17078ee6c1fb…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Apr 2 09:11:12 2014 +0200 d3d9/tests: Use a separate device for sgn_test(). --- dlls/d3d9/tests/visual.c | 55 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 13 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index e86a117..c34a7fa 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -11829,8 +11829,17 @@ static void loop_index_test(IDirect3DDevice9 *device) IDirect3DVertexShader9_Release(shader); } -static void sgn_test(IDirect3DDevice9 *device) +static void sgn_test(void) { + IDirect3DVertexShader9 *shader; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + ULONG refcount; + D3DCAPS9 caps; + DWORD color; + HWND window; + HRESULT hr; + static const DWORD shader_code[] = { 0xfffe0200, /* vs_2_0 */ @@ -11842,23 +11851,40 @@ static void sgn_test(IDirect3DDevice9 *device) 0x03000002, 0xd00f0000, 0x80e40000, 0xa0e40001, /* add oD0, r0, c1 */ 0x0000ffff /* end */ }; - IDirect3DVertexShader9 *shader; - HRESULT hr; - DWORD color; - const float quad[] = { - -1.0, -1.0, 0.1, - 1.0, -1.0, 0.1, - -1.0, 1.0, 0.1, - 1.0, 1.0, 0.1 + static const float quad[] = + { + -1.0f, -1.0f, 0.1f, + -1.0f, 1.0f, 0.1f, + 1.0f, -1.0f, 0.1f, + 1.0f, 1.0f, 0.1f, }; + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + if (caps.VertexShaderVersion < D3DVS_VERSION(2, 0)) + { + skip("No vs_2_0 support, skipping tests.\n"); + IDirect3DDevice9_Release(device); + goto done; + } + hr = IDirect3DDevice9_CreateVertexShader(device, shader_code, &shader); ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader failed with %08x\n", hr); hr = IDirect3DDevice9_SetVertexShader(device, shader); ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader failed with %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %08x\n", hr); - hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x00ff0000, 0.0, 0); + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0x00ff0000, 1.0f, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); @@ -11876,9 +11902,12 @@ static void sgn_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); - hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader failed with %08x\n", hr); IDirect3DVertexShader9_Release(shader); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void viewport_test(IDirect3DDevice9 *device) { @@ -16241,13 +16270,13 @@ START_TEST(visual) test_mova(device_ptr); loop_index_test(device_ptr); sincos_test(device_ptr); - sgn_test(device_ptr); } else skip("No vs_2_0 support\n"); cleanup_device(device_ptr); device_ptr = NULL; + sgn_test(); clip_planes_test(); test_vshader_input(); test_vshader_float16();
1
0
0
0
Henri Verbeet : d3d9/tests: Use a separate device for clip_planes_test().
by Alexandre Julliard
02 Apr '14
02 Apr '14
Module: wine Branch: master Commit: f237f863972b4ec034d7d2c6338f010656ba742b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f237f863972b4ec034d7d2c63…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Apr 2 09:11:11 2014 +0200 d3d9/tests: Use a separate device for clip_planes_test(). --- dlls/d3d9/tests/visual.c | 55 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 16 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index e73cca5..e86a117 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -13214,18 +13214,18 @@ done: static void clip_planes(IDirect3DDevice9 *device, const char *test_name) { - const struct vertex quad1[] = + static const struct vertex quad1[] = { {-1.0f, -1.0f, 0.0f, 0xfff9e814}, - { 1.0f, -1.0f, 0.0f, 0xfff9e814}, {-1.0f, 1.0f, 0.0f, 0xfff9e814}, + { 1.0f, -1.0f, 0.0f, 0xfff9e814}, { 1.0f, 1.0f, 0.0f, 0xfff9e814}, }; - const struct vertex quad2[] = + static const struct vertex quad2[] = { {-1.0f, -1.0f, 0.0f, 0xff002b7f}, - { 1.0f, -1.0f, 0.0f, 0xff002b7f}, {-1.0f, 1.0f, 0.0f, 0xff002b7f}, + { 1.0f, -1.0f, 0.0f, 0xff002b7f}, { 1.0f, 1.0f, 0.0f, 0xff002b7f}, }; D3DCOLOR color; @@ -13264,10 +13264,19 @@ static void clip_planes(IDirect3DDevice9 *device, const char *test_name) ok(color_match(color, 0x00f9e814, 1), "%s test: color 0x%08x.\n", test_name, color); } -static void clip_planes_test(IDirect3DDevice9 *device) +static void clip_planes_test(void) { - const float plane0[4] = {0.0f, 1.0f, 0.0f, 0.5f / 480.0f}; /* a quarter-pixel offset */ + IDirect3DSurface9 *offscreen_surface, *original_rt; + IDirect3DTexture9 *offscreen = NULL; + IDirect3DVertexShader9 *shader; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + ULONG refcount; + D3DCAPS9 caps; + HWND window; + HRESULT hr; + static const float plane0[4] = {0.0f, 1.0f, 0.0f, 0.5f / 480.0f}; /* a quarter-pixel offset */ static const DWORD shader_code[] = { 0xfffe0200, /* vs_2_0 */ @@ -13277,11 +13286,25 @@ static void clip_planes_test(IDirect3DDevice9 *device) 0x02000001, 0xd00f0000, 0x90e40001, /* mov oD0, v1 */ 0x0000ffff /* end */ }; - IDirect3DVertexShader9 *shader; - IDirect3DTexture9 *offscreen = NULL; - IDirect3DSurface9 *offscreen_surface, *original_rt; - HRESULT hr; + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + if (caps.VertexShaderVersion < D3DVS_VERSION(2, 0)) + { + skip("No vs_2_0 support, skipping tests.\n"); + IDirect3DDevice9_Release(device); + goto done; + } hr = IDirect3DDevice9_GetRenderTarget(device, 0, &original_rt); ok(SUCCEEDED(hr), "GetRenderTarget failed, hr %#x.\n", hr); @@ -13334,15 +13357,15 @@ static void clip_planes_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(SUCCEEDED(hr), "Present failed (0x%08x)\n", hr); - IDirect3DDevice9_SetRenderState(device, D3DRS_CLIPPLANEENABLE, 0); - hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader failed, hr=%08x\n", hr); IDirect3DVertexShader9_Release(shader); - hr = IDirect3DDevice9_SetRenderTarget(device, 0, original_rt); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed, hr=%08x\n", hr); IDirect3DSurface9_Release(original_rt); IDirect3DSurface9_Release(offscreen_surface); IDirect3DTexture9_Release(offscreen); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void fp_special_test(void) @@ -16219,13 +16242,13 @@ START_TEST(visual) loop_index_test(device_ptr); sincos_test(device_ptr); sgn_test(device_ptr); - clip_planes_test(device_ptr); } else skip("No vs_2_0 support\n"); cleanup_device(device_ptr); device_ptr = NULL; + clip_planes_test(); test_vshader_input(); test_vshader_float16(); stream_test();
1
0
0
0
Henri Verbeet : d3d9/tests: Use a separate device for test_vshader_input() .
by Alexandre Julliard
02 Apr '14
02 Apr '14
Module: wine Branch: master Commit: 779b8b53e874a71da6055a77d3e60771cbb76c0c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=779b8b53e874a71da6055a77d…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Apr 2 09:11:10 2014 +0200 d3d9/tests: Use a separate device for test_vshader_input(). --- dlls/d3d9/tests/visual.c | 220 +++++++++++++++++++++++++++------------------- 1 file changed, 130 insertions(+), 90 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=779b8b53e874a71da6055…
1
0
0
0
← Newer
1
...
45
46
47
48
49
50
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
Results per page:
10
25
50
100
200