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
December 2019
----- 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
1 participants
635 discussions
Start a n
N
ew thread
Jacek Caban : rpcrt4: Fix implicit in attribute handling in write_param_fs.
by Alexandre Julliard
18 Dec '19
18 Dec '19
Module: wine Branch: master Commit: 1aaf870039dfb8419ae060d8c67240df1366b953 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1aaf870039dfb8419ae060d8…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Dec 18 20:56:58 2019 +0100 rpcrt4: Fix implicit in attribute handling in write_param_fs. Fixes regression caused by typelib marshaling rewrite. Spotted by Kevin Puetz. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/oleaut32/tests/tmarshal.c | 13 +++++++++++++ dlls/oleaut32/tests/tmarshal.idl | 4 ++++ dlls/rpcrt4/ndr_typelib.c | 6 ++++-- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c index ac0969bdfa..8710645c61 100644 --- a/dlls/oleaut32/tests/tmarshal.c +++ b/dlls/oleaut32/tests/tmarshal.c @@ -1571,6 +1571,14 @@ static HRESULT WINAPI Widget_Coclass_ptr(IWidget *iface, Coclass1 **in, Coclass1 return S_OK; } +static HRESULT WINAPI Widget_no_in_out(IWidget *iface, BSTR str, int i) +{ + ok(SysStringLen(str) == 4, "unexpected len\n"); + ok(!lstrcmpW(str, L"test"), "unexpected str %s\n", wine_dbgstr_w(str)); + ok(i == 5, "i = %d\n", i); + return S_OK; +} + static const struct IWidgetVtbl Widget_VTable = { Widget_QueryInterface, @@ -1629,6 +1637,7 @@ static const struct IWidgetVtbl Widget_VTable = Widget_myint, Widget_Coclass, Widget_Coclass_ptr, + Widget_no_in_out, }; static HRESULT WINAPI StaticWidget_QueryInterface(IStaticWidget *iface, REFIID riid, void **ppvObject) @@ -2441,6 +2450,10 @@ static void test_marshal_bstr(IWidget *widget, IDispatch *disp) out = in_ptr = in_out = NULL; hr = IWidget_bstr(widget, NULL, &out, &in_ptr, &in_out); ok(hr == S_OK, "Got hr %#x.\n", hr); + + in = SysAllocString(L"test"); + hr = IWidget_no_in_out(widget, in, 5); + ok(hr == S_OK, "Got hr %#x.\n", hr); } static void test_marshal_variant(IWidget *widget, IDispatch *disp) diff --git a/dlls/oleaut32/tests/tmarshal.idl b/dlls/oleaut32/tests/tmarshal.idl index 14b80c4eec..f1e040ed4d 100644 --- a/dlls/oleaut32/tests/tmarshal.idl +++ b/dlls/oleaut32/tests/tmarshal.idl @@ -72,6 +72,7 @@ enum IWidget_dispids DISPID_TM_TYPEDEF, DISPID_TM_COCLASS, DISPID_TM_COCLASS_PTR, + DISPID_TM_NOINOUT }; static const int DISPID_TM_NEG_RESTRICTED = -26; @@ -373,6 +374,9 @@ library TestTypelib [id(DISPID_TM_COCLASS_PTR)] HRESULT Coclass_ptr([in] Coclass1 **in, [out] Coclass1 **out, [in, out] Coclass1 **in_out); + + [id(DISPID_TM_NOINOUT)] + HRESULT no_in_out(BSTR str, int i); } [ diff --git a/dlls/rpcrt4/ndr_typelib.c b/dlls/rpcrt4/ndr_typelib.c index dd3043e78b..cb5e4f17df 100644 --- a/dlls/rpcrt4/ndr_typelib.c +++ b/dlls/rpcrt4/ndr_typelib.c @@ -1026,16 +1026,18 @@ static HRESULT write_param_fs(ITypeInfo *typeinfo, unsigned char *type, BOOL is_return, unsigned short *stack_offset) { USHORT param_flags = desc->paramdesc.wParamFlags; - int is_in = param_flags & PARAMFLAG_FIN; - int is_out = param_flags & PARAMFLAG_FOUT; TYPEDESC *tdesc = &desc->tdesc, *tfs_tdesc; unsigned short server_size; unsigned short stack_size = get_stack_size(typeinfo, tdesc); unsigned char basetype; unsigned short flags; + int is_in, is_out; size_t off = 0; HRESULT hr; + is_out = param_flags & PARAMFLAG_FOUT; + is_in = (param_flags & PARAMFLAG_FIN) || (!is_out && !is_return); + hr = get_param_info(typeinfo, tdesc, is_in, is_out, &server_size, &flags, &basetype, &tfs_tdesc);
1
0
0
0
Alexandre Julliard : makefiles: Add the builtin flag again after stripping.
by Alexandre Julliard
18 Dec '19
18 Dec '19
Module: wine Branch: master Commit: 5b0ba5be0bf6a99435e46a5813e942ad6d34807a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5b0ba5be0bf6a99435e46a58…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Dec 18 21:05:58 2019 +0100 makefiles: Add the builtin flag again after stripping. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=47718
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/makedep.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/makedep.c b/tools/makedep.c index 7451ee4433..6d1500534d 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -2424,6 +2424,7 @@ static void output_install_commands( struct makefile *make, const struct makefil case 'c': /* cross-compiled program */ output( "\tSTRIPPROG=%s-strip %s -m 644 $(INSTALL_PROGRAM_FLAGS) %s %s\n", crosstarget, install_sh, obj_dir_path( make, file ), dest ); + output( "\t%s --builtin %s\n", tools_path( make, "winebuild" ), dest ); break; case 'd': /* data file */ output( "\t%s -m 644 $(INSTALL_DATA_FLAGS) %s %s\n",
1
0
0
0
Alexandre Julliard : winegcc: Use winebuild to set the builtin flag.
by Alexandre Julliard
18 Dec '19
18 Dec '19
Module: wine Branch: master Commit: 51ffea5a3940bdc74b44b9303c4574dfb156efc0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=51ffea5a3940bdc74b44b930…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Dec 18 21:05:44 2019 +0100 winegcc: Use winebuild to set the builtin flag. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winegcc/winegcc.c | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 939c1e5c91..7f32a38788 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -524,28 +524,6 @@ static int check_platform( struct options *opts, const char *file ) return ret; } -static void make_wine_builtin( const char *file ) -{ - static const char wine_magic[32] = "Wine builtin DLL"; - int fd; - struct - { - unsigned short e_magic; - unsigned short unused[29]; - unsigned int e_lfanew; - } header; - - if ((fd = open( file, O_RDWR | O_BINARY )) == -1) error( "Failed to add signature to %s\n", file ); - - if (read( fd, &header, sizeof(header) ) == sizeof(header) && !memcmp( &header.e_magic, "MZ", 2 )) - { - if (header.e_lfanew < sizeof(header) + sizeof(wine_magic)) - error( "Not enough space (%x) for Wine signature\n", header.e_lfanew ); - write( fd, wine_magic, sizeof(wine_magic) ); - } - close( fd ); -} - static const char *get_multiarch_dir( enum target_cpu cpu ) { switch(cpu) @@ -882,6 +860,16 @@ static strarray *get_winebuild_args(struct options *opts) return spec_args; } +static void make_wine_builtin( struct options *opts, const char *file ) +{ + strarray *args = get_winebuild_args( opts ); + + strarray_add( args, "--builtin" ); + strarray_add( args, file ); + spawn( opts->prefix, args, 0 ); + strarray_free( args ); +} + /* check if there is a static lib associated to a given dll */ static char *find_static_lib( const char *dll ) { @@ -1267,7 +1255,7 @@ static void build(struct options* opts) spawn(opts->prefix, link_args, 0); strarray_free (link_args); - if (is_pe && opts->wine_builtin) make_wine_builtin( output_path ); + if (is_pe && opts->wine_builtin) make_wine_builtin( opts, output_path ); /* set the base address with prelink if linker support is not present */ if (opts->prelink && !opts->target)
1
0
0
0
Alexandre Julliard : winebuild: Add a --builtin option to mark PE files as builtins.
by Alexandre Julliard
18 Dec '19
18 Dec '19
Module: wine Branch: master Commit: 9dc348a071fc626f85c3d3d7b40425712bde1e2c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9dc348a071fc626f85c3d3d7…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Dec 18 21:05:27 2019 +0100 winebuild: Add a --builtin option to mark PE files as builtins. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winebuild/build.h | 1 + tools/winebuild/main.c | 17 ++++++++++++++--- tools/winebuild/spec32.c | 35 ++++++++++++++++++++++++++++++++--- tools/winebuild/winebuild.man.in | 4 ++++ 4 files changed, 51 insertions(+), 6 deletions(-) diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h index 2b67d305e8..29cd997b96 100644 --- a/tools/winebuild/build.h +++ b/tools/winebuild/build.h @@ -320,6 +320,7 @@ extern void output_spec16_file( DLLSPEC *spec ); extern void output_fake_module16( DLLSPEC *spec16 ); extern void output_res_o_file( DLLSPEC *spec ); extern void output_asm_relays16(void); +extern void make_builtin_files( char *argv[] ); extern void add_16bit_exports( DLLSPEC *spec32, DLLSPEC *spec16 ); extern int parse_spec_file( FILE *file, DLLSPEC *spec ); diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c index f4abb55081..ca8f8af03a 100644 --- a/tools/winebuild/main.c +++ b/tools/winebuild/main.c @@ -113,6 +113,7 @@ enum exec_mode_values MODE_EXE, MODE_DEF, MODE_IMPLIB, + MODE_BUILTIN, MODE_RESOURCES }; @@ -291,11 +292,12 @@ static const char usage_str[] = " --version Print the version and exit\n" " -w, --warnings Turn on warnings\n" "\nMode options:\n" -" --dll Build a .c file from a .spec or .def file\n" +" --dll Build a library from a .spec file and object files\n" " --def Build a .def file from a .spec file\n" -" --exe Build a .c file for an executable\n" +" --exe Build an executable from object files\n" " --implib Build an import library\n" -" --resources Build a .o file for the resource files\n\n" +" --builtin Mark a library as a Wine builtin\n" +" --resources Build a .o or .res file for the resource files\n\n" "The mode options are mutually exclusive; you must specify one and only one.\n\n"; enum long_options_values @@ -304,6 +306,7 @@ enum long_options_values LONG_OPT_DEF, LONG_OPT_EXE, LONG_OPT_IMPLIB, + LONG_OPT_BUILTIN, LONG_OPT_ASCMD, LONG_OPT_CCCMD, LONG_OPT_EXTERNAL_SYMS, @@ -326,6 +329,7 @@ static const struct option long_options[] = { "def", 0, 0, LONG_OPT_DEF }, { "exe", 0, 0, LONG_OPT_EXE }, { "implib", 0, 0, LONG_OPT_IMPLIB }, + { "builtin", 0, 0, LONG_OPT_BUILTIN }, { "as-cmd", 1, 0, LONG_OPT_ASCMD }, { "cc-cmd", 1, 0, LONG_OPT_CCCMD }, { "external-symbols", 0, 0, LONG_OPT_EXTERNAL_SYMS }, @@ -494,6 +498,9 @@ static char **parse_options( int argc, char **argv, DLLSPEC *spec ) case LONG_OPT_IMPLIB: set_exec_mode( MODE_IMPLIB ); break; + case LONG_OPT_BUILTIN: + set_exec_mode( MODE_BUILTIN ); + break; case LONG_OPT_ASCMD: as_command = strarray_fromstring( optarg, " " ); break; @@ -677,6 +684,10 @@ int main(int argc, char **argv) if (!parse_input_file( spec )) break; output_import_lib( spec, argv ); break; + case MODE_BUILTIN: + if (!argv[0]) fatal_error( "missing file argument for --builtin option\n" ); + make_builtin_files( argv ); + break; case MODE_RESOURCES: load_resources( argv, spec ); output_res_o_file( spec ); diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index f2567e8a92..ecfe4c5011 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -48,6 +48,9 @@ int needs_get_pc_thunk = 0; +static const char builtin_signature[32] = "Wine builtin DLL"; +static const char fakedll_signature[32] = "Wine placeholder DLL"; + /* check if entry point needs a relay thunk */ static inline int needs_relay( const ORDDEF *odp ) { @@ -790,12 +793,11 @@ void output_fake_module( DLLSPEC *spec ) static const unsigned char exe_code_section[] = { 0xb8, 0x01, 0x00, 0x00, 0x00, /* movl $1,%eax */ 0xc2, 0x04, 0x00 }; /* ret $4 */ - static const char fakedll_signature[] = "Wine placeholder DLL"; const unsigned int page_size = get_page_size(); const unsigned int section_align = page_size; const unsigned int file_align = 0x200; const unsigned int reloc_size = 8; - const unsigned int lfanew = (0x40 + sizeof(fakedll_signature) + 15) & ~15; + const unsigned int lfanew = 0x40 + sizeof(fakedll_signature); const unsigned int nb_sections = 2 + (spec->nb_resources != 0); const unsigned int text_size = (spec->characteristics & IMAGE_FILE_DLL) ? sizeof(dll_code_section) : sizeof(exe_code_section); @@ -837,7 +839,6 @@ void output_fake_module( DLLSPEC *spec ) put_dword( lfanew ); put_data( fakedll_signature, sizeof(fakedll_signature) ); - align_output( 16 ); put_dword( 0x4550 ); /* Signature */ switch(target_cpu) @@ -1062,3 +1063,31 @@ void output_def_file( DLLSPEC *spec, int import_only ) if (!total) warning( "%s: Import library doesn't export anything\n", spec->file_name ); if (spec32) free_dll_spec( spec32 ); } + + +/******************************************************************* + * make_builtin_files + */ +void make_builtin_files( char *argv[] ) +{ + int i, fd; + struct + { + unsigned short e_magic; + unsigned short unused[29]; + unsigned int e_lfanew; + } header; + + for (i = 0; argv[i]; i++) + { + if ((fd = open( argv[i], O_RDWR | O_BINARY )) == -1) fatal_perror( "Cannot open %s", argv[i] ); + if (read( fd, &header, sizeof(header) ) == sizeof(header) && !memcmp( &header.e_magic, "MZ", 2 )) + { + if (header.e_lfanew < sizeof(header) + sizeof(builtin_signature)) + fatal_error( "%s: Not enough space (%x) for Wine signature\n", argv[i], header.e_lfanew ); + write( fd, builtin_signature, sizeof(builtin_signature) ); + } + else fatal_error( "%s: Unrecognized file format\n", argv[i] ); + close( fd ); + } +} diff --git a/tools/winebuild/winebuild.man.in b/tools/winebuild/winebuild.man.in index 367121544d..4da48ffa81 100644 --- a/tools/winebuild/winebuild.man.in +++ b/tools/winebuild/winebuild.man.in @@ -51,6 +51,10 @@ Build a .a import library from a spec file. The .spec file is specified via the \fB-E\fR option. If the output library name ends in .delay.a, a delayed import library is built. .TP +.BI \--builtin +Mark a PE module as a Wine builtin module, by adding the "Wine builtin +DLL" signature string after the DOS header. +.TP .B \--resources Generate a .o file containing all the input resources. This is useful when building with a PE compiler, since the PE binutils cannot handle
1
0
0
0
Chip Davis : winemac.drv: Support VK_EXT_metal_surface.
by Alexandre Julliard
18 Dec '19
18 Dec '19
Module: wine Branch: master Commit: 1eba86fcccda74f1ea9c96054ab7dca33cd07d2f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1eba86fcccda74f1ea9c9605…
Author: Chip Davis <cdavis(a)codeweavers.com> Date: Mon Dec 16 23:58:18 2019 -0600 winemac.drv: Support VK_EXT_metal_surface. Prefer it to VK_MVK_macos_surface when present. MoltenVK has deprecated VK_MVK_macos_surface in favor of VK_EXT_metal_surface. It's likely that the former extension will vanish at some point. Signed-off-by: Chip Davis <cdavis(a)codeweavers.com> Signed-off-by: Ken Thomases <ken(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winemac.drv/vulkan.c | 62 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 50 insertions(+), 12 deletions(-) diff --git a/dlls/winemac.drv/vulkan.c b/dlls/winemac.drv/vulkan.c index 21e93827c1..360dd02f7b 100644 --- a/dlls/winemac.drv/vulkan.c +++ b/dlls/winemac.drv/vulkan.c @@ -50,6 +50,9 @@ WINE_DECLARE_DEBUG_CHANNEL(fps); typedef VkFlags VkMacOSSurfaceCreateFlagsMVK; #define VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK 1000123000 +typedef VkFlags VkMetalSurfaceCreateFlagsEXT; +#define VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT 1000217000 + struct wine_vk_surface { macdrv_metal_device device; @@ -65,9 +68,18 @@ typedef struct VkMacOSSurfaceCreateInfoMVK const void *pView; /* NSView */ } VkMacOSSurfaceCreateInfoMVK; +typedef struct VkMetalSurfaceCreateInfoEXT +{ + VkStructureType sType; + const void *pNext; + VkMetalSurfaceCreateFlagsEXT flags; + const void *pLayer; /* CAMetalLayer */ +} VkMetalSurfaceCreateInfoEXT; + static VkResult (*pvkCreateInstance)(const VkInstanceCreateInfo *, const VkAllocationCallbacks *, VkInstance *); static VkResult (*pvkCreateSwapchainKHR)(VkDevice, const VkSwapchainCreateInfoKHR *, const VkAllocationCallbacks *, VkSwapchainKHR *); static VkResult (*pvkCreateMacOSSurfaceMVK)(VkInstance, const VkMacOSSurfaceCreateInfoMVK*, const VkAllocationCallbacks *, VkSurfaceKHR *); +static VkResult (*pvkCreateMetalSurfaceEXT)(VkInstance, const VkMetalSurfaceCreateInfoEXT*, const VkAllocationCallbacks *, VkSurfaceKHR *); static void (*pvkDestroyInstance)(VkInstance, const VkAllocationCallbacks *); static void (*pvkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *); static void (*pvkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *); @@ -103,6 +115,7 @@ static BOOL WINAPI wine_vk_init(INIT_ONCE *once, void *param, void **context) LOAD_FUNCPTR(vkCreateInstance) LOAD_FUNCPTR(vkCreateSwapchainKHR) LOAD_FUNCPTR(vkCreateMacOSSurfaceMVK) + LOAD_FUNCPTR(vkCreateMetalSurfaceEXT) LOAD_FUNCPTR(vkDestroyInstance) LOAD_FUNCPTR(vkDestroySurfaceKHR) LOAD_FUNCPTR(vkDestroySwapchainKHR) @@ -159,7 +172,7 @@ static VkResult wine_vk_instance_convert_create_info(const VkInstanceCreateInfo */ if (!strcmp(src->ppEnabledExtensionNames[i], "VK_KHR_win32_surface")) { - enabled_extensions[i] = "VK_MVK_macos_surface"; + enabled_extensions[i] = pvkCreateMetalSurfaceEXT ? "VK_EXT_metal_surface" : "VK_MVK_macos_surface"; } else { @@ -239,7 +252,6 @@ static VkResult macdrv_vkCreateWin32SurfaceKHR(VkInstance instance, const VkAllocationCallbacks *allocator, VkSurfaceKHR *surface) { VkResult res; - VkMacOSSurfaceCreateInfoMVK create_info_host; struct wine_vk_surface *mac_surface; struct macdrv_win_data *data; @@ -279,12 +291,26 @@ static VkResult macdrv_vkCreateWin32SurfaceKHR(VkInstance instance, goto err; } - create_info_host.sType = VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK; - create_info_host.pNext = NULL; - create_info_host.flags = 0; /* reserved */ - create_info_host.pView = macdrv_view_get_metal_layer(mac_surface->view); + if (pvkCreateMetalSurfaceEXT) + { + VkMetalSurfaceCreateInfoEXT create_info_host; + create_info_host.sType = VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT; + create_info_host.pNext = NULL; + create_info_host.flags = 0; /* reserved */ + create_info_host.pLayer = macdrv_view_get_metal_layer(mac_surface->view); + + res = pvkCreateMetalSurfaceEXT(instance, &create_info_host, NULL /* allocator */, &mac_surface->surface); + } + else + { + VkMacOSSurfaceCreateInfoMVK create_info_host; + create_info_host.sType = VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK; + create_info_host.pNext = NULL; + create_info_host.flags = 0; /* reserved */ + create_info_host.pView = macdrv_view_get_metal_layer(mac_surface->view); - res = pvkCreateMacOSSurfaceMVK(instance, &create_info_host, NULL /* allocator */, &mac_surface->surface); + res = pvkCreateMacOSSurfaceMVK(instance, &create_info_host, NULL /* allocator */, &mac_surface->surface); + } if (res != VK_SUCCESS) { ERR("Failed to create MoltenVK surface, res=%d\n", res); @@ -342,6 +368,7 @@ static VkResult macdrv_vkEnumerateInstanceExtensionProperties(const char *layer_ uint32_t *count, VkExtensionProperties* properties) { unsigned int i; + BOOL seen_surface = FALSE; VkResult res; TRACE("layer_name %s, count %p, properties %p\n", debugstr_a(layer_name), count, properties); @@ -353,8 +380,9 @@ static VkResult macdrv_vkEnumerateInstanceExtensionProperties(const char *layer_ return VK_ERROR_LAYER_NOT_PRESENT; } - /* We will return the same number of instance extensions reported by the host back to - * winevulkan. Along the way we may replace MoltenVK extensions with their win32 equivalents. + /* We will return at most the same number of instance extensions reported by the host back to + * winevulkan. Along the way we may replace MoltenVK extensions with their win32 equivalents, + * or remove redundant extensions outright. * Winevulkan will perform more detailed filtering as it knows whether it has thunks * for a particular extension. */ @@ -364,14 +392,24 @@ static VkResult macdrv_vkEnumerateInstanceExtensionProperties(const char *layer_ for (i = 0; i < *count; i++) { - /* For now the only MoltenVK extension we need to fixup. Long-term we may need an array. */ - if (!strcmp(properties[i].extensionName, "VK_MVK_macos_surface")) + /* For now the only MoltenVK extensions we need to fixup. Long-term we may need an array. */ + if (!strcmp(properties[i].extensionName, "VK_MVK_macos_surface") || + !strcmp(properties[i].extensionName, "VK_EXT_metal_surface")) { - TRACE("Substituting VK_MVK_macos_surface for VK_KHR_win32_surface\n"); + if (seen_surface) + { + /* If we've already seen a surface extension, just hide this one. */ + memmove(properties + i, properties + i + 1, (*count - i - 1) * sizeof(*properties)); + --*count; + --i; + continue; + } + TRACE("Substituting %s for VK_KHR_win32_surface\n", properties[i].extensionName); snprintf(properties[i].extensionName, sizeof(properties[i].extensionName), VK_KHR_WIN32_SURFACE_EXTENSION_NAME); properties[i].specVersion = VK_KHR_WIN32_SURFACE_SPEC_VERSION; + seen_surface = TRUE; } }
1
0
0
0
Chip Davis : winemac.drv: Pass the CAMetalLayer to MoltenVK.
by Alexandre Julliard
18 Dec '19
18 Dec '19
Module: wine Branch: master Commit: 606424bbbc614f720ac6190151f9fe5cc3e57005 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=606424bbbc614f720ac61901…
Author: Chip Davis <cdavis(a)codeweavers.com> Date: Mon Dec 16 23:58:17 2019 -0600 winemac.drv: Pass the CAMetalLayer to MoltenVK. It isn't safe to access the view object from any thread other than the main thread. In fact, if you try to call vkCreateMacOSSurfaceMVK() from any other thread, MoltenVK prints out a big, scary warning telling you not to do this! Instead, get the layer from the view ourselves and pass that to MoltenVK. Recent versions of MoltenVK can accept either the view or the layer. Signed-off-by: Chip Davis <cdavis(a)codeweavers.com> Signed-off-by: Ken Thomases <ken(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winemac.drv/cocoa_window.m | 12 ++++++++++++ dlls/winemac.drv/macdrv_cocoa.h | 2 ++ dlls/winemac.drv/vulkan.c | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index 877653ea00..edbfab518e 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -3796,6 +3796,18 @@ macdrv_metal_view macdrv_view_create_metal_view(macdrv_view v, macdrv_metal_devi return (macdrv_metal_view)metalView; } +macdrv_metal_layer macdrv_view_get_metal_layer(macdrv_metal_view v) +{ + WineMetalView* view = (WineMetalView*)v; + __block CAMetalLayer* layer; + + OnMainThread(^{ + layer = (CAMetalLayer*)view.layer; + }); + + return (macdrv_metal_layer)layer; +} + void macdrv_view_release_metal_view(macdrv_metal_view v) { WineMetalView* view = (WineMetalView*)v; diff --git a/dlls/winemac.drv/macdrv_cocoa.h b/dlls/winemac.drv/macdrv_cocoa.h index 676adb435b..b02ad79f02 100644 --- a/dlls/winemac.drv/macdrv_cocoa.h +++ b/dlls/winemac.drv/macdrv_cocoa.h @@ -140,6 +140,7 @@ typedef struct macdrv_opaque_opengl_context* macdrv_opengl_context; #ifdef HAVE_METAL_METAL_H typedef struct macdrv_opaque_metal_device* macdrv_metal_device; typedef struct macdrv_opaque_metal_view* macdrv_metal_view; +typedef struct macdrv_opaque_metal_layer* macdrv_metal_layer; #endif typedef struct macdrv_opaque_status_item* macdrv_status_item; struct macdrv_event; @@ -587,6 +588,7 @@ extern void macdrv_remove_view_opengl_context(macdrv_view v, macdrv_opengl_conte extern macdrv_metal_device macdrv_create_metal_device(void) DECLSPEC_HIDDEN; extern void macdrv_release_metal_device(macdrv_metal_device d) DECLSPEC_HIDDEN; extern macdrv_metal_view macdrv_view_create_metal_view(macdrv_view v, macdrv_metal_device d) DECLSPEC_HIDDEN; +extern macdrv_metal_layer macdrv_view_get_metal_layer(macdrv_metal_view v) DECLSPEC_HIDDEN; extern void macdrv_view_release_metal_view(macdrv_metal_view v) DECLSPEC_HIDDEN; #endif extern int macdrv_get_view_backing_size(macdrv_view v, int backing_size[2]) DECLSPEC_HIDDEN; diff --git a/dlls/winemac.drv/vulkan.c b/dlls/winemac.drv/vulkan.c index cc7f22f678..21e93827c1 100644 --- a/dlls/winemac.drv/vulkan.c +++ b/dlls/winemac.drv/vulkan.c @@ -282,7 +282,7 @@ static VkResult macdrv_vkCreateWin32SurfaceKHR(VkInstance instance, create_info_host.sType = VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK; create_info_host.pNext = NULL; create_info_host.flags = 0; /* reserved */ - create_info_host.pView = mac_surface->view; + create_info_host.pView = macdrv_view_get_metal_layer(mac_surface->view); res = pvkCreateMacOSSurfaceMVK(instance, &create_info_host, NULL /* allocator */, &mac_surface->surface); if (res != VK_SUCCESS)
1
0
0
0
Nikolay Sivov : include: Add I1 vector definitions for PROPVARIANT.
by Alexandre Julliard
18 Dec '19
18 Dec '19
Module: wine Branch: master Commit: bfb1908055f552ec1cee86cdbaf370541e7edfee URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bfb1908055f552ec1cee86cd…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Dec 18 18:49:23 2019 +0300 include: Add I1 vector definitions for PROPVARIANT. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/propidl.idl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/propidl.idl b/include/propidl.idl index 71401cb454..f3d517d6b0 100644 --- a/include/propidl.idl +++ b/include/propidl.idl @@ -85,6 +85,7 @@ interface IPropertyStorage : IUnknown type *pElems; \ } name + TYPEDEF_CA(char, CAC); TYPEDEF_CA(unsigned char, CAUB); TYPEDEF_CA(short, CAI); TYPEDEF_CA(USHORT, CAUI); @@ -143,6 +144,7 @@ interface IPropertyStorage : IUnknown [case(VT_LPWSTR)] LPWSTR pwszVal; [case(VT_UNKNOWN)] IUnknown *punkVal; [case(VT_DISPATCH)] IDispatch *pdispVal; + [case(VT_I1|VT_VECTOR)] CAC cac; [case(VT_UI1|VT_VECTOR)] CAUB caub; [case(VT_I2|VT_VECTOR)] CAI cai; [case(VT_UI2|VT_VECTOR)] CAUI caui;
1
0
0
0
Nikolay Sivov : ole32/tests: Add PropVariantCopy() test for BSTR with embedded null.
by Alexandre Julliard
18 Dec '19
18 Dec '19
Module: wine Branch: master Commit: 126cf25617613d282a73e42f357993ea13907de2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=126cf25617613d282a73e42f…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Dec 18 12:06:52 2019 +0300 ole32/tests: Add PropVariantCopy() test for BSTR with embedded null. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ole32/tests/propvariant.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dlls/ole32/tests/propvariant.c b/dlls/ole32/tests/propvariant.c index 18ecfa6528..2b7e6d7285 100644 --- a/dlls/ole32/tests/propvariant.c +++ b/dlls/ole32/tests/propvariant.c @@ -367,6 +367,19 @@ static void test_copy(void) hr = PropVariantClear(&propvarDst); ok(hr == S_OK, "PropVariantClear(...VT_BSTR...) failed\n"); + /* BSTR with embedded null */ + propvarSrc.vt = VT_BSTR; + U(propvarSrc).bstrVal = SysAllocStringLen(L"Test Str\0ing", 12); + hr = PropVariantCopy(&propvarDst, &propvarSrc); + ok(hr == S_OK, "Failed to copy propvar, hr %#x.\n", hr); + ok(SysStringLen(U(propvarDst).bstrVal) == 8, "Unexpected copy length.\n"); + ok(SysStringLen(U(propvarSrc).bstrVal) == 12, "Unexpected source length.\n"); + ok(!lstrcmpW(U(propvarSrc).bstrVal, U(propvarDst).bstrVal), "BSTR not copied properly\n"); + hr = PropVariantClear(&propvarSrc); + ok(hr == S_OK, "Failed to clear propvar, hr %#x.\n", hr); + hr = PropVariantClear(&propvarDst); + ok(hr == S_OK, "Failed to clear propvar, hr %#x.\n", hr); + propvarSrc.vt = VT_LPWSTR; U(propvarSrc).pwszVal = wszTestString; hr = PropVariantCopy(&propvarDst, &propvarSrc);
1
0
0
0
Nikolay Sivov : ole32/tests: Add some more tests for item moniker hashing.
by Alexandre Julliard
18 Dec '19
18 Dec '19
Module: wine Branch: master Commit: adcb5f98d844aacd49b5c85aaad5f497c958d2c3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=adcb5f98d844aacd49b5c85a…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Dec 18 12:06:51 2019 +0300 ole32/tests: Add some more tests for item moniker hashing. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ole32/tests/moniker.c | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/dlls/ole32/tests/moniker.c b/dlls/ole32/tests/moniker.c index 7e77847837..b65c0115ca 100644 --- a/dlls/ole32/tests/moniker.c +++ b/dlls/ole32/tests/moniker.c @@ -1747,6 +1747,20 @@ static void test_item_moniker(void) { NULL, L"Item1", NULL, L"Item2", S_FALSE }, { NULL, L"Item1", NULL, L"ITEM1", S_OK }, }; + static const struct + { + const WCHAR *delim; + const WCHAR *item; + DWORD hash; + } hash_tests[] = + { + { L"!", L"Test", 0x73c }, + { L"%", L"Test", 0x73c }, + { L"%", L"TEST", 0x73c }, + { L"%", L"T", 0x54 }, + { L"%", L"A", 0x41 }, + { L"%", L"a", 0x41 }, + }; IMoniker *moniker, *moniker2; HRESULT hr; DWORD moniker_type, i; @@ -1851,6 +1865,20 @@ todo_wine IMoniker_Release(moniker2); IMoniker_Release(moniker); + /* Hashing */ + + for (i = 0; i < ARRAY_SIZE(hash_tests); ++i) + { + hr = CreateItemMoniker(hash_tests[i].delim, hash_tests[i].item, &moniker); + ok(hr == S_OK, "Failed to create a moniker, hr %#x.\n", hr); + + hr = IMoniker_Hash(moniker, &hash); + ok(hr == S_OK, "Failed to get hash value, hr %#x.\n", hr); + ok(hash == hash_tests[i].hash, "%d: unexpected hash value %#x.\n", i, hash); + + IMoniker_Release(moniker); + } + hr = CreateItemMoniker(wszDelimiter, wszObjectName, &moniker); ok_ole_success(hr, CreateItemMoniker); @@ -1860,15 +1888,6 @@ todo_wine expected_item_moniker_comparison_data, sizeof(expected_item_moniker_comparison_data), 54, expected_display_name); - /* Hashing */ - - hr = IMoniker_Hash(moniker, &hash); - ok_ole_success(hr, IMoniker_Hash); - - ok(hash == 0x73c, - "Hash value != 0x73c, instead was 0x%08x\n", - hash); - /* IsSystemMoniker test */ hr = IMoniker_IsSystemMoniker(moniker, &moniker_type);
1
0
0
0
Nikolay Sivov : ole32/tests: Add equality tests for antimonikers.
by Alexandre Julliard
18 Dec '19
18 Dec '19
Module: wine Branch: master Commit: 06479cb789d2f5768d78c10615cb84b550dfbac5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=06479cb789d2f5768d78c106…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Dec 18 12:06:50 2019 +0300 ole32/tests: Add equality tests for antimonikers. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ole32/tests/moniker.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/dlls/ole32/tests/moniker.c b/dlls/ole32/tests/moniker.c index 7b4bf5c0fa..7e77847837 100644 --- a/dlls/ole32/tests/moniker.c +++ b/dlls/ole32/tests/moniker.c @@ -2025,6 +2025,9 @@ todo_wine IMoniker_Release(moniker2); /* Load with composed number > 1. */ + hr = CreateAntiMoniker(&moniker2); + ok(hr == S_OK, "Failed to create moniker, hr %#x.\n", hr); + hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); ok(hr == S_OK, "Failed to create a stream, hr %#x.\n", hr); @@ -2034,6 +2037,14 @@ todo_wine todo_wine ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + hr = IMoniker_IsEqual(moniker, moniker2); +todo_wine + ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + + hr = IMoniker_IsEqual(moniker2, moniker); +todo_wine + ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + hr = IMoniker_Hash(moniker, &hash); ok(hr == S_OK, "Failed to get hash value, hr %#x.\n", hr); todo_wine @@ -2076,6 +2087,14 @@ todo_wine todo_wine ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + hr = IMoniker_IsEqual(moniker, moniker2); +todo_wine + ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + + hr = IMoniker_IsEqual(moniker2, moniker); +todo_wine + ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + hr = IMoniker_Hash(moniker, &hash); ok(hr == S_OK, "Failed to get hash value, hr %#x.\n", hr); todo_wine @@ -2087,10 +2106,27 @@ todo_wine ok(!lstrcmpW(name, L""), "Unexpected display name %s.\n", wine_dbgstr_w(name)); CoTaskMemFree(name); + /* Back to initial value. */ + stream_write_dword(stream, 1); + + hr = IMoniker_Load(moniker, stream); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IMoniker_IsEqual(moniker, moniker2); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IMoniker_IsEqual(moniker2, moniker); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IMoniker_IsEqual(moniker, NULL); +todo_wine + ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + IStream_Release(stream); IBindCtx_Release(bindctx); IMoniker_Release(moniker); + IMoniker_Release(moniker2); } static void test_generic_composite_moniker(void)
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
64
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
Results per page:
10
25
50
100
200