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
May
April
March
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
October 2022
----- 2025 -----
May 2025
April 2025
March 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
537 discussions
Start a n
N
ew thread
Nikolay Sivov : kernelbase: Forward some more classes in GetFileInformationByHandleEx().
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: wine Branch: master Commit: 69cff16d696bc2270f26826b3f2be64abf425725 URL:
https://gitlab.winehq.org/wine/wine/-/commit/69cff16d696bc2270f26826b3f2be6…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Oct 27 23:02:37 2022 +0300 kernelbase: Forward some more classes in GetFileInformationByHandleEx(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/kernelbase/file.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c index 5e6d271c3b0..661bc0c2778 100644 --- a/dlls/kernelbase/file.c +++ b/dlls/kernelbase/file.c @@ -2964,11 +2964,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetFileInformationByHandleEx( HANDLE handle, FILE_ switch (class) { - case FileStreamInfo: - case FileCompressionInfo: case FileRemoteProtocolInfo: case FileStorageInfo: - case FileAlignmentInfo: case FileDispositionInfoEx: case FileRenameInfoEx: case FileCaseSensitiveInfo: @@ -2977,6 +2974,18 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetFileInformationByHandleEx( HANDLE handle, FILE_ SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); return FALSE; + case FileStreamInfo: + status = NtQueryInformationFile( handle, &io, info, size, FileStreamInformation ); + break; + + case FileCompressionInfo: + status = NtQueryInformationFile( handle, &io, info, size, FileCompressionInformation ); + break; + + case FileAlignmentInfo: + status = NtQueryInformationFile( handle, &io, info, size, FileAlignmentInformation ); + break; + case FileAttributeTagInfo: status = NtQueryInformationFile( handle, &io, info, size, FileAttributeTagInformation ); break;
1
0
0
0
Nikolay Sivov : kernelbase: Make sure to provide a message for missing information classes in GetFileInformationByHandleEx().
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: wine Branch: master Commit: f054d2ab58a6fc129583775e683d84bbdd421425 URL:
https://gitlab.winehq.org/wine/wine/-/commit/f054d2ab58a6fc129583775e683d84…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Oct 27 21:41:38 2022 +0300 kernelbase: Make sure to provide a message for missing information classes in GetFileInformationByHandleEx(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/kernelbase/file.c | 4 ++++ include/winbase.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c index c0cdfdcdf84..5e6d271c3b0 100644 --- a/dlls/kernelbase/file.c +++ b/dlls/kernelbase/file.c @@ -2969,6 +2969,10 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetFileInformationByHandleEx( HANDLE handle, FILE_ case FileRemoteProtocolInfo: case FileStorageInfo: case FileAlignmentInfo: + case FileDispositionInfoEx: + case FileRenameInfoEx: + case FileCaseSensitiveInfo: + case FileNormalizedNameInfo: FIXME( "%p, %u, %p, %lu\n", handle, class, info, size ); SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); return FALSE; diff --git a/include/winbase.h b/include/winbase.h index 277f981982d..58f21a1361a 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -802,6 +802,10 @@ typedef enum _FILE_INFO_BY_HANDLE_CLASS { FileIdInfo, FileIdExtdDirectoryInfo, FileIdExtdDirectoryRestartInfo, + FileDispositionInfoEx, + FileRenameInfoEx, + FileCaseSensitiveInfo, + FileNormalizedNameInfo, MaximumFileInfoByHandlesClass } FILE_INFO_BY_HANDLE_CLASS, *PFILE_INFO_BY_HANDLE_CLASS;
1
0
0
0
Nikolay Sivov : kernelbase: Forward some directory info classes in GetFileInformationByHandleEx().
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: wine Branch: master Commit: 404e590e06b4443d76bedfa1bc9f3c25dda6d8cb URL:
https://gitlab.winehq.org/wine/wine/-/commit/404e590e06b4443d76bedfa1bc9f3c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Oct 27 19:48:01 2022 +0300 kernelbase: Forward some directory info classes in GetFileInformationByHandleEx(). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53590
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/kernelbase/file.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c index 3e1fd5aec4e..c0cdfdcdf84 100644 --- a/dlls/kernelbase/file.c +++ b/dlls/kernelbase/file.c @@ -2967,12 +2967,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetFileInformationByHandleEx( HANDLE handle, FILE_ case FileStreamInfo: case FileCompressionInfo: case FileRemoteProtocolInfo: - case FileFullDirectoryInfo: - case FileFullDirectoryRestartInfo: case FileStorageInfo: case FileAlignmentInfo: - case FileIdExtdDirectoryInfo: - case FileIdExtdDirectoryRestartInfo: FIXME( "%p, %u, %p, %lu\n", handle, class, info, size ); SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); return FALSE; @@ -3004,6 +3000,20 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetFileInformationByHandleEx( HANDLE handle, FILE_ (class == FileIdBothDirectoryRestartInfo) ); break; + case FileFullDirectoryInfo: + case FileFullDirectoryRestartInfo: + status = NtQueryDirectoryFile( handle, NULL, NULL, NULL, &io, info, size, + FileFullDirectoryInformation, FALSE, NULL, + (class == FileFullDirectoryRestartInfo) ); + break; + + case FileIdExtdDirectoryInfo: + case FileIdExtdDirectoryRestartInfo: + status = NtQueryDirectoryFile( handle, NULL, NULL, NULL, &io, info, size, + FileIdExtdDirectoryInformation, FALSE, NULL, + (class == FileIdExtdDirectoryRestartInfo) ); + break; + case FileRenameInfo: case FileDispositionInfo: case FileAllocationInfo:
1
0
0
0
Martin Storsjö : ntdll: Use the local dwarf implementation on arm64.
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: wine Branch: master Commit: 03d4ba67f4a0b75548f27eb4bf1c4715888de07d URL:
https://gitlab.winehq.org/wine/wine/-/commit/03d4ba67f4a0b75548f27eb4bf1c47…
Author: Martin Storsjö <martin(a)martin.st> Date: Tue Oct 18 14:38:15 2022 +0300 ntdll: Use the local dwarf implementation on arm64. This makes unwinding work if libunwind is unavailable. The dwarf_virtual_unwind function is modelled heavily on the x86_64 version of it. (Going forward, if there are changes to either of them, one should probably look at whether those changes should be mirrored to the other one too.) Signed-off-by: Martin Storsjö <martin(a)martin.st> --- dlls/ntdll/unix/signal_arm64.c | 171 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 162 insertions(+), 9 deletions(-) diff --git a/dlls/ntdll/unix/signal_arm64.c b/dlls/ntdll/unix/signal_arm64.c index 4e552e0f10a..19d08e2270a 100644 --- a/dlls/ntdll/unix/signal_arm64.c +++ b/dlls/ntdll/unix/signal_arm64.c @@ -68,6 +68,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(seh); +#include "dwarf.h" + /*********************************************************************** * signal context platform-specific definitions */ @@ -172,14 +174,146 @@ static BOOL is_inside_syscall( ucontext_t *sigcontext ) extern void raise_func_trampoline( EXCEPTION_RECORD *rec, CONTEXT *context, void *dispatcher ); /*********************************************************************** - * unwind_builtin_dll + * dwarf_virtual_unwind * * Equivalent of RtlVirtualUnwind for builtin modules. */ -NTSTATUS CDECL unwind_builtin_dll( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEXT *context ) +static NTSTATUS dwarf_virtual_unwind( ULONG64 ip, ULONG64 *frame, CONTEXT *context, + const struct dwarf_fde *fde, const struct dwarf_eh_bases *bases, + PEXCEPTION_ROUTINE *handler, void **handler_data ) { + const struct dwarf_cie *cie; + const unsigned char *ptr, *augmentation, *end; + ULONG_PTR len, code_end; + struct frame_info info; + struct frame_state state_stack[MAX_SAVED_STATES]; + int aug_z_format = 0; + unsigned char lsda_encoding = DW_EH_PE_omit; + + memset( &info, 0, sizeof(info) ); + info.state_stack = state_stack; + info.ip = (ULONG_PTR)bases->func; + *handler = NULL; + + cie = (const struct dwarf_cie *)((const char *)&fde->cie_offset - fde->cie_offset); + + /* parse the CIE first */ + + if (cie->version != 1 && cie->version != 3) + { + FIXME( "unknown CIE version %u at %p\n", cie->version, cie ); + return STATUS_INVALID_DISPOSITION; + } + ptr = cie->augmentation + strlen((const char *)cie->augmentation) + 1; + + info.code_align = dwarf_get_uleb128( &ptr ); + info.data_align = dwarf_get_sleb128( &ptr ); + if (cie->version == 1) + info.retaddr_reg = *ptr++; + else + info.retaddr_reg = dwarf_get_uleb128( &ptr ); + info.state.cfa_rule = RULE_CFA_OFFSET; + + TRACE( "function %lx base %p cie %p len %x id %x version %x aug '%s' code_align %lu data_align %ld retaddr %s\n", + ip, bases->func, cie, cie->length, cie->id, cie->version, cie->augmentation, + info.code_align, info.data_align, dwarf_reg_names[info.retaddr_reg] ); + + end = NULL; + for (augmentation = cie->augmentation; *augmentation; augmentation++) + { + switch (*augmentation) + { + case 'z': + len = dwarf_get_uleb128( &ptr ); + end = ptr + len; + aug_z_format = 1; + continue; + case 'L': + lsda_encoding = *ptr++; + continue; + case 'P': + { + unsigned char encoding = *ptr++; + *handler = (void *)dwarf_get_ptr( &ptr, encoding, bases ); + continue; + } + case 'R': + info.fde_encoding = *ptr++; + continue; + case 'S': + info.signal_frame = 1; + continue; + } + FIXME( "unknown augmentation '%c'\n", *augmentation ); + if (!end) return STATUS_INVALID_DISPOSITION; /* cannot continue */ + break; + } + if (end) ptr = end; + + end = (const unsigned char *)(&cie->length + 1) + cie->length; + execute_cfa_instructions( ptr, end, ip, &info, bases ); + + ptr = (const unsigned char *)(fde + 1); + info.ip = dwarf_get_ptr( &ptr, info.fde_encoding, bases ); /* fde code start */ + code_end = info.ip + dwarf_get_ptr( &ptr, info.fde_encoding & 0x0f, bases ); /* fde code length */ + + if (aug_z_format) /* get length of augmentation data */ + { + len = dwarf_get_uleb128( &ptr ); + end = ptr + len; + } + else end = NULL; + + *handler_data = (void *)dwarf_get_ptr( &ptr, lsda_encoding, bases ); + if (end) ptr = end; + + end = (const unsigned char *)(&fde->length + 1) + fde->length; + TRACE( "fde %p len %x personality %p lsda %p code %lx-%lx\n", + fde, fde->length, *handler, *handler_data, info.ip, code_end ); + execute_cfa_instructions( ptr, end, ip, &info, bases ); + *frame = context->Sp; + apply_frame_state( context, &info.state, bases ); + context->ContextFlags |= CONTEXT_UNWOUND_TO_CALL; + /* Set Pc based on Lr; libunwind also does this as part of unw_step. */ + context->Pc = context->u.s.Lr; + + if (bases->func == (void *)raise_func_trampoline) { + /* raise_func_trampoline has a full CONTEXT stored on the stack; + * restore the original Lr value from there. The function we unwind + * to might be a leaf function that hasn't backed up its own original + * Lr value on the stack. + * We could also just restore the full context here without doing + * unw_step at all. */ + const CONTEXT *next_ctx = (const CONTEXT *) *frame; + context->u.s.Lr = next_ctx->u.s.Lr; + } + + TRACE( "next function pc=%016lx\n", context->Pc ); + TRACE(" x0=%016lx x1=%016lx x2=%016lx x3=%016lx\n", + context->u.s.X0, context->u.s.X1, context->u.s.X2, context->u.s.X3 ); + TRACE(" x4=%016lx x5=%016lx x6=%016lx x7=%016lx\n", + context->u.s.X4, context->u.s.X5, context->u.s.X6, context->u.s.X7 ); + TRACE(" x8=%016lx x9=%016lx x10=%016lx x11=%016lx\n", + context->u.s.X8, context->u.s.X9, context->u.s.X10, context->u.s.X11 ); + TRACE(" x12=%016lx x13=%016lx x14=%016lx x15=%016lx\n", + context->u.s.X12, context->u.s.X13, context->u.s.X14, context->u.s.X15 ); + TRACE(" x16=%016lx x17=%016lx x18=%016lx x19=%016lx\n", + context->u.s.X16, context->u.s.X17, context->u.s.X18, context->u.s.X19 ); + TRACE(" x20=%016lx x21=%016lx x22=%016lx x23=%016lx\n", + context->u.s.X20, context->u.s.X21, context->u.s.X22, context->u.s.X23 ); + TRACE(" x24=%016lx x25=%016lx x26=%016lx x27=%016lx\n", + context->u.s.X24, context->u.s.X25, context->u.s.X26, context->u.s.X27 ); + TRACE(" x28=%016lx fp=%016lx lr=%016lx sp=%016lx\n", + context->u.s.X28, context->u.s.Fp, context->u.s.Lr, context->Sp ); + + return STATUS_SUCCESS; +} + + #ifdef HAVE_LIBUNWIND - ULONG_PTR ip = context->Pc; +static NTSTATUS libunwind_virtual_unwind( ULONG_PTR ip, ULONG_PTR *frame, CONTEXT *context, + PEXCEPTION_ROUTINE *handler, void **handler_data ) +{ unw_context_t unw_context; unw_cursor_t cursor; unw_proc_info_t info; @@ -222,8 +356,8 @@ NTSTATUS CDECL unwind_builtin_dll( ULONG type, DISPATCHER_CONTEXT *dispatch, CON { TRACE( "no info found for %lx ip %lx-%lx, assuming leaf function\n", ip, info.start_ip, info.end_ip ); - dispatch->LanguageHandler = NULL; - dispatch->EstablisherFrame = context->Sp; + *handler = NULL; + *frame = context->Sp; context->Pc = context->u.s.Lr; context->ContextFlags |= CONTEXT_UNWOUND_TO_CALL; return STATUS_SUCCESS; @@ -240,9 +374,9 @@ NTSTATUS CDECL unwind_builtin_dll( ULONG type, DISPATCHER_CONTEXT *dispatch, CON return STATUS_INVALID_DISPOSITION; } - dispatch->LanguageHandler = (void *)info.handler; - dispatch->HandlerData = (void *)info.lsda; - dispatch->EstablisherFrame = context->Sp; + *handler = (void *)info.handler; + *handler_data = (void *)info.lsda; + *frame = context->Sp; #ifdef __APPLE__ { int i; @@ -296,7 +430,7 @@ NTSTATUS CDECL unwind_builtin_dll( ULONG type, DISPATCHER_CONTEXT *dispatch, CON * Lr value on the stack. * We could also just restore the full context here without doing * unw_step at all. */ - const CONTEXT *next_ctx = (const CONTEXT *) dispatch->EstablisherFrame; + const CONTEXT *next_ctx = (const CONTEXT *) *frame; context->u.s.Lr = next_ctx->u.s.Lr; } @@ -318,6 +452,25 @@ NTSTATUS CDECL unwind_builtin_dll( ULONG type, DISPATCHER_CONTEXT *dispatch, CON TRACE(" x28=%016lx fp=%016lx lr=%016lx sp=%016lx\n", context->u.s.X28, context->u.s.Fp, context->u.s.Lr, context->Sp ); return STATUS_SUCCESS; +} +#endif + +/*********************************************************************** + * unwind_builtin_dll + * + * Equivalent of RtlVirtualUnwind for builtin modules. + */ +NTSTATUS CDECL unwind_builtin_dll( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEXT *context ) +{ + struct dwarf_eh_bases bases; + const struct dwarf_fde *fde = _Unwind_Find_FDE( (void *)(context->Pc - 1), &bases ); + + if (fde) + return dwarf_virtual_unwind( context->Pc, &dispatch->EstablisherFrame, context, fde, + &bases, &dispatch->LanguageHandler, &dispatch->HandlerData ); +#ifdef HAVE_LIBUNWIND + return libunwind_virtual_unwind( context->Pc, &dispatch->EstablisherFrame, context, + &dispatch->LanguageHandler, &dispatch->HandlerData ); #else ERR("libunwind not available, unable to unwind\n"); return STATUS_INVALID_DISPOSITION;
1
0
0
0
Martin Storsjö : ntdll: Add support for aarch64 in the dwarf implementation.
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: wine Branch: master Commit: 6241f87cca7a1cc51b41bf13fe95497b4e8739bc URL:
https://gitlab.winehq.org/wine/wine/-/commit/6241f87cca7a1cc51b41bf13fe9549…
Author: Martin Storsjö <martin(a)martin.st> Date: Tue Oct 18 16:06:25 2022 +0300 ntdll: Add support for aarch64 in the dwarf implementation. This is essentially about mapping dwarf register numbers to aarch64 registers, and for updating the right CONTEXT variable with the CFA. Signed-off-by: Martin Storsjö <martin(a)martin.st> --- dlls/ntdll/unix/dwarf.h | 164 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 164 insertions(+) diff --git a/dlls/ntdll/unix/dwarf.h b/dlls/ntdll/unix/dwarf.h index 33cc8315bd6..cae7d6288ee 100644 --- a/dlls/ntdll/unix/dwarf.h +++ b/dlls/ntdll/unix/dwarf.h @@ -377,7 +377,13 @@ enum reg_rule RULE_VAL_EXPRESSION /* value specified by expression */ }; +#ifdef __x86_64__ #define NB_FRAME_REGS 41 +#elif defined(__aarch64__) +#define NB_FRAME_REGS 96 +#else +#error Unsupported architecture +#endif #define MAX_SAVED_STATES 16 struct frame_state @@ -404,11 +410,26 @@ struct frame_info static const char *dwarf_reg_names[NB_FRAME_REGS] = { +#ifdef __x86_64__ /* 0-7 */ "%rax", "%rdx", "%rcx", "%rbx", "%rsi", "%rdi", "%rbp", "%rsp", /* 8-16 */ "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", "%rip", /* 17-24 */ "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "%xmm7", /* 25-32 */ "%xmm8", "%xmm9", "%xmm10", "%xmm11", "%xmm12", "%xmm13", "%xmm14", "%xmm15", /* 33-40 */ "%st0", "%st1", "%st2", "%st3", "%st4", "%st5", "%st6", "%st7" +#elif defined(__aarch64__) +/* 0-7 */ "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", +/* 8-15 */ "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", +/* 16-23 */ "x16", "x17", "x18", "x19", "x20", "x21", "x22", "x23", +/* 24-31 */ "x24", "x25", "x26", "x27", "x28", "x29", "x30", "sp", +/* 32-39 */ "pc", NULL, NULL, NULL, NULL, NULL, NULL, NULL, +/* 40-47 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, +/* 48-55 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, +/* 56-63 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, +/* 64-71 */ "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", +/* 72-79 */ "v8", "v9", "v10", "v11", "v12", "v13", "v14", "v15", +/* 80-87 */ "v16", "v17", "v18", "v19", "v20", "v21", "v22", "v23", +/* 88-95 */ "v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31", +#endif }; static BOOL valid_reg( ULONG_PTR reg ) @@ -617,6 +638,7 @@ static void *get_context_reg( CONTEXT *context, ULONG_PTR dw_reg ) { switch (dw_reg) { +#ifdef __x86_64__ case 0: return &context->Rax; case 1: return &context->Rdx; case 2: return &context->Rcx; @@ -658,6 +680,74 @@ static void *get_context_reg( CONTEXT *context, ULONG_PTR dw_reg ) case 38: return &context->u.s.Legacy[5]; case 39: return &context->u.s.Legacy[6]; case 40: return &context->u.s.Legacy[7]; +#elif defined(__aarch64__) + case 0: return &context->u.s.X0; + case 1: return &context->u.s.X1; + case 2: return &context->u.s.X2; + case 3: return &context->u.s.X3; + case 4: return &context->u.s.X4; + case 5: return &context->u.s.X5; + case 6: return &context->u.s.X6; + case 7: return &context->u.s.X7; + case 8: return &context->u.s.X8; + case 9: return &context->u.s.X9; + case 10: return &context->u.s.X10; + case 11: return &context->u.s.X11; + case 12: return &context->u.s.X12; + case 13: return &context->u.s.X13; + case 14: return &context->u.s.X14; + case 15: return &context->u.s.X15; + case 16: return &context->u.s.X16; + case 17: return &context->u.s.X17; + case 18: return &context->u.s.X18; + case 19: return &context->u.s.X19; + case 20: return &context->u.s.X20; + case 21: return &context->u.s.X21; + case 22: return &context->u.s.X22; + case 23: return &context->u.s.X23; + case 24: return &context->u.s.X24; + case 25: return &context->u.s.X25; + case 26: return &context->u.s.X26; + case 27: return &context->u.s.X27; + case 28: return &context->u.s.X28; + case 29: return &context->u.s.Fp; + case 30: return &context->u.s.Lr; + case 31: return &context->Sp; + case 32: return &context->Pc; + case 64: + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + case 81: + case 82: + case 83: + case 84: + case 85: + case 86: + case 87: + case 88: + case 89: + case 90: + case 91: + case 92: + case 93: + case 94: + case 95: + return &context->V[dw_reg - 64]; +#endif default: return NULL; } } @@ -667,6 +757,7 @@ static void set_context_reg( CONTEXT *context, ULONG_PTR dw_reg, void *val ) { switch (dw_reg) { +#ifdef __x86_64__ case 0: context->Rax = *(ULONG64 *)val; break; case 1: context->Rdx = *(ULONG64 *)val; break; case 2: context->Rcx = *(ULONG64 *)val; break; @@ -708,6 +799,75 @@ static void set_context_reg( CONTEXT *context, ULONG_PTR dw_reg, void *val ) case 38: memcpy( &context->u.s.Legacy[5], val, sizeof(M128A) ); break; case 39: memcpy( &context->u.s.Legacy[6], val, sizeof(M128A) ); break; case 40: memcpy( &context->u.s.Legacy[7], val, sizeof(M128A) ); break; +#elif defined(__aarch64__) + case 0: context->u.s.X0 = *(DWORD64 *)val; break; + case 1: context->u.s.X1 = *(DWORD64 *)val; break; + case 2: context->u.s.X2 = *(DWORD64 *)val; break; + case 3: context->u.s.X3 = *(DWORD64 *)val; break; + case 4: context->u.s.X4 = *(DWORD64 *)val; break; + case 5: context->u.s.X5 = *(DWORD64 *)val; break; + case 6: context->u.s.X6 = *(DWORD64 *)val; break; + case 7: context->u.s.X7 = *(DWORD64 *)val; break; + case 8: context->u.s.X8 = *(DWORD64 *)val; break; + case 9: context->u.s.X9 = *(DWORD64 *)val; break; + case 10: context->u.s.X10 = *(DWORD64 *)val; break; + case 11: context->u.s.X11 = *(DWORD64 *)val; break; + case 12: context->u.s.X12 = *(DWORD64 *)val; break; + case 13: context->u.s.X13 = *(DWORD64 *)val; break; + case 14: context->u.s.X14 = *(DWORD64 *)val; break; + case 15: context->u.s.X15 = *(DWORD64 *)val; break; + case 16: context->u.s.X16 = *(DWORD64 *)val; break; + case 17: context->u.s.X17 = *(DWORD64 *)val; break; + case 18: context->u.s.X18 = *(DWORD64 *)val; break; + case 19: context->u.s.X19 = *(DWORD64 *)val; break; + case 20: context->u.s.X20 = *(DWORD64 *)val; break; + case 21: context->u.s.X21 = *(DWORD64 *)val; break; + case 22: context->u.s.X22 = *(DWORD64 *)val; break; + case 23: context->u.s.X23 = *(DWORD64 *)val; break; + case 24: context->u.s.X24 = *(DWORD64 *)val; break; + case 25: context->u.s.X25 = *(DWORD64 *)val; break; + case 26: context->u.s.X26 = *(DWORD64 *)val; break; + case 27: context->u.s.X27 = *(DWORD64 *)val; break; + case 28: context->u.s.X28 = *(DWORD64 *)val; break; + case 29: context->u.s.Fp = *(DWORD64 *)val; break; + case 30: context->u.s.Lr = *(DWORD64 *)val; break; + case 31: context->Sp = *(DWORD64 *)val; break; + case 32: context->Pc = *(DWORD64 *)val; break; + case 64: + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + case 81: + case 82: + case 83: + case 84: + case 85: + case 86: + case 87: + case 88: + case 89: + case 90: + case 91: + case 92: + case 93: + case 94: + case 95: + memcpy( &context->V[dw_reg - 64], val, sizeof(ARM64_NT_NEON128) ); + break; +#endif } } @@ -842,7 +1002,11 @@ static void apply_frame_state( CONTEXT *context, struct frame_state *state, break; } } +#ifdef __x86_64__ new_context.Rsp = cfa; +#elif defined(__aarch64__) + new_context.Sp = cfa; +#endif *context = new_context; }
1
0
0
0
Martin Storsjö : ntdll: Move the dwarf reading routines to a shareable header.
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: wine Branch: master Commit: 1b2e6d98bb4da603fd5f9211cdf8a01a5de575cc URL:
https://gitlab.winehq.org/wine/wine/-/commit/1b2e6d98bb4da603fd5f9211cdf8a0…
Author: Martin Storsjö <martin(a)martin.st> Date: Tue Oct 18 16:03:37 2022 +0300 ntdll: Move the dwarf reading routines to a shareable header. Signed-off-by: Martin Storsjö <martin(a)martin.st> --- dlls/ntdll/unix/dwarf.h | 849 ++++++++++++++++++++++++++++++++++++++++ dlls/ntdll/unix/signal_x86_64.c | 823 +------------------------------------- 2 files changed, 851 insertions(+), 821 deletions(-)
1
0
0
0
Gerald Pfeifer : loader: Unbreak FreeBSD builds (ARRAY_SIZE undefined).
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: wine Branch: master Commit: 699067ae145952ff118a19e7ac4c45b71bfc38da URL:
https://gitlab.winehq.org/wine/wine/-/commit/699067ae145952ff118a19e7ac4c45…
Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Fri Oct 28 01:02:44 2022 +0200 loader: Unbreak FreeBSD builds (ARRAY_SIZE undefined). Commit af996344a815baa1278d32181ddfda5e889a16d9 used ARRAY_SIZE in FreeBSD-specifc code which, alas, is not available here, so revert that change. --- loader/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loader/main.c b/loader/main.c index 36e1f5f0967..242ff15accd 100644 --- a/loader/main.c +++ b/loader/main.c @@ -90,7 +90,7 @@ static const char *get_self_exe( char *argv0 ) static int pathname[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }; size_t path_size = PATH_MAX; char *path = malloc( path_size ); - if (path && !sysctl( pathname, ARRAY_SIZE( pathname ), path, &path_size, NULL, 0 )) + if (path && !sysctl( pathname, sizeof(pathname)/sizeof(pathname[0]), path, &path_size, NULL, 0 )) return path; free( path ); #endif
1
0
0
0
Bartosz Kosiorek : gdiplus: Add GdipGetPenCompoundArray implementation.
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: wine Branch: master Commit: 2f26b02fd2c8cf323e2a898660dd98b24807bd12 URL:
https://gitlab.winehq.org/wine/wine/-/commit/2f26b02fd2c8cf323e2a898660dd98…
Author: Bartosz Kosiorek <gang65(a)poczta.onet.pl> Date: Sat Oct 29 14:39:31 2022 +0200 gdiplus: Add GdipGetPenCompoundArray implementation. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52196
--- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/pen.c | 11 +++++++++++ dlls/gdiplus/tests/pen.c | 24 ++++++++++++++++++++++-- include/gdiplusflat.h | 1 + 4 files changed, 35 insertions(+), 3 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 15d9b5d81e8..d4545abf319 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -334,7 +334,7 @@ 334 stdcall GdipGetPathWorldBoundsI(ptr ptr ptr ptr) 335 stdcall GdipGetPenBrushFill(ptr ptr) 336 stdcall GdipGetPenColor(ptr ptr) -337 stub GdipGetPenCompoundArray +337 stdcall GdipGetPenCompoundArray(ptr ptr long) 338 stdcall GdipGetPenCompoundCount(ptr ptr) 339 stdcall GdipGetPenCustomEndCap(ptr ptr) 340 stdcall GdipGetPenCustomStartCap(ptr ptr) diff --git a/dlls/gdiplus/pen.c b/dlls/gdiplus/pen.c index 86e68e517fb..535ef10c05d 100644 --- a/dlls/gdiplus/pen.c +++ b/dlls/gdiplus/pen.c @@ -526,6 +526,17 @@ GpStatus WINGDIPAPI GdipSetPenColor(GpPen *pen, ARGB argb) return GdipSetSolidFillColor(((GpSolidFill*)pen->brush), argb); } +GpStatus WINGDIPAPI GdipGetPenCompoundArray(GpPen *pen, REAL *compoundarray, INT count) +{ + TRACE("(%p, %p, %i)\n", pen, compoundarray, count); + + if (!pen || !compoundarray || count > pen->compound_array_size) + return InvalidParameter; + if (pen->compound_array && count > 0) + memcpy(compoundarray, pen->compound_array, count * sizeof(REAL)); + return Ok; +} + GpStatus WINGDIPAPI GdipGetPenCompoundCount(GpPen *pen, INT *count) { TRACE("(%p, %p)\n", pen, count); diff --git a/dlls/gdiplus/tests/pen.c b/dlls/gdiplus/tests/pen.c index 9305cf058ab..874344e9c04 100644 --- a/dlls/gdiplus/tests/pen.c +++ b/dlls/gdiplus/tests/pen.c @@ -350,6 +350,7 @@ static void test_compoundarray(void) { GpStatus status; GpPen *pen; + REAL *returnvalues; static const REAL testvalues[] = {0.2, 0.4, 0.6, 0.8}; static const REAL notSortedValues[] = {0.2, 0.6, 0.4, 0.8}; static const REAL negativeValues[] = {-1.2, 0.4, 0.6, 0.8}; @@ -398,10 +399,29 @@ static void test_compoundarray(void) count = 0; status = GdipGetPenCompoundCount(pen, &count); -todo_wine { expect(Ok, status); ok(count == 4, "Unexpected compound count %d\n", count); -} + + returnvalues = calloc(5, sizeof(REAL)); + /* When count larger than stored array return error */ + status = GdipGetPenCompoundArray(pen, returnvalues, 40); + expect(InvalidParameter, status); + status = GdipGetPenCompoundArray(NULL, returnvalues, 4); + expect(InvalidParameter, status); + /* When count is zero, it should do nothing */ + status = GdipGetPenCompoundArray(pen, returnvalues, 0); + expect(Ok, status); + ok(returnvalues[0] == 0.0, "Unexpected compound array %f\n", returnvalues[0]); + + status = GdipGetPenCompoundArray(pen, returnvalues, 4); + expect(Ok, status); + ok(memcmp(returnvalues, testvalues, 4 * sizeof(REAL)) == 0, "Unexpected compound array\n"); + + status = GdipGetPenCompoundArray(pen, returnvalues, -10); + expect(Ok, status); + ok(memcmp(returnvalues, testvalues, 4 * sizeof(REAL)) == 0, "Unexpected compound array\n"); + + free(returnvalues); GdipDeletePen(pen); } diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 5c9600ed30b..10f4d435a85 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -629,6 +629,7 @@ GpStatus WINGDIPAPI GdipCreatePen2(GpBrush*,REAL,GpUnit,GpPen**); GpStatus WINGDIPAPI GdipDeletePen(GpPen*); GpStatus WINGDIPAPI GdipGetPenBrushFill(GpPen*,GpBrush**); GpStatus WINGDIPAPI GdipGetPenColor(GpPen*,ARGB*); +GpStatus WINGDIPAPI GdipGetPenCompoundArray(GpPen*,REAL*,INT); GpStatus WINGDIPAPI GdipGetPenCompoundCount(GpPen*,INT*); GpStatus WINGDIPAPI GdipGetPenCustomStartCap(GpPen*,GpCustomLineCap**); GpStatus WINGDIPAPI GdipGetPenCustomEndCap(GpPen*,GpCustomLineCap**);
1
0
0
0
Bartosz Kosiorek : gdiplus: Add GdipGetPenCompoundCount implementation.
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: wine Branch: master Commit: e2e8487b99bd845fc1809efd809ca34762240836 URL:
https://gitlab.winehq.org/wine/wine/-/commit/e2e8487b99bd845fc1809efd809ca3…
Author: Bartosz Kosiorek <gang65(a)poczta.onet.pl> Date: Sat Oct 29 14:39:25 2022 +0200 gdiplus: Add GdipGetPenCompoundCount implementation. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52196
--- dlls/gdiplus/pen.c | 6 +++--- dlls/gdiplus/tests/pen.c | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/gdiplus/pen.c b/dlls/gdiplus/pen.c index 083406eedef..86e68e517fb 100644 --- a/dlls/gdiplus/pen.c +++ b/dlls/gdiplus/pen.c @@ -528,12 +528,12 @@ GpStatus WINGDIPAPI GdipSetPenColor(GpPen *pen, ARGB argb) GpStatus WINGDIPAPI GdipGetPenCompoundCount(GpPen *pen, INT *count) { - FIXME("(%p, %p): stub\n", pen, count); + TRACE("(%p, %p)\n", pen, count); if (!pen || !count) return InvalidParameter; - - return NotImplemented; + *count = pen->compound_array_size; + return Ok; } GpStatus WINGDIPAPI GdipSetPenCompoundArray(GpPen *pen, GDIPCONST REAL *compoundarray, diff --git a/dlls/gdiplus/tests/pen.c b/dlls/gdiplus/tests/pen.c index d1d19312878..9305cf058ab 100644 --- a/dlls/gdiplus/tests/pen.c +++ b/dlls/gdiplus/tests/pen.c @@ -370,10 +370,9 @@ static void test_compoundarray(void) count = 10; status = GdipGetPenCompoundCount(pen, &count); -todo_wine { expect(Ok, status); ok(count == 0, "Unexpected compound count %d\n", count); -} + status = GdipSetPenCompoundArray(pen, NULL, 0); expect(InvalidParameter, status); status = GdipSetPenCompoundArray(pen, NULL, 4);
1
0
0
0
Bartosz Kosiorek : gdiplus: Add GdipSetPenCompoundArray implementation.
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: wine Branch: master Commit: 9d5d4dba288c642521ecf73a33ec38567149f374 URL:
https://gitlab.winehq.org/wine/wine/-/commit/9d5d4dba288c642521ecf73a33ec38…
Author: Bartosz Kosiorek <gang65(a)poczta.onet.pl> Date: Sat Oct 29 14:39:20 2022 +0200 gdiplus: Add GdipSetPenCompoundArray implementation. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52196
--- dlls/gdiplus/gdiplus_private.h | 2 ++ dlls/gdiplus/graphicspath.c | 3 +++ dlls/gdiplus/pen.c | 26 ++++++++++++++++++++++---- dlls/gdiplus/tests/pen.c | 12 +++++++++++- 4 files changed, 38 insertions(+), 5 deletions(-) diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index 03bfa5513cb..0c55af6614a 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -235,6 +235,8 @@ struct GpPen{ GpBrush *brush; GpPenAlignment align; GpMatrix transform; + REAL *compound_array; + INT compound_array_size; }; struct GpGraphics{ diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index ce2666eedab..d98a5ae4bf6 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -2356,6 +2356,9 @@ GpStatus WINGDIPAPI GdipWidenPath(GpPath *path, GpPen *pen, GpMatrix *matrix, if (pen->align != PenAlignmentCenter) FIXME("unimplemented pen alignment %d\n", pen->align); + if (pen->compound_array_size != 0) + FIXME("unimplemented pen compoundline. Solid line will be drawn instead: %d\n", pen->compound_array_size); + for (i=0; i < flat_path->pathdata.Count; i++) { if ((types[i]&PathPointTypePathTypeMask) == PathPointTypeStart) diff --git a/dlls/gdiplus/pen.c b/dlls/gdiplus/pen.c index 32579adc484..083406eedef 100644 --- a/dlls/gdiplus/pen.c +++ b/dlls/gdiplus/pen.c @@ -171,6 +171,8 @@ GpStatus WINGDIPAPI GdipCreatePen2(GpBrush *brush, REAL width, GpUnit unit, gp_pen->offset = 0.0; gp_pen->customstart = NULL; gp_pen->customend = NULL; + gp_pen->compound_array = NULL; + gp_pen->compound_array_size = 0; GdipSetMatrixElements(&gp_pen->transform, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0); if(!((gp_pen->unit == UnitWorld) || (gp_pen->unit == UnitPixel))) { @@ -198,6 +200,7 @@ GpStatus WINGDIPAPI GdipDeletePen(GpPen *pen) GdipDeleteBrush(pen->brush); GdipDeleteCustomLineCap(pen->customstart); GdipDeleteCustomLineCap(pen->customend); + heap_free(pen->compound_array); heap_free(pen->dashes); heap_free(pen); @@ -533,15 +536,30 @@ GpStatus WINGDIPAPI GdipGetPenCompoundCount(GpPen *pen, INT *count) return NotImplemented; } -GpStatus WINGDIPAPI GdipSetPenCompoundArray(GpPen *pen, GDIPCONST REAL *dash, +GpStatus WINGDIPAPI GdipSetPenCompoundArray(GpPen *pen, GDIPCONST REAL *compoundarray, INT count) { - FIXME("(%p, %p, %i): stub\n", pen, dash, count); + INT i; + REAL *tmp; + TRACE("(%p, %p, %i)\n", pen, compoundarray, count); - if (!pen || !dash || count < 2 || count%2 == 1) + if(!pen || !compoundarray || count < 2 || count%2 == 1 || *compoundarray < 0.0 || *compoundarray > 1.0) return InvalidParameter; - return NotImplemented; + for(i = 1; i<count; i++) + { + if((compoundarray[i] < compoundarray[i - 1]) || (compoundarray[i] > 1.0)) + return InvalidParameter; + } + + tmp = heap_alloc_zero(count * sizeof(REAL)); + if(!tmp) + return OutOfMemory; + heap_free(pen->compound_array); + pen->compound_array = tmp; + memcpy(pen->compound_array, compoundarray, count * sizeof(REAL)); + pen->compound_array_size = count; + return Ok; } GpStatus WINGDIPAPI GdipSetPenCustomEndCap(GpPen *pen, GpCustomLineCap* customCap) diff --git a/dlls/gdiplus/tests/pen.c b/dlls/gdiplus/tests/pen.c index cd3e45f9b41..d1d19312878 100644 --- a/dlls/gdiplus/tests/pen.c +++ b/dlls/gdiplus/tests/pen.c @@ -351,6 +351,9 @@ static void test_compoundarray(void) GpStatus status; GpPen *pen; static const REAL testvalues[] = {0.2, 0.4, 0.6, 0.8}; + static const REAL notSortedValues[] = {0.2, 0.6, 0.4, 0.8}; + static const REAL negativeValues[] = {-1.2, 0.4, 0.6, 0.8}; + static const REAL tooLargeValues[] = {0.2, 0.4, 0.6, 2.8}; INT count; status = GdipSetPenCompoundArray(NULL, testvalues, 4); @@ -382,8 +385,15 @@ todo_wine { status = GdipSetPenCompoundArray(pen, testvalues, -2); expect(InvalidParameter, status); + status = GdipSetPenCompoundArray(pen, notSortedValues, 4); + expect(InvalidParameter, status); + status = GdipSetPenCompoundArray(pen, negativeValues, 4); + expect(InvalidParameter, status); + status = GdipSetPenCompoundArray(pen, tooLargeValues, 4); + expect(InvalidParameter, status); + status = GdipSetPenCompoundArray(pen, testvalues, 4); - todo_wine expect(Ok, status); + expect(Ok, status); status = GdipSetPenCompoundArray(pen, NULL, 0); expect(InvalidParameter, status);
1
0
0
0
Vladislav Timonin : d2d1: Implement ID2D1Device1::CreateDeviceContext.
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: wine Branch: master Commit: 4e734f48eb07c3d981829fc04d081b67feca9ed4 URL:
https://gitlab.winehq.org/wine/wine/-/commit/4e734f48eb07c3d981829fc04d081b…
Author: Vladislav Timonin <timoninvlad(a)yandex.ru> Date: Sat Oct 29 17:28:57 2022 +0700 d2d1: Implement ID2D1Device1::CreateDeviceContext. --- dlls/d2d1/device.c | 21 +++++++++++++-------- dlls/d2d1/tests/d2d1.c | 4 ++-- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/dlls/d2d1/device.c b/dlls/d2d1/device.c index ed7b43e05da..72781a48d10 100644 --- a/dlls/d2d1/device.c +++ b/dlls/d2d1/device.c @@ -4534,14 +4534,11 @@ static void WINAPI d2d_device_GetFactory(ID2D1Device1 *iface, ID2D1Factory **fac ID2D1Factory1_AddRef(device->factory); } -static HRESULT WINAPI d2d_device_CreateDeviceContext(ID2D1Device1 *iface, D2D1_DEVICE_CONTEXT_OPTIONS options, - ID2D1DeviceContext **context) -{ +static HRESULT d2d_device_create_device_context(ID2D1Device1 *iface, D2D1_DEVICE_CONTEXT_OPTIONS options, + ID2D1DeviceContext1 **context) { struct d2d_device_context *object; HRESULT hr; - TRACE("iface %p, options %#x, context %p.\n", iface, options, context); - if (options) FIXME("Options are ignored %#x.\n", options); @@ -4556,11 +4553,19 @@ static HRESULT WINAPI d2d_device_CreateDeviceContext(ID2D1Device1 *iface, D2D1_D } TRACE("Created device context %p.\n", object); - *context = (ID2D1DeviceContext *)&object->ID2D1DeviceContext1_iface; + *context = &object->ID2D1DeviceContext1_iface; return S_OK; } +static HRESULT WINAPI d2d_device_CreateDeviceContext(ID2D1Device1 *iface, D2D1_DEVICE_CONTEXT_OPTIONS options, + ID2D1DeviceContext **context) +{ + TRACE("iface %p, options %#x, context %p.\n", iface, options, context); + + return d2d_device_create_device_context(iface, options, (ID2D1DeviceContext1 **)context); +} + static HRESULT WINAPI d2d_device_CreatePrintControl(ID2D1Device1 *iface, IWICImagingFactory *wic_factory, IPrintDocumentPackageTarget *document_target, const D2D1_PRINT_CONTROL_PROPERTIES *desc, ID2D1PrintControl **print_control) @@ -4605,9 +4610,9 @@ static void WINAPI d2d_device_SetRenderingPriority(ID2D1Device1 *iface, D2D1_REN static HRESULT WINAPI d2d_device_CreateDeviceContext1(ID2D1Device1 *iface, D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext1 **context) { - FIXME("iface %p, options %#x, context %p.\n", iface, options, context); + TRACE("iface %p, options %#x, context %p.\n", iface, options, context); - return E_NOTIMPL; + return d2d_device_create_device_context(iface, options, context); } static const struct ID2D1Device1Vtbl d2d_device_vtbl = diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index 7560e44409e..99a1013a333 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -9199,9 +9199,9 @@ static void test_device_context(BOOL d3d11) ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Device1_CreateDeviceContext(device1, D2D1_DEVICE_CONTEXT_OPTIONS_NONE, &device_context1); - todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - if (hr == S_OK) ID2D1DeviceContext1_Release(device_context1); + ID2D1DeviceContext1_Release(device_context1); ID2D1Device1_Release(device1); }
1
0
0
0
Vladislav Timonin : d2d1: Update to ID2D1Device1.
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: wine Branch: master Commit: 34640a94b3092a83da6194655d8d1d60260c2fe7 URL:
https://gitlab.winehq.org/wine/wine/-/commit/34640a94b3092a83da6194655d8d1d…
Author: Vladislav Timonin <timoninvlad(a)yandex.ru> Date: Sat Oct 29 00:40:31 2022 +0700 d2d1: Update to ID2D1Device1. --- dlls/d2d1/d2d1_private.h | 2 +- dlls/d2d1/device.c | 66 +++++++++++++++++++++++++++++++++--------------- dlls/d2d1/factory.c | 21 +++++++++------ dlls/d2d1/tests/d2d1.c | 15 +++++++++++ 4 files changed, 74 insertions(+), 30 deletions(-)
1
0
0
0
Zebediah Figura : vkd3d-shader/hlsl: Propagate copies for resource store instructions.
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: vkd3d Branch: master Commit: c416627e6421b4b4903cae2947cf26aebf604e38 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/c416627e6421b4b4903cae2947cf2…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Tue Apr 5 18:26:22 2022 -0500 vkd3d-shader/hlsl: Propagate copies for resource store instructions. --- libs/vkd3d-shader/hlsl_codegen.c | 13 +++++++++++++ tests/uav.shader_test | 6 +++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index 2ebfa87b..6e650db0 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -790,6 +790,15 @@ static bool copy_propagation_transform_resource_load(struct hlsl_ctx *ctx, return progress; } +static bool copy_propagation_transform_resource_store(struct hlsl_ctx *ctx, + struct hlsl_ir_resource_store *store, struct copy_propagation_state *state) +{ + bool progress = false; + + progress |= copy_propagation_transform_object_load(ctx, &store->resource, state); + return progress; +} + static void copy_propagation_record_store(struct hlsl_ctx *ctx, struct hlsl_ir_store *store, struct copy_propagation_state *state) { @@ -936,6 +945,10 @@ static bool copy_propagation_transform_block(struct hlsl_ctx *ctx, struct hlsl_b progress |= copy_propagation_transform_resource_load(ctx, hlsl_ir_resource_load(instr), state); break; + case HLSL_IR_RESOURCE_STORE: + progress |= copy_propagation_transform_resource_store(ctx, hlsl_ir_resource_store(instr), state); + break; + case HLSL_IR_STORE: copy_propagation_record_store(ctx, hlsl_ir_store(instr), state); break; diff --git a/tests/uav.shader_test b/tests/uav.shader_test index 8048af16..92ac8c4d 100644 --- a/tests/uav.shader_test +++ b/tests/uav.shader_test @@ -49,7 +49,7 @@ float4 main() : sv_target } [test] -todo draw quad +draw quad probe uav 1 (0, 0) r (0.5) probe uav 1 (0, 1) r (0.6) probe uav 1 (1, 0) r (0.2) @@ -99,7 +99,7 @@ float4 main() : sv_target1 } [test] -todo draw quad +draw quad probe uav 2 (0, 0) rgba (0.9, 0.8, 0.7, 0.6) @@ -118,7 +118,7 @@ float4 main() : sv_target1 } [test] -todo draw quad +draw quad probe uav 3 (0, 0) rgba (0.9, 0.8, 0.7, 0.6) % Test that we can declare and use an array of UAVs.
1
0
0
0
Zebediah Figura : vkd3d-shader/hlsl: Write SM4 UAV store instructions.
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: vkd3d Branch: master Commit: 9bdae4dfaad3ace7336768463e139c0f67fc8f95 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/9bdae4dfaad3ace7336768463e139…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sun Aug 15 12:24:55 2021 -0500 vkd3d-shader/hlsl: Write SM4 UAV store instructions. --- libs/vkd3d-shader/hlsl_sm4.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/libs/vkd3d-shader/hlsl_sm4.c b/libs/vkd3d-shader/hlsl_sm4.c index f31ee169..d3e1cbfa 100644 --- a/libs/vkd3d-shader/hlsl_sm4.c +++ b/libs/vkd3d-shader/hlsl_sm4.c @@ -1608,6 +1608,24 @@ static void write_sm4_cast(struct hlsl_ctx *ctx, } } +static void write_sm4_store_uav_typed(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer *buffer, + const struct hlsl_deref *dst, const struct hlsl_ir_node *coords, const struct hlsl_ir_node *value) +{ + struct sm4_instruction instr; + + memset(&instr, 0, sizeof(instr)); + instr.opcode = VKD3D_SM5_OP_STORE_UAV_TYPED; + + sm4_register_from_deref(ctx, &instr.dsts[0].reg, &instr.dsts[0].writemask, NULL, dst, dst->var->data_type); + instr.dst_count = 1; + + sm4_src_from_node(&instr.srcs[0], coords, VKD3DSP_WRITEMASK_ALL); + sm4_src_from_node(&instr.srcs[1], value, VKD3DSP_WRITEMASK_ALL); + instr.src_count = 2; + + write_sm4_instruction(buffer, &instr); +} + static void write_sm4_expr(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer *buffer, const struct hlsl_ir_expr *expr) { @@ -2176,6 +2194,27 @@ static void write_sm4_resource_load(struct hlsl_ctx *ctx, } } +static void write_sm4_resource_store(struct hlsl_ctx *ctx, + struct vkd3d_bytecode_buffer *buffer, const struct hlsl_ir_resource_store *store) +{ + const struct hlsl_type *resource_type = store->resource.var->data_type; + + if (resource_type->type != HLSL_CLASS_OBJECT) + { + assert(resource_type->type == HLSL_CLASS_ARRAY || resource_type->type == HLSL_CLASS_STRUCT); + hlsl_fixme(ctx, &store->node.loc, "Resource being a component of another variable."); + return; + } + + if (!store->resource.var->is_uniform) + { + hlsl_fixme(ctx, &store->node.loc, "Store to non-uniform resource variable."); + return; + } + + write_sm4_store_uav_typed(ctx, buffer, &store->resource, store->coords.node, store->value.node); +} + static void write_sm4_store(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer *buffer, const struct hlsl_ir_store *store) { @@ -2261,6 +2300,10 @@ static void write_sm4_block(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer * write_sm4_resource_load(ctx, buffer, hlsl_ir_resource_load(instr)); break; + case HLSL_IR_RESOURCE_STORE: + write_sm4_resource_store(ctx, buffer, hlsl_ir_resource_store(instr)); + break; + case HLSL_IR_LOOP: write_sm4_loop(ctx, buffer, hlsl_ir_loop(instr)); break;
1
0
0
0
Zebediah Figura : vkd3d-shader/hlsl: Parse UAV stores.
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: vkd3d Branch: master Commit: 03f9d16047ddd09d18d441af9cd519c88dbfa132 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/03f9d16047ddd09d18d441af9cd51…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sun Aug 15 12:08:32 2021 -0500 vkd3d-shader/hlsl: Parse UAV stores. --- libs/vkd3d-shader/hlsl.c | 52 ++++++++++++++++++++++++++++++++++++---- libs/vkd3d-shader/hlsl.h | 17 +++++++++++++ libs/vkd3d-shader/hlsl.y | 51 +++++++++++++++++++++++++++++++++++---- libs/vkd3d-shader/hlsl_codegen.c | 17 +++++++++++++ 4 files changed, 127 insertions(+), 10 deletions(-)
1
0
0
0
Zebediah Figura : vkd3d-shader/hlsl: Implement typed UAV loads.
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: vkd3d Branch: master Commit: 0a2aaa690ea9d7c5fd9fef07bc9a37c6aaf2fc77 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/0a2aaa690ea9d7c5fd9fef07bc9a3…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sun Aug 15 12:05:54 2021 -0500 vkd3d-shader/hlsl: Implement typed UAV loads. --- libs/vkd3d-shader/hlsl.y | 3 ++- libs/vkd3d-shader/hlsl_sm4.c | 30 ++++++++++++++++++++++-------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 7ada218c..d76ea92e 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -786,7 +786,8 @@ static bool add_array_load(struct hlsl_ctx *ctx, struct list *instrs, struct hls const struct hlsl_type *expr_type = array->data_type, *index_type = index->data_type; struct hlsl_ir_expr *cast; - if (expr_type->type == HLSL_CLASS_OBJECT && expr_type->base_type == HLSL_TYPE_TEXTURE + if (expr_type->type == HLSL_CLASS_OBJECT + && (expr_type->base_type == HLSL_TYPE_TEXTURE || expr_type->base_type == HLSL_TYPE_UAV) && expr_type->sampler_dim != HLSL_SAMPLER_DIM_GENERIC) { struct hlsl_resource_load_params load_params = {.type = HLSL_RESOURCE_LOAD}; diff --git a/libs/vkd3d-shader/hlsl_sm4.c b/libs/vkd3d-shader/hlsl_sm4.c index 7884b4e7..f31ee169 100644 --- a/libs/vkd3d-shader/hlsl_sm4.c +++ b/libs/vkd3d-shader/hlsl_sm4.c @@ -855,6 +855,16 @@ static void sm4_register_from_deref(struct hlsl_ctx *ctx, struct sm4_register *r reg->idx_count = 1; *writemask = VKD3DSP_WRITEMASK_ALL; } + else if (data_type->type == HLSL_CLASS_OBJECT && data_type->base_type == HLSL_TYPE_UAV) + { + reg->type = VKD3D_SM5_RT_UAV; + reg->dim = VKD3D_SM4_DIMENSION_VEC4; + if (swizzle_type) + *swizzle_type = VKD3D_SM4_SWIZZLE_VEC4; + reg->idx[0] = var->reg.id; + reg->idx_count = 1; + *writemask = VKD3DSP_WRITEMASK_ALL; + } else if (data_type->type == HLSL_CLASS_OBJECT && data_type->base_type == HLSL_TYPE_SAMPLER) { reg->type = VKD3D_SM4_RT_SAMPLER; @@ -1397,24 +1407,28 @@ static void write_sm4_ld(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer *buf const struct hlsl_type *resource_type, const struct hlsl_ir_node *dst, const struct hlsl_deref *resource, const struct hlsl_ir_node *coords) { + bool uav = (resource_type->base_type == HLSL_TYPE_UAV); struct sm4_instruction instr; unsigned int dim_count; memset(&instr, 0, sizeof(instr)); - instr.opcode = VKD3D_SM4_OP_LD; + instr.opcode = uav ? VKD3D_SM5_OP_LD_UAV_TYPED : VKD3D_SM4_OP_LD; sm4_dst_from_node(&instr.dsts[0], dst); instr.dst_count = 1; sm4_src_from_node(&instr.srcs[0], coords, VKD3DSP_WRITEMASK_ALL); - /* Mipmap level is in the last component in the IR, but needs to be in the W - * component in the instruction. */ - dim_count = hlsl_sampler_dim_count(resource_type->sampler_dim); - if (dim_count == 1) - instr.srcs[0].swizzle = hlsl_combine_swizzles(instr.srcs[0].swizzle, HLSL_SWIZZLE(X, X, X, Y), 4); - if (dim_count == 2) - instr.srcs[0].swizzle = hlsl_combine_swizzles(instr.srcs[0].swizzle, HLSL_SWIZZLE(X, Y, X, Z), 4); + if (!uav) + { + /* Mipmap level is in the last component in the IR, but needs to be in the W + * component in the instruction. */ + dim_count = hlsl_sampler_dim_count(resource_type->sampler_dim); + if (dim_count == 1) + instr.srcs[0].swizzle = hlsl_combine_swizzles(instr.srcs[0].swizzle, HLSL_SWIZZLE(X, X, X, Y), 4); + if (dim_count == 2) + instr.srcs[0].swizzle = hlsl_combine_swizzles(instr.srcs[0].swizzle, HLSL_SWIZZLE(X, Y, X, Z), 4); + } sm4_src_from_deref(ctx, &instr.srcs[1], resource, resource_type, instr.dsts[0].writemask);
1
0
0
0
Zebediah Figura : vkd3d-shader/hlsl: Write SM4 UAV declarations.
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: vkd3d Branch: master Commit: 12e397de9a7ce4bc32269d5578accb6a948d08c3 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/12e397de9a7ce4bc32269d5578acc…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sun Aug 15 13:03:28 2021 -0500 vkd3d-shader/hlsl: Write SM4 UAV declarations. --- libs/vkd3d-shader/hlsl_sm4.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/vkd3d-shader/hlsl_sm4.c b/libs/vkd3d-shader/hlsl_sm4.c index 8ca37f3f..7884b4e7 100644 --- a/libs/vkd3d-shader/hlsl_sm4.c +++ b/libs/vkd3d-shader/hlsl_sm4.c @@ -1140,12 +1140,13 @@ static void write_sm4_dcl_sampler(struct vkd3d_bytecode_buffer *buffer, const st static void write_sm4_dcl_texture(struct vkd3d_bytecode_buffer *buffer, const struct hlsl_ir_var *var) { + bool uav = (var->data_type->base_type == HLSL_TYPE_UAV); const struct sm4_instruction instr = { - .opcode = VKD3D_SM4_OP_DCL_RESOURCE + .opcode = (uav ? VKD3D_SM5_OP_DCL_UAV_TYPED : VKD3D_SM4_OP_DCL_RESOURCE) | (sm4_resource_dimension(var->data_type) << VKD3D_SM4_RESOURCE_TYPE_SHIFT), - .dsts[0].reg.type = VKD3D_SM4_RT_RESOURCE, + .dsts[0].reg.type = uav ? VKD3D_SM5_RT_UAV : VKD3D_SM4_RT_RESOURCE, .dsts[0].reg.idx = {var->reg.id}, .dsts[0].reg.idx_count = 1, .dst_count = 1, @@ -2302,7 +2303,7 @@ static void write_sm4_shdr(struct hlsl_ctx *ctx, if (var->data_type->base_type == HLSL_TYPE_SAMPLER) write_sm4_dcl_sampler(&buffer, var); - else if (var->data_type->base_type == HLSL_TYPE_TEXTURE) + else if (var->data_type->base_type == HLSL_TYPE_TEXTURE || var->data_type->base_type == HLSL_TYPE_UAV) write_sm4_dcl_texture(&buffer, var); }
1
0
0
0
Zebediah Figura : vkd3d-shader/hlsl: Allocate UAVs.
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: vkd3d Branch: master Commit: 2ec67e0f104da7cb8002f7deacd67f15bbbfa284 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/2ec67e0f104da7cb8002f7deacd67…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Aug 12 21:26:15 2021 -0500 vkd3d-shader/hlsl: Allocate UAVs. --- libs/vkd3d-shader/hlsl_codegen.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index aacaa95c..3e36aa05 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -2284,6 +2284,7 @@ object_types[] = { { HLSL_TYPE_SAMPLER, 's' }, { HLSL_TYPE_TEXTURE, 't' }, + { HLSL_TYPE_UAV, 'u' }, }; static const struct object_type_info *get_object_type_info(enum hlsl_base_type type) @@ -2302,7 +2303,20 @@ static void allocate_objects(struct hlsl_ctx *ctx, enum hlsl_base_type type) { const struct object_type_info *type_info = get_object_type_info(type); struct hlsl_ir_var *var; - uint32_t index = 0; + uint32_t min_index = 0; + uint32_t index; + + if (type == HLSL_TYPE_UAV) + { + LIST_FOR_EACH_ENTRY(var, &ctx->extern_vars, struct hlsl_ir_var, extern_entry) + { + if (var->semantic.name && (!ascii_strcasecmp(var->semantic.name, "color") + || !ascii_strcasecmp(var->semantic.name, "sv_target"))) + min_index = max(min_index, var->semantic.index + 1); + } + } + + index = min_index; LIST_FOR_EACH_ENTRY(var, &ctx->extern_vars, struct hlsl_ir_var, extern_entry) { @@ -2315,7 +2329,13 @@ static void allocate_objects(struct hlsl_ctx *ctx, enum hlsl_base_type type) const struct hlsl_ir_var *reserved_object = get_reserved_object(ctx, type_info->reg_name, var->reg_reservation.index); - if (reserved_object && reserved_object != var) + if (var->reg_reservation.index < min_index) + { + hlsl_error(ctx, &var->loc, VKD3D_SHADER_ERROR_HLSL_OVERLAPPING_RESERVATIONS, + "UAV index (%u) must be higher than the maximum render target index (%u).", + var->reg_reservation.index, min_index - 1); + } + else if (reserved_object && reserved_object != var) { hlsl_error(ctx, &var->loc, VKD3D_SHADER_ERROR_HLSL_OVERLAPPING_RESERVATIONS, "Multiple objects bound to %c%u.", type_info->reg_name, @@ -2578,6 +2598,7 @@ int hlsl_emit_bytecode(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *entry { allocate_buffers(ctx); allocate_objects(ctx, HLSL_TYPE_TEXTURE); + allocate_objects(ctx, HLSL_TYPE_UAV); } allocate_semantic_registers(ctx); allocate_objects(ctx, HLSL_TYPE_SAMPLER);
1
0
0
0
Francisco Casas : tests: Add a test for storing to a UAV array.
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: vkd3d Branch: master Commit: 4096d453c40b14d25c4561bc2e00f4e72ec62a06 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/4096d453c40b14d25c4561bc2e00f…
Author: Francisco Casas <fcasas(a)codeweavers.com> Date: Tue Oct 25 23:44:00 2022 -0500 tests: Add a test for storing to a UAV array. --- tests/uav.shader_test | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/uav.shader_test b/tests/uav.shader_test index bc2fcb4d..8048af16 100644 --- a/tests/uav.shader_test +++ b/tests/uav.shader_test @@ -120,3 +120,30 @@ float4 main() : sv_target1 [test] todo draw quad probe uav 3 (0, 0) rgba (0.9, 0.8, 0.7, 0.6) + +% Test that we can declare and use an array of UAVs. + +[uav 2] +size (1, 1) + +0.1 0.2 0.3 0.4 + +[uav 3] +size (1, 1) + +0.5 0.6 0.7 0.8 + +[pixel shader] +RWTexture2D<float4> u[2] : register(u2); + +float4 main() : sv_target1 +{ + u[0][uint2(0, 0)] = float4(1.1, 1.2, 1.3, 1.4); + u[1][uint2(0, 0)] = float4(2.1, 2.2, 2.3, 2.4); + return 0; +} + +[test] +todo draw quad +probe uav 2 (0, 0) rgba (1.1, 1.2, 1.3, 1.4) +probe uav 3 (0, 0) rgba (2.1, 2.2, 2.3, 2.4)
1
0
0
0
Zebediah Figura : tests: Add more tests for UAV allocation.
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: vkd3d Branch: master Commit: 8044fce040619235f69534441515c4ce68d1b5ba URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/8044fce040619235f69534441515c…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Oct 13 23:03:24 2022 -0500 tests: Add more tests for UAV allocation. --- tests/uav.shader_test | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/tests/uav.shader_test b/tests/uav.shader_test index 297cf14a..bc2fcb4d 100644 --- a/tests/uav.shader_test +++ b/tests/uav.shader_test @@ -22,6 +22,7 @@ float4 main() : sv_target return 0; } + [uav 1] format r32 float size (2, 2) @@ -54,3 +55,68 @@ probe uav 1 (0, 1) r (0.6) probe uav 1 (1, 0) r (0.2) probe uav 1 (1, 1) r (0.7) probe uav 2 (0, 0) rgba (2.0, 1.0, 4.0, 3.0) + + +% UAVs are implicitly allocated starting from the highest render target slot. +% They cannot overlap render target slots, and also cannot be allocated any +% lower than the highest render target. +% This ceases to be true with shader model 5.1. + +[render target 1] +format r32g32b32a32 float +size (640, 480) + +[uav 2] +size (1, 1) + +0.1 0.2 0.3 0.4 + +[pixel shader fail] +RWTexture2D<float4> u : register(u0); + +float4 main() : sv_target1 +{ + u[uint2(0, 0)] = float4(0.9, 0.8, 0.7, 0.6); + return 0; +} + +[pixel shader fail] +RWTexture2D<float4> u : register(u1); + +float4 main() : sv_target1 +{ + u[uint2(0, 0)] = float4(0.9, 0.8, 0.7, 0.6); + return 0; +} + +[pixel shader] +RWTexture2D<float4> u; + +float4 main() : sv_target1 +{ + u[uint2(0, 0)] = float4(0.9, 0.8, 0.7, 0.6); + return 0; +} + +[test] +todo draw quad +probe uav 2 (0, 0) rgba (0.9, 0.8, 0.7, 0.6) + + +[uav 3] +size (1, 1) + +0.1 0.2 0.3 0.4 + +[pixel shader] +RWTexture2D<float4> u : register(u3); + +float4 main() : sv_target1 +{ + u[uint2(0, 0)] = float4(0.9, 0.8, 0.7, 0.6); + return 0; +} + +[test] +todo draw quad +probe uav 3 (0, 0) rgba (0.9, 0.8, 0.7, 0.6)
1
0
0
0
Zebediah Figura : tests: Fix constructor declaration in the partial UAV write test.
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: vkd3d Branch: master Commit: 52069386c492c48b8dc0cbc7977a8ad835a9c283 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/52069386c492c48b8dc0cbc7977a8…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Tue Oct 25 23:14:43 2022 -0500 tests: Fix constructor declaration in the partial UAV write test. Make sure the test fails for the right reason. Spotted by Francisco Casas. --- tests/uav.shader_test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/uav.shader_test b/tests/uav.shader_test index 09ca05ec..297cf14a 100644 --- a/tests/uav.shader_test +++ b/tests/uav.shader_test @@ -7,8 +7,8 @@ RWTexture2D<float4> u; float4 main() : sv_target { /* All four components must be written in a single statement. */ - u[uint2(0, 0)].xy = float4(1, 2); - u[uint2(0, 0)].zw = float4(3, 4); + u[uint2(0, 0)].xy = float2(1, 2); + u[uint2(0, 0)].zw = float2(3, 4); return 0; }
1
0
0
0
Francois Gouget : testbot/WineRunBuild: Adapt to the new executable paths.
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: tools Branch: master Commit: 75f883abfde030501c708b2537a75ff592125d28 URL:
https://gitlab.winehq.org/winehq/tools/-/commit/75f883abfde030501c708b2537a…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Thu Oct 27 17:33:23 2022 +0200 testbot/WineRunBuild: Adapt to the new executable paths. The executables are now in architecture-specific subdirectories. --- testbot/bin/WineRunBuild.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/testbot/bin/WineRunBuild.pl b/testbot/bin/WineRunBuild.pl index 67c5c8b8..c664a8b8 100755 --- a/testbot/bin/WineRunBuild.pl +++ b/testbot/bin/WineRunBuild.pl @@ -470,9 +470,10 @@ foreach my $Module (values %{$Impacts->{Modules}}) next if (!$TestExes{$Local}); Debug(Elapsed($Start), " Retrieving '$Local'\n"); - my $BuildDir = "wine-$TestExes{$Local}"; - if ($TA->GetFile("$BuildDir/$Module->{Path}/$Module->{ExeBase}.exe", - "$StepDir/$Local")) + my $BuildPath = "wine-$TestExes{$Local}/$Module->{Path}/". + ($Bits ? "x86_64" : "i386") + ."-windows/$Module->{ExeBase}.exe"; + if ($TA->GetFile($BuildPath, "$StepDir/$Local")) { chmod 0664, "$StepDir/$Local"; }
1
0
0
0
Francois Gouget : testbot/build: Adapt to the new executable paths.
by Alexandre Julliard
31 Oct '22
31 Oct '22
Module: tools Branch: master Commit: c187941e4d360bd54209dfa44be2a97b822a33e4 URL:
https://gitlab.winehq.org/winehq/tools/-/commit/c187941e4d360bd54209dfa44be…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Thu Oct 27 17:26:54 2022 +0200 testbot/build: Adapt to the new executable paths. The executables are now in architecture-specific subdirectories. --- testbot/bin/build/WineTest.pl | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/testbot/bin/build/WineTest.pl b/testbot/bin/build/WineTest.pl index 73cd660c..c92d5914 100755 --- a/testbot/bin/build/WineTest.pl +++ b/testbot/bin/build/WineTest.pl @@ -41,6 +41,8 @@ sub BEGIN $::BuildEnv = 1; } +use File::Basename; + use Build::Utils; use WineTestBot::Config; use WineTestBot::Missions; @@ -77,6 +79,16 @@ sub SetupTest($$) return $BaseName; } +sub GetModuleExePath($$;$) +{ + my ($Mission, $ModulePath, $ExeFileName) = @_; + + $ExeFileName ||= basename($ModulePath) .".exe"; + return join("/", GetWineDir($Mission), $ModulePath, + ($Mission->{Build} eq "wow64" ? "x86_64" : "i386") ."-windows", + $ExeFileName); +} + sub WineTestSuite($$$$) { my ($Mission, $NoSubmit, $BaseTag, $Args) = @_; @@ -85,8 +97,8 @@ sub WineTestSuite($$$$) # there are test failures. my $BaseName = SetupTest("WineTest", $Mission); my $Tag = SanitizeTag("$BaseTag-$BaseName"); - my $WineDir = GetWineDir($Mission); - RunWine($Mission, "$WineDir/programs/winetest/winetest.exe", + my $WineTestPath = GetModuleExePath($Mission, "programs/winetest"); + RunWine($Mission, $WineTestPath, "-c -o '$DataDir/$BaseName.report' -t $Tag ". ShArgv2Cmd(@$Args)); if (!-f "$DataDir/$BaseName.report") { @@ -96,8 +108,7 @@ sub WineTestSuite($$$$) # Send the report to the website if ((!$NoSubmit and !$Mission->{nosubmit}) and - RunWine($Mission, "$WineDir/programs/winetest/winetest.exe", - "-c -s '$DataDir/$BaseName.report'")) + RunWine($Mission, $WineTestPath, "-c -s '$DataDir/$BaseName.report'")) { LogMsg "WineTest failed to send the $BaseName report\n"; # Soldier on in case it's just a network issue @@ -142,8 +153,7 @@ sub TestPatch($$) # Run WineTest. Ignore the exit code since it returns non-zero whenever # there are test failures. my $BaseName = SetupTest("the tests", $Mission); - my $WineDir = GetWineDir($Mission); - RunWine($Mission, "$WineDir/programs/winetest/winetest.exe", + RunWine($Mission, GetModuleExePath($Mission, "programs/winetest"), "-c -o '$DataDir/$BaseName.report' -t do.not.submit ". join(" ", @TestList)); if (!-f "$DataDir/$BaseName.report") @@ -164,8 +174,7 @@ sub GetExecutable($$$) my $Dst = "$DataDir/staging/$TestExecutable"; unlink $Dst; - my $WineDir = GetWineDir($Mission); - if (!symlink "$WineDir/$Module->{Path}/$TestExecutable", $Dst) + if (!symlink GetModuleExePath($Mission, $Module->{Path}, $TestExecutable), $Dst) { LogMsg "Could not find $TestExecutable: $!\n"; return undef; @@ -191,6 +200,7 @@ sub TestExe($$$) LogMsg "Could not create '$FileName' in the test directory: $!\n"; return 0; } + $FileName = ".\\$FileName"; } # Run the test executable
1
0
0
0
Connor McAdams : uiautomationcore: Add support for UIAutomationType_IntArray property comparisons.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: wine Branch: master Commit: 2cfcddb2fefaf6b3c26d213ae6be2b0d355ec8f3 URL:
https://gitlab.winehq.org/wine/wine/-/commit/2cfcddb2fefaf6b3c26d213ae6be2b…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Wed Oct 26 10:39:36 2022 -0400 uiautomationcore: Add support for UIAutomationType_IntArray property comparisons. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/uiautomationcore/tests/uiautomation.c | 51 ++++++++++++++---------------- dlls/uiautomationcore/uia_client.c | 50 +++++++++++++++++++++-------- dlls/uiautomationcore/uia_private.h | 2 +- dlls/uiautomationcore/uia_provider.c | 2 +- 4 files changed, 62 insertions(+), 43 deletions(-) diff --git a/dlls/uiautomationcore/tests/uiautomation.c b/dlls/uiautomationcore/tests/uiautomation.c index 7a79ea2a4a5..91c9e75c46a 100644 --- a/dlls/uiautomationcore/tests/uiautomation.c +++ b/dlls/uiautomationcore/tests/uiautomation.c @@ -7257,17 +7257,15 @@ static void test_UiaGetUpdatedCache(void) tree_struct = NULL; out_req = NULL; hr = UiaGetUpdatedCache(node, &cache_req, NormalizeState_View, NULL, &out_req, &tree_struct); - todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - todo_wine ok(!!out_req, "out_req == NULL\n"); - todo_wine ok(!!tree_struct, "tree_struct == NULL\n"); - if (out_req) - { - exp_lbound[0] = exp_lbound[1] = 0; - exp_elems[0] = exp_elems[1] = 1; - test_cache_req_sa(out_req, exp_lbound, exp_elems, exp_node_desc); - ok(!wcscmp(tree_struct, L"P)"), "tree structure %s\n", debugstr_w(tree_struct)); - ok_method_sequence(cache_req_seq4, NULL); - } + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(!!out_req, "out_req == NULL\n"); + ok(!!tree_struct, "tree_struct == NULL\n"); + + exp_lbound[0] = exp_lbound[1] = 0; + exp_elems[0] = exp_elems[1] = 1; + test_cache_req_sa(out_req, exp_lbound, exp_elems, exp_node_desc); + ok(!wcscmp(tree_struct, L"P)"), "tree structure %s\n", debugstr_w(tree_struct)); + ok_method_sequence(cache_req_seq4, NULL); SafeArrayDestroy(out_req); SysFreeString(tree_struct); @@ -7286,13 +7284,12 @@ static void test_UiaGetUpdatedCache(void) tree_struct = NULL; out_req = NULL; hr = UiaGetUpdatedCache(node, &cache_req, NormalizeState_View, NULL, &out_req, &tree_struct); - todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - if (SUCCEEDED(hr)) - ok_method_sequence(cache_req_seq5, NULL); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok_method_sequence(cache_req_seq5, NULL); ok(!out_req, "out_req != NULL\n"); - todo_wine ok(!!tree_struct, "tree_struct == NULL\n"); - if (tree_struct) - ok(!wcscmp(tree_struct, L""), "tree structure %s\n", debugstr_w(tree_struct)); + ok(!!tree_struct, "tree_struct == NULL\n"); + ok(!wcscmp(tree_struct, L""), "tree structure %s\n", debugstr_w(tree_struct)); + SysFreeString(tree_struct); VariantClear(&v); } @@ -7312,17 +7309,15 @@ static void test_UiaGetUpdatedCache(void) tree_struct = NULL; out_req = NULL; hr = UiaGetUpdatedCache(node, &cache_req, NormalizeState_View, NULL, &out_req, &tree_struct); - todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - todo_wine ok(!!out_req, "out_req == NULL\n"); - todo_wine ok(!!tree_struct, "tree_struct == NULL\n"); - if (out_req) - { - exp_lbound[0] = exp_lbound[1] = 0; - exp_elems[0] = exp_elems[1] = 1; - test_cache_req_sa(out_req, exp_lbound, exp_elems, exp_node_desc); - ok(!wcscmp(tree_struct, L"P)"), "tree structure %s\n", debugstr_w(tree_struct)); - ok_method_sequence(cache_req_seq6, NULL); - } + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(!!out_req, "out_req == NULL\n"); + ok(!!tree_struct, "tree_struct == NULL\n"); + + exp_lbound[0] = exp_lbound[1] = 0; + exp_elems[0] = exp_elems[1] = 1; + test_cache_req_sa(out_req, exp_lbound, exp_elems, exp_node_desc); + ok(!wcscmp(tree_struct, L"P)"), "tree structure %s\n", debugstr_w(tree_struct)); + ok_method_sequence(cache_req_seq6, NULL); SafeArrayDestroy(out_req); SysFreeString(tree_struct); diff --git a/dlls/uiautomationcore/uia_client.c b/dlls/uiautomationcore/uia_client.c index 328afa7acb2..11a6e3ffc45 100644 --- a/dlls/uiautomationcore/uia_client.c +++ b/dlls/uiautomationcore/uia_client.c @@ -49,7 +49,7 @@ static HRESULT get_safearray_bounds(SAFEARRAY *sa, LONG *lbound, LONG *elems) return S_OK; } -int uia_compare_runtime_ids(SAFEARRAY *sa1, SAFEARRAY *sa2) +int uia_compare_safearrays(SAFEARRAY *sa1, SAFEARRAY *sa2, int prop_type) { LONG i, idx, lbound[2], elems[2]; int val[2]; @@ -72,6 +72,12 @@ int uia_compare_runtime_ids(SAFEARRAY *sa1, SAFEARRAY *sa2) if (elems[0] != elems[1]) return (elems[0] > elems[1]) - (elems[0] < elems[1]); + if (prop_type != UIAutomationType_IntArray) + { + FIXME("Array type %#x value comparsion currently unimplemented.\n", prop_type); + return -1; + } + for (i = 0; i < elems[0]; i++) { idx = lbound[0] + i; @@ -1932,18 +1938,7 @@ static HRESULT uia_property_condition_check(HUIANODE node, struct UiaPropertyCon switch (prop_info->type) { case UIAutomationType_Bool: - hr = UiaGetPropertyValue(node, prop_info->prop_id, &v); - if (FAILED(hr) || V_VT(&v) == VT_UNKNOWN) - { - hr = S_FALSE; - break; - } - - if ((V_VT(&v) == V_VT(&prop_cond->Value)) && (V_BOOL(&v) == V_BOOL(&prop_cond->Value))) - hr = S_OK; - else - hr = S_FALSE; - + case UIAutomationType_IntArray: break; default: @@ -1951,6 +1946,35 @@ static HRESULT uia_property_condition_check(HUIANODE node, struct UiaPropertyCon return E_NOTIMPL; } + hr = UiaGetPropertyValue(node, prop_info->prop_id, &v); + if (FAILED(hr) || V_VT(&v) == VT_UNKNOWN) + return S_FALSE; + + if (V_VT(&v) == V_VT(&prop_cond->Value)) + { + switch (prop_info->type) + { + case UIAutomationType_Bool: + if (V_BOOL(&v) == V_BOOL(&prop_cond->Value)) + hr = S_OK; + else + hr = S_FALSE; + break; + + case UIAutomationType_IntArray: + if (!uia_compare_safearrays(V_ARRAY(&v), V_ARRAY(&prop_cond->Value), prop_info->type)) + hr = S_OK; + else + hr = S_FALSE; + break; + + default: + break; + } + } + else + hr = S_FALSE; + VariantClear(&v); return hr; } diff --git a/dlls/uiautomationcore/uia_private.h b/dlls/uiautomationcore/uia_private.h index 697a1d6aa4e..39c9aac847b 100644 --- a/dlls/uiautomationcore/uia_private.h +++ b/dlls/uiautomationcore/uia_private.h @@ -87,7 +87,7 @@ static inline struct uia_provider *impl_from_IWineUiaProvider(IWineUiaProvider * } /* uia_client.c */ -int uia_compare_runtime_ids(SAFEARRAY *sa1, SAFEARRAY *sa2) DECLSPEC_HIDDEN; +int uia_compare_safearrays(SAFEARRAY *sa1, SAFEARRAY *sa2, int prop_type) DECLSPEC_HIDDEN; int get_node_provider_type_at_idx(struct uia_node *node, int idx) DECLSPEC_HIDDEN; HRESULT create_uia_node_from_elprov(IRawElementProviderSimple *elprov, HUIANODE *out_node, BOOL get_hwnd_providers) DECLSPEC_HIDDEN; diff --git a/dlls/uiautomationcore/uia_provider.c b/dlls/uiautomationcore/uia_provider.c index e88d4be9565..fc718fabe43 100644 --- a/dlls/uiautomationcore/uia_provider.c +++ b/dlls/uiautomationcore/uia_provider.c @@ -1159,7 +1159,7 @@ struct uia_provider_thread_map_entry static int uia_runtime_id_compare(const void *key, const struct rb_entry *entry) { struct uia_provider_thread_map_entry *prov_entry = RB_ENTRY_VALUE(entry, struct uia_provider_thread_map_entry, entry); - return uia_compare_runtime_ids(prov_entry->runtime_id, (SAFEARRAY *)key); + return uia_compare_safearrays(prov_entry->runtime_id, (SAFEARRAY *)key, UIAutomationType_IntArray); } void uia_provider_thread_remove_node(HUIANODE node)
1
0
0
0
Connor McAdams : uiautomationcore: Implement ConditionType_Property conditional for UIAutomationType_Bool properties.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: wine Branch: master Commit: c183afbf4c2067a4bc0a66895edca1243d1ab604 URL:
https://gitlab.winehq.org/wine/wine/-/commit/c183afbf4c2067a4bc0a66895edca1…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Wed Oct 26 10:03:53 2022 -0400 uiautomationcore: Implement ConditionType_Property conditional for UIAutomationType_Bool properties. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/uiautomationcore/tests/uiautomation.c | 35 +++++++++++++-------------- dlls/uiautomationcore/uia_client.c | 38 ++++++++++++++++++++++++++++-- 2 files changed, 52 insertions(+), 21 deletions(-) diff --git a/dlls/uiautomationcore/tests/uiautomation.c b/dlls/uiautomationcore/tests/uiautomation.c index 19cebf79143..7a79ea2a4a5 100644 --- a/dlls/uiautomationcore/tests/uiautomation.c +++ b/dlls/uiautomationcore/tests/uiautomation.c @@ -6927,7 +6927,7 @@ static const struct prov_method_sequence cache_req_seq4[] = { /* Sequence for non-matching property condition. */ static const struct prov_method_sequence cache_req_seq5[] = { { &Provider, PROV_GET_PROPERTY_VALUE }, /* Dependent upon property condition. */ - { &Provider, PROV_GET_PROPERTY_VALUE }, /* Dependent upon property condition. */ + { &Provider, PROV_GET_PROPERTY_VALUE, METHOD_TODO }, /* Dependent upon property condition. */ /* Only done on Win10v1507 and below. */ { &Provider, FRAG_NAVIGATE, METHOD_OPTIONAL }, /* NavigateDirection_Parent */ { 0 } @@ -7343,21 +7343,19 @@ static void test_UiaGetUpdatedCache(void) tree_struct = NULL; out_req = NULL; hr = UiaGetUpdatedCache(node, &cache_req, NormalizeState_View, NULL, &out_req, &tree_struct); - todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - todo_wine ok(!!out_req, "out_req == NULL\n"); - todo_wine ok(!!tree_struct, "tree_struct == NULL\n"); - if (out_req) - { - exp_lbound[0] = exp_lbound[1] = 0; - exp_elems[0] = exp_elems[1] = 1; - test_cache_req_sa(out_req, exp_lbound, exp_elems, exp_node_desc); - ok(!wcscmp(tree_struct, L"P)"), "tree structure %s\n", debugstr_w(tree_struct)); - ok_method_sequence(cache_req_seq4, NULL); - } + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(!!out_req, "out_req == NULL\n"); + ok(!!tree_struct, "tree_struct == NULL\n"); + + exp_lbound[0] = exp_lbound[1] = 0; + exp_elems[0] = exp_elems[1] = 1; + test_cache_req_sa(out_req, exp_lbound, exp_elems, exp_node_desc); + ok(!wcscmp(tree_struct, L"P)"), "tree structure %s\n", debugstr_w(tree_struct)); + ok_method_sequence(cache_req_seq4, NULL); SafeArrayDestroy(out_req); SysFreeString(tree_struct); - VariantClear(&prop_cond.Value); + VariantClear(&v); /* * Provider now returns VARIANT_TRUE for UIA_IsControlElementPropertyId, @@ -7377,13 +7375,12 @@ static void test_UiaGetUpdatedCache(void) tree_struct = NULL; out_req = NULL; hr = UiaGetUpdatedCache(node, &cache_req, NormalizeState_View, NULL, &out_req, &tree_struct); - todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - if (SUCCEEDED(hr)) - ok_method_sequence(cache_req_seq5, NULL); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok_method_sequence(cache_req_seq5, NULL); ok(!out_req, "out_req != NULL\n"); - todo_wine ok(!!tree_struct, "tree_struct == NULL\n"); - if (tree_struct) - ok(!wcscmp(tree_struct, L""), "tree structure %s\n", debugstr_w(tree_struct)); + ok(!!tree_struct, "tree_struct == NULL\n"); + ok(!wcscmp(tree_struct, L""), "tree structure %s\n", debugstr_w(tree_struct)); + SysFreeString(tree_struct); VariantClear(&v); diff --git a/dlls/uiautomationcore/uia_client.c b/dlls/uiautomationcore/uia_client.c index 4d3037b212c..328afa7acb2 100644 --- a/dlls/uiautomationcore/uia_client.c +++ b/dlls/uiautomationcore/uia_client.c @@ -1920,6 +1920,41 @@ static BOOL uia_condition_matched(HRESULT hr) return TRUE; } +static HRESULT uia_property_condition_check(HUIANODE node, struct UiaPropertyCondition *prop_cond) +{ + const struct uia_prop_info *prop_info = uia_prop_info_from_id(prop_cond->PropertyId); + HRESULT hr; + VARIANT v; + + if (!prop_info) + return E_INVALIDARG; + + switch (prop_info->type) + { + case UIAutomationType_Bool: + hr = UiaGetPropertyValue(node, prop_info->prop_id, &v); + if (FAILED(hr) || V_VT(&v) == VT_UNKNOWN) + { + hr = S_FALSE; + break; + } + + if ((V_VT(&v) == V_VT(&prop_cond->Value)) && (V_BOOL(&v) == V_BOOL(&prop_cond->Value))) + hr = S_OK; + else + hr = S_FALSE; + + break; + + default: + FIXME("PropertyCondition comparison unimplemented for type %#x\n", prop_info->type); + return E_NOTIMPL; + } + + VariantClear(&v); + return hr; +} + static HRESULT uia_condition_check(HUIANODE node, struct UiaCondition *condition) { HRESULT hr; @@ -1971,8 +2006,7 @@ static HRESULT uia_condition_check(HUIANODE node, struct UiaCondition *condition } case ConditionType_Property: - FIXME("Unhandled condition type %d\n", condition->ConditionType); - return E_NOTIMPL; + return uia_property_condition_check(node, (struct UiaPropertyCondition *)condition); default: WARN("Invalid condition type %d\n", condition->ConditionType);
1
0
0
0
Connor McAdams : uiautomationcore: Add support for ConditionType_{And/Or} conditions.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: wine Branch: master Commit: cd143fc2fdbfab17bf5c922fd93af56d9b58393b URL:
https://gitlab.winehq.org/wine/wine/-/commit/cd143fc2fdbfab17bf5c922fd93af5…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Wed Oct 26 09:46:58 2022 -0400 uiautomationcore: Add support for ConditionType_{And/Or} conditions. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/uiautomationcore/tests/uiautomation.c | 64 +++++++++++++----------------- dlls/uiautomationcore/uia_client.c | 27 ++++++++++++- 2 files changed, 53 insertions(+), 38 deletions(-) diff --git a/dlls/uiautomationcore/tests/uiautomation.c b/dlls/uiautomationcore/tests/uiautomation.c index 32ae4cb9b5f..19cebf79143 100644 --- a/dlls/uiautomationcore/tests/uiautomation.c +++ b/dlls/uiautomationcore/tests/uiautomation.c @@ -7132,17 +7132,15 @@ static void test_UiaGetUpdatedCache(void) /* Equivalent to: if (1 && 1) */ hr = UiaGetUpdatedCache(node, &cache_req, NormalizeState_View, NULL, &out_req, &tree_struct); - todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - todo_wine ok(!!out_req, "out_req == NULL\n"); - todo_wine ok(!!tree_struct, "tree_struct == NULL\n"); - if (out_req) - { - exp_lbound[0] = exp_lbound[1] = 0; - exp_elems[0] = exp_elems[1] = 1; - test_cache_req_sa(out_req, exp_lbound, exp_elems, exp_node_desc); - ok(!wcscmp(tree_struct, L"P)"), "tree structure %s\n", debugstr_w(tree_struct)); - ok_method_sequence(cache_req_seq1, NULL); - } + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(!!out_req, "out_req == NULL\n"); + ok(!!tree_struct, "tree_struct == NULL\n"); + + exp_lbound[0] = exp_lbound[1] = 0; + exp_elems[0] = exp_elems[1] = 1; + test_cache_req_sa(out_req, exp_lbound, exp_elems, exp_node_desc); + ok(!wcscmp(tree_struct, L"P)"), "tree structure %s\n", debugstr_w(tree_struct)); + ok_method_sequence(cache_req_seq1, NULL); SafeArrayDestroy(out_req); SysFreeString(tree_struct); @@ -7156,14 +7154,12 @@ static void test_UiaGetUpdatedCache(void) /* Equivalent to: if (1 && 0) */ hr = UiaGetUpdatedCache(node, &cache_req, NormalizeState_View, NULL, &out_req, &tree_struct); - todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - if (SUCCEEDED(hr)) - ok_method_sequence(cache_req_seq2, NULL); - + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok_method_sequence(cache_req_seq2, NULL); ok(!out_req, "out_req != NULL\n"); - todo_wine ok(!!tree_struct, "tree_struct == NULL\n"); - if (tree_struct) - ok(!wcscmp(tree_struct, L""), "tree structure %s\n", debugstr_w(tree_struct)); + ok(!!tree_struct, "tree_struct == NULL\n"); + ok(!wcscmp(tree_struct, L""), "tree structure %s\n", debugstr_w(tree_struct)); + SysFreeString(tree_struct); /* @@ -7178,17 +7174,15 @@ static void test_UiaGetUpdatedCache(void) /* Equivalent to: if (1 || 0) */ hr = UiaGetUpdatedCache(node, &cache_req, NormalizeState_View, NULL, &out_req, &tree_struct); - todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - todo_wine ok(!!out_req, "out_req == NULL\n"); - todo_wine ok(!!tree_struct, "tree_struct == NULL\n"); - if (out_req) - { - exp_lbound[0] = exp_lbound[1] = 0; - exp_elems[0] = exp_elems[1] = 1; - test_cache_req_sa(out_req, exp_lbound, exp_elems, exp_node_desc); - ok(!wcscmp(tree_struct, L"P)"), "tree structure %s\n", debugstr_w(tree_struct)); - ok_method_sequence(cache_req_seq1, NULL); - } + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(!!out_req, "out_req == NULL\n"); + ok(!!tree_struct, "tree_struct == NULL\n"); + + exp_lbound[0] = exp_lbound[1] = 0; + exp_elems[0] = exp_elems[1] = 1; + test_cache_req_sa(out_req, exp_lbound, exp_elems, exp_node_desc); + ok(!wcscmp(tree_struct, L"P)"), "tree structure %s\n", debugstr_w(tree_struct)); + ok_method_sequence(cache_req_seq1, NULL); SafeArrayDestroy(out_req); SysFreeString(tree_struct); @@ -7202,14 +7196,12 @@ static void test_UiaGetUpdatedCache(void) /* Equivalent to: if (0 || 0) */ hr = UiaGetUpdatedCache(node, &cache_req, NormalizeState_View, NULL, &out_req, &tree_struct); - todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - if (SUCCEEDED(hr)) - ok_method_sequence(cache_req_seq2, NULL); - + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok_method_sequence(cache_req_seq2, NULL); ok(!out_req, "out_req != NULL\n"); - todo_wine ok(!!tree_struct, "tree_struct == NULL\n"); - if (tree_struct) - ok(!wcscmp(tree_struct, L""), "tree structure %s\n", debugstr_w(tree_struct)); + ok(!!tree_struct, "tree_struct == NULL\n"); + ok(!wcscmp(tree_struct, L""), "tree structure %s\n", debugstr_w(tree_struct)); + SysFreeString(tree_struct); /* diff --git a/dlls/uiautomationcore/uia_client.c b/dlls/uiautomationcore/uia_client.c index 3897b036e09..4d3037b212c 100644 --- a/dlls/uiautomationcore/uia_client.c +++ b/dlls/uiautomationcore/uia_client.c @@ -1922,6 +1922,8 @@ static BOOL uia_condition_matched(HRESULT hr) static HRESULT uia_condition_check(HUIANODE node, struct UiaCondition *condition) { + HRESULT hr; + switch (condition->ConditionType) { case ConditionType_True: @@ -1933,7 +1935,6 @@ static HRESULT uia_condition_check(HUIANODE node, struct UiaCondition *condition case ConditionType_Not: { struct UiaNotCondition *not_cond = (struct UiaNotCondition *)condition; - HRESULT hr; hr = uia_condition_check(node, not_cond->pConditions); if (FAILED(hr)) @@ -1945,9 +1946,31 @@ static HRESULT uia_condition_check(HUIANODE node, struct UiaCondition *condition return S_OK; } - case ConditionType_Property: case ConditionType_And: case ConditionType_Or: + { + struct UiaAndOrCondition *and_or_cond = (struct UiaAndOrCondition *)condition; + int i; + + for (i = 0; i < and_or_cond->cConditions; i++) + { + hr = uia_condition_check(node, and_or_cond->ppConditions[i]); + if (FAILED(hr)) + return hr; + + if (condition->ConditionType == ConditionType_And && !uia_condition_matched(hr)) + return S_FALSE; + else if (condition->ConditionType == ConditionType_Or && uia_condition_matched(hr)) + return S_OK; + } + + if (condition->ConditionType == ConditionType_Or) + return S_FALSE; + else + return S_OK; + } + + case ConditionType_Property: FIXME("Unhandled condition type %d\n", condition->ConditionType); return E_NOTIMPL;
1
0
0
0
Bartosz Kosiorek : msvcrt: Fix error handling for strcpy_s.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: wine Branch: master Commit: 5b435796399a4bda28b41c0fca35b3e7d5d2df44 URL:
https://gitlab.winehq.org/wine/wine/-/commit/5b435796399a4bda28b41c0fca35b3…
Author: Bartosz Kosiorek <gang65(a)poczta.onet.pl> Date: Sun Oct 23 23:33:16 2022 +0200 msvcrt: Fix error handling for strcpy_s. --- dlls/msvcrt/string.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c index b787061d789..d58a21406b1 100644 --- a/dlls/msvcrt/string.c +++ b/dlls/msvcrt/string.c @@ -1328,9 +1328,9 @@ char* CDECL strcpy(char *dst, const char *src) int CDECL strcpy_s( char* dst, size_t elem, const char* src ) { size_t i; - if(!elem) return EINVAL; - if(!dst) return EINVAL; - if(!src) + if (!MSVCRT_CHECK_PMT(dst != 0)) return EINVAL; + if (!MSVCRT_CHECK_PMT(elem != 0)) return EINVAL; + if (!MSVCRT_CHECK_PMT(src != NULL)) { dst[0] = '\0'; return EINVAL; @@ -1340,6 +1340,7 @@ int CDECL strcpy_s( char* dst, size_t elem, const char* src ) { if((dst[i] = src[i]) == '\0') return 0; } + MSVCRT_INVALID_PMT("dst[elem] is too small", ERANGE); dst[0] = '\0'; return ERANGE; }
1
0
0
0
Bartosz Kosiorek : msvcrt: Fix error handling for strcat_s.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: wine Branch: master Commit: 046bed65d46b5b096f473b9929784d2cd2409272 URL:
https://gitlab.winehq.org/wine/wine/-/commit/046bed65d46b5b096f473b9929784d…
Author: Bartosz Kosiorek <gang65(a)poczta.onet.pl> Date: Sun Oct 23 23:31:40 2022 +0200 msvcrt: Fix error handling for strcat_s. --- dlls/msvcrt/string.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c index ba2f4fa4357..b787061d789 100644 --- a/dlls/msvcrt/string.c +++ b/dlls/msvcrt/string.c @@ -1350,9 +1350,9 @@ int CDECL strcpy_s( char* dst, size_t elem, const char* src ) int CDECL strcat_s( char* dst, size_t elem, const char* src ) { size_t i, j; - if(!dst) return EINVAL; - if(elem == 0) return EINVAL; - if(!src) + if (!MSVCRT_CHECK_PMT(dst != 0)) return EINVAL; + if (!MSVCRT_CHECK_PMT(elem != 0)) return EINVAL; + if (!MSVCRT_CHECK_PMT(src != NULL)) { dst[0] = '\0'; return EINVAL; @@ -1369,6 +1369,7 @@ int CDECL strcat_s( char* dst, size_t elem, const char* src ) } } /* Set the first element to 0, not the first element after the skipped part */ + MSVCRT_INVALID_PMT("dst[elem] is too small", ERANGE); dst[0] = '\0'; return ERANGE; }
1
0
0
0
Bartosz Kosiorek : msvcrt: Add _mbsinc_l implementation.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: wine Branch: master Commit: 3cb897ffbb570b99c69f4fcaa675faa3e58e4722 URL:
https://gitlab.winehq.org/wine/wine/-/commit/3cb897ffbb570b99c69f4fcaa675fa…
Author: Bartosz Kosiorek <gang65(a)poczta.onet.pl> Date: Sun Oct 23 22:48:52 2022 +0200 msvcrt: Add _mbsinc_l implementation. --- dlls/msvcr100/msvcr100.spec | 2 +- dlls/msvcr110/msvcr110.spec | 2 +- dlls/msvcr120/msvcr120.spec | 2 +- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/mbcs.c | 10 +++++++++- dlls/msvcrt/msvcrt.spec | 2 +- dlls/ucrtbase/ucrtbase.spec | 4 ++-- 8 files changed, 17 insertions(+), 9 deletions(-) diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 2f14f591273..e56913feaeb 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -1116,7 +1116,7 @@ @ cdecl _mbsicoll(str str) @ cdecl _mbsicoll_l(str str ptr) @ cdecl _mbsinc(str) -@ stub _mbsinc_l +@ cdecl _mbsinc_l(str ptr) @ cdecl _mbslen(str) @ cdecl _mbslen_l(str ptr) @ cdecl _mbslwr(str) diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 29918fd3b06..f64c6cf30b5 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -1473,7 +1473,7 @@ @ cdecl _mbsicoll(str str) @ cdecl _mbsicoll_l(str str ptr) @ cdecl _mbsinc(str) -@ stub _mbsinc_l +@ cdecl _mbsinc_l(str ptr) @ cdecl _mbslen(str) @ cdecl _mbslen_l(str ptr) @ cdecl _mbslwr(str) diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 286c1a7e616..8e6a169a187 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -1484,7 +1484,7 @@ @ cdecl _mbsicoll(str str) @ cdecl _mbsicoll_l(str str ptr) @ cdecl _mbsinc(str) -@ stub _mbsinc_l +@ cdecl _mbsinc_l(str ptr) @ cdecl _mbslen(str) @ cdecl _mbslen_l(str ptr) @ cdecl _mbslwr(str) diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 4d113a504a5..4bef365a7c8 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -788,7 +788,7 @@ @ cdecl _mbsicoll(str str) @ cdecl _mbsicoll_l(str str ptr) @ cdecl _mbsinc(str) -@ stub _mbsinc_l +@ cdecl _mbsinc_l(str ptr) @ cdecl _mbslen(str) @ cdecl _mbslen_l(str ptr) @ cdecl _mbslwr(str) diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 32e05f38946..19f9335f545 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -766,7 +766,7 @@ @ cdecl _mbsicoll(str str) @ cdecl _mbsicoll_l(str str ptr) @ cdecl _mbsinc(str) -@ stub _mbsinc_l +@ cdecl _mbsinc_l(str ptr) @ cdecl _mbslen(str) @ cdecl _mbslen_l(str ptr) @ cdecl _mbslwr(str) diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c index 6363086b129..e8194a690ad 100644 --- a/dlls/msvcrt/mbcs.c +++ b/dlls/msvcrt/mbcs.c @@ -654,12 +654,20 @@ size_t CDECL _mbclen(const unsigned char* str) return _mbclen_l(str, NULL); } +/********************************************************************* + * _mbsinc_l(MSVCRT.@) + */ +unsigned char* CDECL _mbsinc_l(const unsigned char* str, _locale_t locale) +{ + return (unsigned char *)(str + _mbclen_l(str, locale)); +} + /********************************************************************* * _mbsinc(MSVCRT.@) */ unsigned char* CDECL _mbsinc(const unsigned char* str) { - return (unsigned char *)(str + _mbclen(str)); + return _mbsinc_l(str, NULL); } /********************************************************************* diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index e18308848a3..5ed054df51f 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -737,7 +737,7 @@ @ cdecl _mbsicoll(str str) @ cdecl _mbsicoll_l(str str ptr) @ cdecl _mbsinc(str) -# stub _mbsinc_l(str ptr) +@ cdecl _mbsinc_l(str ptr) @ cdecl _mbslen(str) @ cdecl _mbslen_l(str ptr) @ cdecl _mbslwr(str) diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index 1026aa48de7..e40a4ccaea5 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -631,7 +631,7 @@ @ cdecl _mbsicoll(str str) @ cdecl _mbsicoll_l(str str ptr) @ cdecl _mbsinc(str) -@ stub _mbsinc_l +@ cdecl _mbsinc_l(str ptr) @ cdecl _mbslen(str) @ cdecl _mbslen_l(str ptr) @ cdecl _mbslwr(str) @@ -1200,7 +1200,7 @@ @ cdecl _o__mbsicoll(str str) _mbsicoll @ cdecl _o__mbsicoll_l(str str ptr) _mbsicoll_l @ cdecl _o__mbsinc(str) _mbsinc -@ stub _o__mbsinc_l +@ cdecl _o__mbsinc_l(str ptr) _mbsinc_l @ cdecl _o__mbslen(str) _mbslen @ cdecl _o__mbslen_l(str ptr) _mbslen_l @ cdecl _o__mbslwr(str) _mbslwr
1
0
0
0
Bartosz Kosiorek : msvcrt: Add _ismbcsymbol_l implementation.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: wine Branch: master Commit: 46c836071e60f9f51e778a8caf15e4c9332884fc URL:
https://gitlab.winehq.org/wine/wine/-/commit/46c836071e60f9f51e778a8caf15e4…
Author: Bartosz Kosiorek <gang65(a)poczta.onet.pl> Date: Sun Oct 23 22:35:21 2022 +0200 msvcrt: Add _ismbcsymbol_l implementation. --- dlls/msvcr100/msvcr100.spec | 2 +- dlls/msvcr110/msvcr110.spec | 2 +- dlls/msvcr120/msvcr120.spec | 2 +- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/mbcs.c | 19 +++++++++++-------- dlls/msvcrt/msvcrt.spec | 2 +- dlls/ucrtbase/ucrtbase.spec | 4 ++-- 8 files changed, 19 insertions(+), 16 deletions(-) diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 54f988ee9cd..2f14f591273 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -1003,7 +1003,7 @@ @ cdecl _ismbcspace(long) @ cdecl _ismbcspace_l(long ptr) @ cdecl _ismbcsymbol(long) -@ stub _ismbcsymbol_l +@ cdecl _ismbcsymbol_l(long ptr) @ cdecl _ismbcupper(long) @ cdecl _ismbcupper_l(long ptr) @ cdecl _ismbslead(ptr ptr) diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index d84a88ea50b..29918fd3b06 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -1349,7 +1349,7 @@ @ cdecl _ismbcspace(long) @ cdecl _ismbcspace_l(long ptr) @ cdecl _ismbcsymbol(long) -@ stub _ismbcsymbol_l +@ cdecl _ismbcsymbol_l(long ptr) @ cdecl _ismbcupper(long) @ cdecl _ismbcupper_l(long ptr) @ cdecl _ismbslead(ptr ptr) diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 5c65b082309..286c1a7e616 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -1355,7 +1355,7 @@ @ cdecl _ismbcspace(long) @ cdecl _ismbcspace_l(long ptr) @ cdecl _ismbcsymbol(long) -@ stub _ismbcsymbol_l +@ cdecl _ismbcsymbol_l(long ptr) @ cdecl _ismbcupper(long) @ cdecl _ismbcupper_l(long ptr) @ cdecl _ismbslead(ptr ptr) diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 4f3425acc35..4d113a504a5 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -675,7 +675,7 @@ @ cdecl _ismbcspace(long) @ cdecl _ismbcspace_l(long ptr) @ cdecl _ismbcsymbol(long) -@ stub _ismbcsymbol_l +@ cdecl _ismbcsymbol_l(long ptr) @ cdecl _ismbcupper(long) @ cdecl _ismbcupper_l(long ptr) @ cdecl _ismbslead(ptr ptr) diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 4e26468b489..32e05f38946 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -653,7 +653,7 @@ @ cdecl _ismbcspace(long) @ cdecl _ismbcspace_l(long ptr) @ cdecl _ismbcsymbol(long) -@ stub _ismbcsymbol_l +@ cdecl _ismbcsymbol_l(long ptr) @ cdecl _ismbcupper(long) @ cdecl _ismbcupper_l(long ptr) @ cdecl _ismbslead(ptr ptr) diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c index bdcfea3b01a..6363086b129 100644 --- a/dlls/msvcrt/mbcs.c +++ b/dlls/msvcrt/mbcs.c @@ -115,11 +115,6 @@ static wchar_t msvcrt_mbc_to_wc_l(unsigned int ch, _locale_t locale) return chW; } -static wchar_t msvcrt_mbc_to_wc(unsigned int ch) -{ - return msvcrt_mbc_to_wc_l(ch, NULL); -} - static inline size_t u_strlen( const unsigned char *str ) { return strlen( (const char*) str ); @@ -1640,11 +1635,11 @@ int CDECL _ismbcupper(unsigned int ch) } /********************************************************************* - * _ismbcsymbol(MSVCRT.@) + * _ismbcsymbol_l(MSVCRT.@) */ -int CDECL _ismbcsymbol(unsigned int ch) +int CDECL _ismbcsymbol_l(unsigned int ch, _locale_t locale) { - wchar_t wch = msvcrt_mbc_to_wc( ch ); + wchar_t wch = msvcrt_mbc_to_wc_l( ch, locale ); WORD ctype; if (!GetStringTypeW(CT_CTYPE3, &wch, 1, &ctype)) { @@ -1654,6 +1649,14 @@ int CDECL _ismbcsymbol(unsigned int ch) return ((ctype & C3_SYMBOL) != 0); } +/********************************************************************* + * _ismbcsymbol(MSVCRT.@) + */ +int CDECL _ismbcsymbol(unsigned int ch) +{ + return _ismbcsymbol_l(ch, NULL); +} + /********************************************************************* * _ismbcalnum_l (MSVCRT.@) */ diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 156216ae715..e18308848a3 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -624,7 +624,7 @@ @ cdecl _ismbcspace(long) @ cdecl _ismbcspace_l(long ptr) @ cdecl _ismbcsymbol(long) -# stub _ismbcsymbol_l(long ptr) +@ cdecl _ismbcsymbol_l(long ptr) @ cdecl _ismbcupper(long) @ cdecl _ismbcupper_l(long ptr) @ cdecl _ismbslead(ptr ptr) diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index 805ccc908f7..1026aa48de7 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -495,7 +495,7 @@ @ cdecl _ismbcspace(long) @ cdecl _ismbcspace_l(long ptr) @ cdecl _ismbcsymbol(long) -@ stub _ismbcsymbol_l +@ cdecl _ismbcsymbol_l(long ptr) @ cdecl _ismbcupper(long) @ cdecl _ismbcupper_l(long ptr) @ cdecl _ismbslead(ptr ptr) @@ -1094,7 +1094,7 @@ @ cdecl _o__ismbcspace(long) _ismbcspace @ cdecl _o__ismbcspace_l(long ptr) _ismbcspace_l @ cdecl _o__ismbcsymbol(long) _ismbcsymbol -@ stub _o__ismbcsymbol_l +@ cdecl _o__ismbcsymbol_l(long ptr) _ismbcsymbol_l @ cdecl _o__ismbcupper(long) _ismbcupper @ cdecl _o__ismbcupper_l(long ptr) _ismbcupper_l @ cdecl _o__ismbslead(ptr ptr) _ismbslead
1
0
0
0
Brendan Shanks : ntdll: Set native thread names on Linux when set with SetThreadDescription().
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: wine Branch: master Commit: c68f75e34e3383c90462a4b01dd20f3511353453 URL:
https://gitlab.winehq.org/wine/wine/-/commit/c68f75e34e3383c90462a4b01dd20f…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Wed Dec 8 16:10:05 2021 -0800 ntdll: Set native thread names on Linux when set with SetThreadDescription(). --- dlls/ntdll/unix/thread.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c index bb8c1c2936b..3a737044407 100644 --- a/dlls/ntdll/unix/thread.c +++ b/dlls/ntdll/unix/thread.c @@ -26,6 +26,7 @@ #include <assert.h> #include <errno.h> +#include <fcntl.h> #include <limits.h> #include <stdarg.h> #include <stdio.h> @@ -1828,6 +1829,48 @@ BOOL get_thread_times(int unix_pid, int unix_tid, LARGE_INTEGER *kernel_time, LA #endif } +static void set_native_thread_name( HANDLE handle, const UNICODE_STRING *name ) +{ +#ifdef linux + NTSTATUS status; + char path[64], nameA[64]; + int unix_pid, unix_tid, len, fd; + + SERVER_START_REQ( get_thread_times ) + { + req->handle = wine_server_obj_handle( handle ); + status = wine_server_call( req ); + if (status == STATUS_SUCCESS) + { + unix_pid = reply->unix_pid; + unix_tid = reply->unix_tid; + } + } + SERVER_END_REQ; + + if (status != STATUS_SUCCESS || unix_pid == -1 || unix_tid == -1) + return; + + if (unix_pid != getpid()) + { + static int once; + if (!once++) FIXME("cross-process native thread naming not supported\n"); + return; + } + + len = ntdll_wcstoumbs( name->Buffer, name->Length / sizeof(WCHAR), nameA, sizeof(nameA), FALSE ); + sprintf(path, "/proc/%u/task/%u/comm", unix_pid, unix_tid); + if ((fd = open( path, O_WRONLY )) != -1) + { + write( fd, nameA, len ); + close( fd ); + } +#else + static int once; + if (!once++) FIXME("not implemented on this platform\n"); +#endif +} + #ifndef _WIN64 static BOOL is_process_wow64( const CLIENT_ID *id ) { @@ -2254,6 +2297,9 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class, status = wine_server_call( req ); } SERVER_END_REQ; + + set_native_thread_name( handle, &info->ThreadName ); + return status; }
1
0
0
0
Eric Pouech : kernel32/tests: Workaround some broken Windows behavior in console tests.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: wine Branch: master Commit: 35c65edcb92557e34c424c2026614adfff21b500 URL:
https://gitlab.winehq.org/wine/wine/-/commit/35c65edcb92557e34c424c2026614a…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Tue Oct 25 16:36:32 2022 +0200 kernel32/tests: Workaround some broken Windows behavior in console tests. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48105
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> --- dlls/kernel32/tests/console.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c index c2b7eb63a1e..1f285faf1e2 100644 --- a/dlls/kernel32/tests/console.c +++ b/dlls/kernel32/tests/console.c @@ -925,10 +925,16 @@ static void testScreenBuffer(HANDLE hConOut) SetConsoleCursorPosition(hConOutRW, c); ret = WriteConsoleA(hConOutRW, test_cp866, lstrlenA(test_cp866), &len, NULL); ok(ret && len == lstrlenA(test_cp866), "WriteConsoleA failed\n"); - ret = ReadConsoleOutputCharacterW(hConOutRW, str_wbuf, lstrlenA(test_cp866), c, &len); - ok(ret && len == lstrlenA(test_cp866), "ReadConsoleOutputCharacterW failed\n"); - str_wbuf[lstrlenA(test_cp866)] = 0; - ok(!lstrcmpW(str_wbuf, test_unicode), "string does not match the pattern\n"); + ret = ReadConsoleOutputCharacterW(hConOutRW, str_wbuf, lstrlenW(test_unicode), c, &len); + /* Work around some broken results under Windows with some locale (ja, cn, ko...) + * Looks like a real bug in Win10 (at least). + */ + if (ret && broken(len == lstrlenW(test_unicode) / sizeof(WCHAR))) + ret = ReadConsoleOutputCharacterW(hConOutRW, str_wbuf, lstrlenW(test_unicode) * sizeof(WCHAR), c, &len); + ok(ret, "ReadConsoleOutputCharacterW failed\n"); + ok(len == lstrlenW(test_unicode), "unexpected len %lu %u\n", len, lstrlenW(test_unicode)); + ok(!memcmp(str_wbuf, test_unicode, lstrlenW(test_unicode) * sizeof(WCHAR)), + "string does not match the pattern\n"); /* * cp866 is OK, let's switch to cp1251.
1
0
0
0
Hans Leidekker : wbemprox: WQL string comparisons are case insensitive.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: wine Branch: master Commit: 7bfa058a0b89e6a4f24dd43db9a0ea5c1a304b71 URL:
https://gitlab.winehq.org/wine/wine/-/commit/7bfa058a0b89e6a4f24dd43db9a0ea…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Oct 25 11:21:28 2022 +0200 wbemprox: WQL string comparisons are case insensitive. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53832
--- dlls/wbemprox/query.c | 12 ++++++------ dlls/wbemprox/tests/query.c | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/dlls/wbemprox/query.c b/dlls/wbemprox/query.c index 8233d35878d..1b79523d66f 100644 --- a/dlls/wbemprox/query.c +++ b/dlls/wbemprox/query.c @@ -118,22 +118,22 @@ static HRESULT eval_strcmp( UINT op, const WCHAR *lstr, const WCHAR *rstr, LONGL switch (op) { case OP_EQ: - *val = !wcscmp( lstr, rstr ); + *val = !wcsicmp( lstr, rstr ); break; case OP_GT: - *val = wcscmp( lstr, rstr ) > 0; + *val = wcsicmp( lstr, rstr ) > 0; break; case OP_LT: - *val = wcscmp( lstr, rstr ) < 0; + *val = wcsicmp( lstr, rstr ) < 0; break; case OP_LE: - *val = wcscmp( lstr, rstr ) <= 0; + *val = wcsicmp( lstr, rstr ) <= 0; break; case OP_GE: - *val = wcscmp( lstr, rstr ) >= 0; + *val = wcsicmp( lstr, rstr ) >= 0; break; case OP_NE: - *val = wcscmp( lstr, rstr ); + *val = wcsicmp( lstr, rstr ); break; case OP_LIKE: *val = eval_like( lstr, rstr ); diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c index 12bc42d249c..e86f7fd5b62 100644 --- a/dlls/wbemprox/tests/query.c +++ b/dlls/wbemprox/tests/query.c @@ -2141,6 +2141,28 @@ static void test_Win32_LogicalDisk( IWbemServices *services ) IWbemClassObject_Release( obj ); } + IEnumWbemClassObject_Release( result ); + SysFreeString( query ); + + query = SysAllocString( L"SELECT * FROM Win32_LogicalDisk WHERE DeviceID > 'b:' AND DeviceID < 'd:'" ); + hr = IWbemServices_ExecQuery( services, wql, query, 0, NULL, &result ); + ok( hr == S_OK, "got %#lx\n", hr ); + count = 0; + hr = IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count ); + ok( hr == S_OK, "got %#lx\n", hr ); + ok( count == 1, "got %lu\n", count ); + IWbemClassObject_Release( obj ); + SysFreeString( query ); + + query = SysAllocString( L"SELECT * FROM Win32_LogicalDisk WHERE DeviceID = 'C:'" ); + hr = IWbemServices_ExecQuery( services, wql, query, 0, NULL, &result ); + ok( hr == S_OK, "got %#lx\n", hr ); + count = 0; + hr = IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count ); + ok( hr == S_OK, "got %#lx\n", hr ); + ok( count == 1, "got %lu\n", count ); + IWbemClassObject_Release( obj ); + SysFreeString( query ); IEnumWbemClassObject_Release( result ); SysFreeString( query ); SysFreeString( wql );
1
0
0
0
Jinoh Kang : ntdll/tests: Add more tests for \Device\NamedPipe and \Device\NamedPipe\.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: wine Branch: master Commit: dd5ce0295b998ad99262d1e1a6fb60dc3908a50d URL:
https://gitlab.winehq.org/wine/wine/-/commit/dd5ce0295b998ad99262d1e1a6fb60…
Author: Jinoh Kang <jinoh.kang.kr(a)gmail.com> Date: Sat Oct 15 21:28:46 2022 +0900 ntdll/tests: Add more tests for \Device\NamedPipe and \Device\NamedPipe\. --- dlls/ntdll/tests/pipe.c | 95 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 93 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c index 6ee3f569e79..6f26655b118 100644 --- a/dlls/ntdll/tests/pipe.c +++ b/dlls/ntdll/tests/pipe.c @@ -2608,6 +2608,93 @@ static void test_security_info(void) HeapFree(GetProcessHeap(), 0, local_sid); } +static void subtest_empty_name_pipe_operations(HANDLE handle) +{ + static const struct fsctl_test { + const char *name; + ULONG code; + NTSTATUS status; + NTSTATUS status_broken; + } fsctl_tests[] = { +#define FSCTL_TEST(code, ...) { #code, code, __VA_ARGS__ } + FSCTL_TEST(FSCTL_PIPE_ASSIGN_EVENT, STATUS_NOT_SUPPORTED), + FSCTL_TEST(FSCTL_PIPE_DISCONNECT, STATUS_PIPE_DISCONNECTED), + FSCTL_TEST(FSCTL_PIPE_LISTEN, STATUS_ILLEGAL_FUNCTION), + FSCTL_TEST(FSCTL_PIPE_QUERY_EVENT, STATUS_NOT_SUPPORTED), + FSCTL_TEST(FSCTL_PIPE_TRANSCEIVE, STATUS_PIPE_DISCONNECTED), + FSCTL_TEST(FSCTL_PIPE_IMPERSONATE, STATUS_ILLEGAL_FUNCTION), + FSCTL_TEST(FSCTL_PIPE_SET_CLIENT_PROCESS, STATUS_NOT_SUPPORTED), + FSCTL_TEST(FSCTL_PIPE_QUERY_CLIENT_PROCESS, STATUS_INVALID_PARAMETER, /* win10 1507 */ STATUS_PIPE_DISCONNECTED), +#undef FSCTL_TEST + }; + FILE_PIPE_PEEK_BUFFER peek_buf; + OBJECT_ATTRIBUTES attr; + IO_STATUS_BLOCK io; + char buffer[1024]; + NTSTATUS status; + ULONG peer_pid; + HANDLE event; + size_t i; + + event = NULL; + InitializeObjectAttributes(&attr, NULL, 0, 0, NULL); + status = NtCreateEvent(&event, GENERIC_ALL, &attr, NotificationEvent, FALSE); + ok(status == STATUS_SUCCESS, "NtCreateEvent returned %#lx\n", status); + + status = NtReadFile(handle, event, NULL, NULL, &io, buffer, sizeof(buffer), NULL, NULL); + todo_wine + ok(status == STATUS_INVALID_PARAMETER, "NtReadFile on \\Device\\NamedPipe: got %#lx\n", status); + + status = NtWriteFile(handle, event, NULL, NULL, &io, buffer, sizeof(buffer), NULL, NULL); + todo_wine + ok(status == STATUS_INVALID_PARAMETER, "NtWriteFile on \\Device\\NamedPipe: got %#lx\n", status); + + status = NtFsControlFile(handle, event, NULL, NULL, &io, FSCTL_PIPE_PEEK, NULL, 0, &peek_buf, sizeof(peek_buf)); + if (status == STATUS_PENDING) + { + WaitForSingleObject(event, INFINITE); + status = io.Status; + } + todo_wine + ok(status == STATUS_INVALID_PARAMETER, "FSCTL_PIPE_PEEK on \\Device\\NamedPipe: got %lx\n", status); + + status = NtFsControlFile(handle, event, NULL, NULL, &io, FSCTL_PIPE_GET_CONNECTION_ATTRIBUTE, (void *)"ClientProcessId", sizeof("ClientProcessId"), &peer_pid, sizeof(peer_pid)); + if (status == STATUS_PENDING) + { + WaitForSingleObject(event, INFINITE); + status = io.Status; + } + todo_wine + ok(status == STATUS_INVALID_PARAMETER, "FSCTL_PIPE_GET_CONNECTION_ATTRIBUTE ClientProcessId on \\Device\\NamedPipe: got %lx\n", status); + + status = NtFsControlFile(handle, event, NULL, NULL, &io, FSCTL_PIPE_GET_CONNECTION_ATTRIBUTE, (void *)"ServerProcessId", sizeof("ServerProcessId"), &peer_pid, sizeof(peer_pid)); + if (status == STATUS_PENDING) + { + WaitForSingleObject(event, INFINITE); + status = io.Status; + } + todo_wine + ok(status == STATUS_INVALID_PARAMETER, "FSCTL_PIPE_GET_CONNECTION_ATTRIBUTE ServerProcessId on \\Device\\NamedPipe: got %lx\n", status); + + for (i = 0; i < ARRAY_SIZE(fsctl_tests); i++) + { + const struct fsctl_test *ft = &fsctl_tests[i]; + + status = NtFsControlFile(handle, event, NULL, NULL, &io, ft->code, 0, 0, 0, 0); + if (status == STATUS_PENDING) + { + WaitForSingleObject(event, INFINITE); + status = io.Status; + } + todo_wine_if(ft->status != STATUS_NOT_SUPPORTED) + ok(status == ft->status || (ft->status_broken && broken(status == ft->status_broken)), + "NtFsControlFile(%s) on \\Device\\NamedPipe: expected %#lx, got %#lx\n", + ft->name, ft->status, status); + } + + NtClose(event); +} + static void test_empty_name(void) { static const LARGE_INTEGER zero_timeout = {{ 0 }}; @@ -2637,7 +2724,7 @@ static void test_empty_name(void) attr.RootDirectory = 0; attr.ObjectName = &name; - status = NtCreateFile(&hdirectory, GENERIC_READ | SYNCHRONIZE, &attr, &io, NULL, 0, + status = NtCreateFile(&hdirectory, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr, &io, NULL, 0, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, 0, NULL, 0 ); ok(!status, "Got unexpected status %#lx.\n", status); @@ -2645,6 +2732,8 @@ static void test_empty_name(void) status = wait_pipe(hdirectory, &name, &zero_timeout); todo_wine ok(status == STATUS_ILLEGAL_FUNCTION, "unexpected status for FSCTL_PIPE_WAIT on \\Device\\NamedPipe: %#lx\n", status); + subtest_empty_name_pipe_operations(hdirectory); + name.Buffer = NULL; name.Length = 0; name.MaximumLength = 0; @@ -2677,7 +2766,7 @@ static void test_empty_name(void) status = pNtCreateDirectoryObject(&hdirectory, GENERIC_READ | SYNCHRONIZE, &attr); todo_wine ok(status == STATUS_OBJECT_TYPE_MISMATCH, "Got unexpected status %#lx.\n", status); - status = NtCreateFile(&hdirectory, GENERIC_READ | SYNCHRONIZE, &attr, &io, NULL, 0, + status = NtCreateFile(&hdirectory, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr, &io, NULL, 0, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, 0, NULL, 0 ); ok(!status, "Got unexpected status %#lx.\n", status); @@ -2685,6 +2774,8 @@ static void test_empty_name(void) status = wait_pipe(hdirectory, &name, &zero_timeout); ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "unexpected status for FSCTL_PIPE_WAIT on \\Device\\NamedPipe\\: %#lx\n", status); + subtest_empty_name_pipe_operations(hdirectory); + name.Buffer = NULL; name.Length = 0; name.MaximumLength = 0;
1
0
0
0
Jinoh Kang : ntdll/tests: Add tests for pipe names.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: wine Branch: master Commit: 71959b68879ee56ed4ef851b6177b6b192b49a7f URL:
https://gitlab.winehq.org/wine/wine/-/commit/71959b68879ee56ed4ef851b6177b6…
Author: Jinoh Kang <jinoh.kang.kr(a)gmail.com> Date: Sat Oct 15 20:01:31 2022 +0900 ntdll/tests: Add tests for pipe names. --- dlls/ntdll/tests/pipe.c | 89 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c index 569de22b013..6ee3f569e79 100644 --- a/dlls/ntdll/tests/pipe.c +++ b/dlls/ntdll/tests/pipe.c @@ -2795,6 +2795,94 @@ static void test_empty_name(void) CloseHandle(hdirectory); } +struct pipe_name_test { + const WCHAR *name; + NTSTATUS status; + BOOL todo; + const WCHAR *no_open_name; +}; + +static void subtest_pipe_name(const struct pipe_name_test *pnt) +{ + OBJECT_ATTRIBUTES attr; + LARGE_INTEGER timeout; + IO_STATUS_BLOCK iosb; + HANDLE pipe, client; + UNICODE_STRING name; + NTSTATUS status; + + pRtlInitUnicodeString(&name, pnt->name); + InitializeObjectAttributes(&attr, &name, OBJ_CASE_INSENSITIVE, NULL, NULL); + timeout.QuadPart = -100000000; + pipe = NULL; + status = pNtCreateNamedPipeFile(&pipe, + GENERIC_READ | FILE_WRITE_ATTRIBUTES | SYNCHRONIZE, + &attr, &iosb, FILE_SHARE_READ | FILE_SHARE_WRITE, + FILE_CREATE, FILE_SYNCHRONOUS_IO_NONALERT, + 0, 0, 0, 3, 4096, 4096, &timeout); + todo_wine_if(pnt->todo) + ok(status == pnt->status, "Expected status %#lx, got %#lx\n", pnt->status, status); + + if (!NT_SUCCESS(status)) + { + ok(pipe == NULL, "expected NULL handle, got %p\n", pipe); + return; + } + + ok(pipe != NULL, "expected non-NULL handle, got %p\n", client); + + client = NULL; + status = NtCreateFile(&client, SYNCHRONIZE, &attr, &iosb, NULL, 0, + FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_OPEN, 0, NULL, 0); + ok(status == STATUS_SUCCESS, "Expected success, got %#lx\n", status); + ok(client != NULL, "expected non-NULL handle, got %p\n", client); + NtClose(client); + + if (pnt->no_open_name) + { + OBJECT_ATTRIBUTES no_open_attr; + UNICODE_STRING no_open_name; + + pRtlInitUnicodeString(&no_open_name, pnt->no_open_name); + InitializeObjectAttributes(&no_open_attr, &no_open_name, OBJ_CASE_INSENSITIVE, NULL, NULL); + client = NULL; + status = NtCreateFile(&client, SYNCHRONIZE, &no_open_attr, &iosb, NULL, 0, + FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_OPEN, 0, NULL, 0); + ok(status == STATUS_OBJECT_NAME_NOT_FOUND, + "Expected STATUS_OBJECT_NAME_NOT_FOUND opening %s, got %#lx\n", + debugstr_wn(no_open_name.Buffer, no_open_name.Length / sizeof(WCHAR)), status); + ok(client == NULL, "expected NULL handle, got %p\n", client); + } + + NtClose(pipe); +} + +static void test_pipe_names(void) +{ + static const struct pipe_name_test tests[] = { + { L"\\Device\\NamedPipe" , STATUS_OBJECT_NAME_INVALID, TRUE }, + { L"\\Device\\NamedPipe\\" , STATUS_OBJECT_NAME_INVALID, TRUE }, + { L"\\Device\\NamedPipe\\\\" , STATUS_SUCCESS }, + { L"\\Device\\NamedPipe\\wine-test\\" , STATUS_SUCCESS, 0, L"\\Device\\NamedPipe\\wine-test" }, + { L"\\Device\\NamedPipe\\wine/test" , STATUS_SUCCESS, 0, L"\\Device\\NamedPipe\\wine\\test" }, + { L"\\Device\\NamedPipe\\wine:test" , STATUS_SUCCESS }, + { L"\\Device\\NamedPipe\\wine\\.\\test" , STATUS_SUCCESS, 0, L"\\Device\\NamedPipe\\wine\\test" }, + { L"\\Device\\NamedPipe\\wine\\..\\test" , STATUS_SUCCESS, 0, L"\\Device\\NamedPipe\\test" }, + { L"\\Device\\NamedPipe\\..\\wine-test" , STATUS_SUCCESS }, + { L"\\Device\\NamedPipe\\!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~", STATUS_SUCCESS }, + }; + size_t i; + + for (i = 0; i < ARRAY_SIZE(tests); i++) + { + const struct pipe_name_test *pnt = &tests[i]; + + winetest_push_context("test %Iu: %s", i, debugstr_w(pnt->name)); + subtest_pipe_name(pnt); + winetest_pop_context(); + } +} + START_TEST(pipe) { if (!init_func_ptrs()) @@ -2854,6 +2942,7 @@ START_TEST(pipe) test_file_info(); test_security_info(); test_empty_name(); + test_pipe_names(); pipe_for_each_state(create_pipe_server, connect_pipe, test_pipe_state); pipe_for_each_state(create_pipe_server, connect_and_write_pipe, test_pipe_with_data_state);
1
0
0
0
Jinoh Kang : kernel32/tests: Add test for pipe name with a trailing backslash.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: wine Branch: master Commit: ea9c9fe5bdbf4cacbda093759780ccac1ef386b4 URL:
https://gitlab.winehq.org/wine/wine/-/commit/ea9c9fe5bdbf4cacbda093759780cc…
Author: Jinoh Kang <jinoh.kang.kr(a)gmail.com> Date: Sat Oct 15 20:02:57 2022 +0900 kernel32/tests: Add test for pipe name with a trailing backslash. --- dlls/kernel32/tests/pipe.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c index 9481835b49b..797e7e0031b 100644 --- a/dlls/kernel32/tests/pipe.c +++ b/dlls/kernel32/tests/pipe.c @@ -682,6 +682,17 @@ static void test_CreateNamedPipe(int pipemode) CloseHandle(hFile); CloseHandle(hnp); + hnp = CreateNamedPipeA("\\\\.\\pipe\\trailingslash\\", PIPE_ACCESS_DUPLEX, + PIPE_TYPE_BYTE, 1, 1024, 1024, NMPWAIT_USE_DEFAULT_WAIT, NULL); + ok(hnp != INVALID_HANDLE_VALUE, "failed to create pipe, error %lu\n", GetLastError()); + hFile = CreateFileA("\\\\.\\pipe\\trailingslash", 0, 0, NULL, OPEN_EXISTING, 0, 0); + ok(hFile == INVALID_HANDLE_VALUE, "expected opening pipe to fail\n"); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %lu\n", GetLastError()); + hFile = CreateFileA("\\\\.\\pipe\\trailingslash\\", 0, 0, NULL, OPEN_EXISTING, 0, 0); + ok(hFile != INVALID_HANDLE_VALUE, "failed to open pipe, error %lu\n", GetLastError()); + CloseHandle(hFile); + CloseHandle(hnp); + if (winetest_debug > 1) trace("test_CreateNamedPipe returning\n"); }
1
0
0
0
Piotr Caban : comctl32: Add support for adding extra data in CreatePropertySheetPage.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: wine Branch: master Commit: ebe35f6f0a629b49524aa03eebbbdac7e948f387 URL:
https://gitlab.winehq.org/wine/wine/-/commit/ebe35f6f0a629b49524aa03eebbbda…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Sep 26 17:23:21 2022 +0200 comctl32: Add support for adding extra data in CreatePropertySheetPage. --- dlls/comctl32/propsheet.c | 9 +++++---- dlls/comctl32/tests/propsheet.c | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index 10361d280e1..43192771300 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -103,6 +103,7 @@ struct _PSP { PROPSHEETPAGEA pspA; PROPSHEETPAGEW pspW; + BYTE data[1]; }; }; @@ -3076,10 +3077,10 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageA( if (lpPropSheetPage->dwSize < PROPSHEETPAGEA_V1_SIZE) return NULL; - ret = Alloc(sizeof(*ret)); + ret = Alloc(FIELD_OFFSET(struct _PSP, data[lpPropSheetPage->dwSize])); ret->magic = HPROPSHEETPAGE_MAGIC; ppsp = &ret->pspA; - memcpy(ppsp, lpPropSheetPage, min(lpPropSheetPage->dwSize, sizeof(PROPSHEETPAGEA))); + memcpy(ppsp, lpPropSheetPage, lpPropSheetPage->dwSize); if ( !(ppsp->dwFlags & PSP_DLGINDIRECT) ) { @@ -3131,11 +3132,11 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage if (lpPropSheetPage->dwSize < PROPSHEETPAGEW_V1_SIZE) return NULL; - ret = Alloc(sizeof(*ret)); + ret = Alloc(FIELD_OFFSET(struct _PSP, data[lpPropSheetPage->dwSize])); ret->magic = HPROPSHEETPAGE_MAGIC; ret->unicode = TRUE; ppsp = &ret->pspW; - memcpy(ppsp, lpPropSheetPage, min(lpPropSheetPage->dwSize, sizeof(PROPSHEETPAGEW))); + memcpy(ppsp, lpPropSheetPage, lpPropSheetPage->dwSize); if ( !(ppsp->dwFlags & PSP_DLGINDIRECT) ) { diff --git a/dlls/comctl32/tests/propsheet.c b/dlls/comctl32/tests/propsheet.c index 70f46c83d85..7c0d5f81642 100644 --- a/dlls/comctl32/tests/propsheet.c +++ b/dlls/comctl32/tests/propsheet.c @@ -1058,7 +1058,7 @@ static UINT CALLBACK proppage_callback_a(HWND hwnd, UINT msg, PROPSHEETPAGEA *ps if (psp->dwSize >= FIELD_OFFSET(struct custom_proppage, addref_called)) { struct custom_proppage *extra_data = (struct custom_proppage *)psp; - todo_wine ok(extra_data->extra_data == 0x1234, "Expected extra_data to be preserved, got %lx\n", + ok(extra_data->extra_data == 0x1234, "Expected extra_data to be preserved, got %lx\n", extra_data->extra_data); } @@ -1092,7 +1092,7 @@ static UINT CALLBACK proppage_callback_w(HWND hwnd, UINT msg, PROPSHEETPAGEW *ps if (psp->dwSize >= FIELD_OFFSET(struct custom_proppage, addref_called)) { struct custom_proppage *extra_data = (struct custom_proppage *)psp; - todo_wine ok(extra_data->extra_data == 0x4321, "Expected extra_data to be preserved, got %lx\n", + ok(extra_data->extra_data == 0x4321, "Expected extra_data to be preserved, got %lx\n", extra_data->extra_data); }
1
0
0
0
Piotr Caban : comctl32: Fix PROPSHEETPAGE[AW] structure content in messages and callbacks.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: wine Branch: master Commit: cae20edb0ba0cfb65db10021277061405d8a58ee URL:
https://gitlab.winehq.org/wine/wine/-/commit/cae20edb0ba0cfb65db10021277061…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Sep 26 17:06:07 2022 +0200 comctl32: Fix PROPSHEETPAGE[AW] structure content in messages and callbacks. --- dlls/comctl32/propsheet.c | 370 +++++++++++++++++++++++----------------- dlls/comctl32/tests/propsheet.c | 4 +- 2 files changed, 220 insertions(+), 154 deletions(-)
1
0
0
0
Piotr Caban : comctl32: Don't use PROPSHEETPAGE structure to store internal HPROPSHEETPAGE data.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: wine Branch: master Commit: eb5a4f216079a4ea056611c8e658478a74ef4fd4 URL:
https://gitlab.winehq.org/wine/wine/-/commit/eb5a4f216079a4ea056611c8e65847…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Sep 26 13:11:56 2022 +0200 comctl32: Don't use PROPSHEETPAGE structure to store internal HPROPSHEETPAGE data. --- dlls/comctl32/propsheet.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index 95b464934dc..3d9ed5b961a 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -97,7 +97,8 @@ typedef struct struct _PSP { - ULONG_PTR magic; + DWORD magic; + BOOL unicode; PROPSHEETPAGEW psp; PROPSHEETPAGEW callback_psp; }; @@ -149,8 +150,6 @@ typedef struct static const WCHAR PropSheetInfoStr[] = L"PropertySheetInfo"; -#define PSP_INTERNAL_UNICODE 0x80000000 - #define MAX_CAPTION_LENGTH 255 #define MAX_TABTEXT_LENGTH 255 #define MAX_BUTTONTEXT_LENGTH 64 @@ -361,7 +360,7 @@ static const DLGTEMPLATE* HPSP_load_template(HPROPSHEETPAGE hpsp, DWORD *size) return hpsp->psp.u.pResource; } - if (hpsp->psp.dwFlags & PSP_INTERNAL_UNICODE) + if (hpsp->unicode) { res = FindResourceW(hpsp->psp.hInstance, hpsp->psp.u.pszTemplate, (LPWSTR)RT_DIALOG); @@ -428,7 +427,7 @@ static HWND HPSP_create_page(HPROPSHEETPAGE hpsp, DLGTEMPLATE *template, HWND pa { HWND hwnd; - if(hpsp->psp.dwFlags & PSP_INTERNAL_UNICODE) + if (hpsp->unicode) { hwnd = CreateDialogIndirectParamW(hpsp->psp.hInstance, template, parent, hpsp->psp.pfnDlgProc, (LPARAM)&hpsp->psp); @@ -3017,8 +3016,6 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageA( min(lpPropSheetPage->dwSize, sizeof(PROPSHEETPAGEA))); } - ppsp->dwFlags &= ~PSP_INTERNAL_UNICODE; - if ( !(ppsp->dwFlags & PSP_DLGINDIRECT) ) { if (!IS_INTRESOURCE( ppsp->u.pszTemplate )) @@ -3088,6 +3085,7 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage ret = Alloc(sizeof(*ret)); ret->magic = HPROPSHEETPAGE_MAGIC; + ret->unicode = TRUE; ppsp = &ret->psp; memcpy(ppsp, lpPropSheetPage, min(lpPropSheetPage->dwSize, sizeof(PROPSHEETPAGEW))); /* original data is used for callback notifications */ @@ -3097,8 +3095,6 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage min(lpPropSheetPage->dwSize, sizeof(PROPSHEETPAGEW))); } - ppsp->dwFlags |= PSP_INTERNAL_UNICODE; - if ( !(ppsp->dwFlags & PSP_DLGINDIRECT) ) { if (!IS_INTRESOURCE( ppsp->u.pszTemplate ))
1
0
0
0
Piotr Caban : comctl32: Create page if PROPSHEETPAGE was passed as HPROPSHEETPAGE to PropertySheetAW or PSM_INSERTPAGE.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: wine Branch: master Commit: fc767fd589c8544b59ad0508089636bde23b2059 URL:
https://gitlab.winehq.org/wine/wine/-/commit/fc767fd589c8544b59ad0508089636…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Sep 26 13:07:12 2022 +0200 comctl32: Create page if PROPSHEETPAGE was passed as HPROPSHEETPAGE to PropertySheetAW or PSM_INSERTPAGE. --- dlls/comctl32/propsheet.c | 39 +++++++++++++++++++++++++++++++++++++-- dlls/comctl32/tests/propsheet.c | 4 ++-- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index e043e34a6cd..95b464934dc 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -66,6 +66,8 @@ #include "wine/debug.h" +#define HPROPSHEETPAGE_MAGIC 0x5A9234E3 + /****************************************************************************** * Data structures */ @@ -95,6 +97,7 @@ typedef struct struct _PSP { + ULONG_PTR magic; PROPSHEETPAGEW psp; PROPSHEETPAGEW callback_psp; }; @@ -2302,6 +2305,14 @@ static BOOL PROPSHEET_InsertPage(HWND hwndDlg, HPROPSHEETPAGE hpageInsertAfter, if (!ppi) return FALSE; + if (hpage && hpage->magic != HPROPSHEETPAGE_MAGIC) + { + if (psInfo->unicode) + hpage = CreatePropertySheetPageW((const PROPSHEETPAGEW *)hpage); + else + hpage = CreatePropertySheetPageA((const PROPSHEETPAGEA *)hpage); + } + /* * Fill in a new PropPageInfo entry. */ @@ -2855,7 +2866,18 @@ INT_PTR WINAPI PropertySheetA(LPCPROPSHEETHEADERA lppsh) for (n = i = 0; i < lppsh->nPages; i++, n++) { if (!psInfo->usePropPage) - psInfo->proppage[n].hpage = psInfo->ppshheader.u3.phpage[i]; + { + if (psInfo->ppshheader.u3.phpage[i] && + psInfo->ppshheader.u3.phpage[i]->magic == HPROPSHEETPAGE_MAGIC) + { + psInfo->proppage[n].hpage = psInfo->ppshheader.u3.phpage[i]; + } + else + { + psInfo->proppage[n].hpage = CreatePropertySheetPageA( + (const PROPSHEETPAGEA *)psInfo->ppshheader.u3.phpage[i]); + } + } else { psInfo->proppage[n].hpage = CreatePropertySheetPageA((LPCPROPSHEETPAGEA)pByte); @@ -2895,7 +2917,18 @@ INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh) for (n = i = 0; i < lppsh->nPages; i++, n++) { if (!psInfo->usePropPage) - psInfo->proppage[n].hpage = psInfo->ppshheader.u3.phpage[i]; + { + if (psInfo->ppshheader.u3.phpage[i] && + psInfo->ppshheader.u3.phpage[i]->magic == HPROPSHEETPAGE_MAGIC) + { + psInfo->proppage[n].hpage = psInfo->ppshheader.u3.phpage[i]; + } + else + { + psInfo->proppage[n].hpage = CreatePropertySheetPageW( + (const PROPSHEETPAGEW *)psInfo->ppshheader.u3.phpage[i]); + } + } else { psInfo->proppage[n].hpage = CreatePropertySheetPageW((LPCPROPSHEETPAGEW)pByte); @@ -2974,6 +3007,7 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageA( return NULL; ret = Alloc(sizeof(*ret)); + ret->magic = HPROPSHEETPAGE_MAGIC; ppsp = &ret->psp; memcpy(ppsp, lpPropSheetPage, min(lpPropSheetPage->dwSize, sizeof(PROPSHEETPAGEA))); /* original data is used for callback notifications */ @@ -3053,6 +3087,7 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage return NULL; ret = Alloc(sizeof(*ret)); + ret->magic = HPROPSHEETPAGE_MAGIC; ppsp = &ret->psp; memcpy(ppsp, lpPropSheetPage, min(lpPropSheetPage->dwSize, sizeof(PROPSHEETPAGEW))); /* original data is used for callback notifications */ diff --git a/dlls/comctl32/tests/propsheet.c b/dlls/comctl32/tests/propsheet.c index 7e0e7087f67..cf435703d1e 100644 --- a/dlls/comctl32/tests/propsheet.c +++ b/dlls/comctl32/tests/propsheet.c @@ -1343,7 +1343,7 @@ static void test_invalid_hpropsheetpage(void) ret = SendMessageA(hdlg, PSM_INDEXTOPAGE, 0, 0); ok(ret, "page was not created\n"); - todo_wine ok((HPROPSHEETPAGE)ret != hpsp[0], "invalid HPROPSHEETPAGE was preserved\n"); + ok((HPROPSHEETPAGE)ret != hpsp[0], "invalid HPROPSHEETPAGE was preserved\n"); DestroyWindow(hdlg); memset(pspW, 0, sizeof(*pspW)); @@ -1383,7 +1383,7 @@ static void test_invalid_hpropsheetpage(void) ok(hdlg != INVALID_HANDLE_VALUE, "got invalid handle value %p\n", hdlg); ret = SendMessageA(hdlg, PSM_INDEXTOPAGE, 0, 0); - todo_wine ok(ret, "page was not created\n"); + ok(ret, "page was not created\n"); ok((HPROPSHEETPAGE)ret != hpsp[0], "invalid HPROPSHEETPAGE was preserved\n"); DestroyWindow(hdlg); }
1
0
0
0
Alexandre Julliard : makefiles: Store PE objects in subdirectories in the build tree.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: wine Branch: master Commit: 6a912649188a765d0c58e8b26e093fb0c31b3e3d URL:
https://gitlab.winehq.org/wine/wine/-/commit/6a912649188a765d0c58e8b26e093f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Oct 26 11:04:43 2022 +0200 makefiles: Store PE objects in subdirectories in the build tree. This will make it possible to build multiple PE architectures. --- dlls/ntdll/loader.c | 4 +- dlls/ntdll/unix/loader.c | 39 ++++++++++-------- dlls/setupapi/fakedll.c | 32 +++++++++------ programs/winecfg/libraries.c | 10 +++-- tools/makedep.c | 98 +++++++++++++++++++++----------------------- tools/widl/widl.c | 4 +- tools/winegcc/utils.c | 15 ++++--- 7 files changed, 108 insertions(+), 94 deletions(-)
1
0
0
0
Alexandre Julliard : makedep: Make the disabled flag architecture-generic.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: wine Branch: master Commit: 8d43170b9f0ecb1d2add205b3167be395e536a4a URL:
https://gitlab.winehq.org/wine/wine/-/commit/8d43170b9f0ecb1d2add205b3167be…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Oct 26 11:03:51 2022 +0200 makedep: Make the disabled flag architecture-generic. --- tools/makedep.c | 121 +++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 76 insertions(+), 45 deletions(-)
1
0
0
0
Alexandre Julliard : makedep: Add a helper function to build an arch-specific module name.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: wine Branch: master Commit: 6cfdd7e97c290eb121448fffbc75e35c40995dde URL:
https://gitlab.winehq.org/wine/wine/-/commit/6cfdd7e97c290eb121448fffbc75e3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Oct 26 11:03:42 2022 +0200 makedep: Add a helper function to build an arch-specific module name. --- tools/makedep.c | 54 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index 23035291df6..9f7a53fb2ce 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -608,6 +608,15 @@ static int is_multiarch( unsigned int arch ) } +/******************************************************************* + * arch_module_name + */ +static char *arch_module_name( const char *module, unsigned int arch ) +{ + return strmake( "%s%s", module, arch ? "" : dll_ext ); +} + + /******************************************************************* * arch_make_variable */ @@ -3038,7 +3047,7 @@ static void output_source_spec( struct makefile *make, struct incl_file *source, strarray_addall( &all_libs, add_import_libs( make, &dep_libs, imports, IMPORT_TYPE_DIRECT, arch ) ); strarray_addall( &all_libs, add_import_libs( make, &dep_libs, default_imports, IMPORT_TYPE_DEFAULT, arch ) ); - dll_name = strmake( "%s.dll%s", obj, arch ? "" : dll_ext ); + dll_name = arch_module_name( strmake( "%s.dll", obj ), arch ); obj_name = strmake( "%s%s", obj_dir_path( make, obj ), arch ? ".cross.o" : ".o" ); output_file = obj_dir_path( make, dll_name ); @@ -3150,10 +3159,10 @@ static void output_source_one_arch( struct makefile *make, struct incl_file *sou strarray_add( &make->ok_files, ok_file ); output( "%s:\n", obj_dir_path( make, ok_file )); - output( "\t%s%s $(RUNTESTFLAGS) -T . -M %s -p %s%s %s && touch $@\n", + output( "\t%s%s $(RUNTESTFLAGS) -T . -M %s -p %s %s && touch $@\n", cmd_prefix( "TEST" ), root_src_dir_path( "tools/runtest" ), make->testdll, - obj_dir_path( make, test_exe ), arch ? "" : dll_ext, obj ); + obj_dir_path( make, arch_module_name( test_exe, arch )), obj ); } } @@ -3254,8 +3263,7 @@ static void output_module( struct makefile *make, unsigned int arch ) if (!make->data_only) { - if (*dll_ext && !arch && !make->data_only) - module_name = strmake( "%s%s", make->module, dll_ext ); + module_name = arch_module_name( make->module, arch ); if (!strarray_exists( &make->extradllflags, "-nodefaultlibs" )) default_imports = get_default_imports( make, imports ); @@ -3516,23 +3524,21 @@ static void output_shared_lib( struct makefile *make ) */ static void output_test_module( struct makefile *make, unsigned int arch ) { - char *testmodule = replace_extension( make->testdll, ".dll", "_test.exe" ); - char *stripped = replace_extension( make->testdll, ".dll", "_test-stripped.exe" ); - char *testres = replace_extension( make->testdll, ".dll", "_test.res" ); + char *basemodule = replace_extension( make->testdll, ".dll", "" ); + char *stripped = arch_module_name( strmake( "%s_test-stripped.exe", basemodule ), arch ); + char *testmodule = arch_module_name( strmake( "%s_test.exe", basemodule ), arch ); struct strarray default_imports = get_default_imports( make, make->imports ); - struct strarray dep_libs = empty_strarray, all_libs = empty_strarray; + struct strarray dep_libs = empty_strarray; + struct strarray all_libs = empty_strarray; struct makefile *parent = get_parent_makefile( make ); - const char *ext = arch ? "" : dll_ext; const char *debug_file; - char *output_file; strarray_addall( &all_libs, add_import_libs( make, &dep_libs, make->imports, IMPORT_TYPE_DIRECT, arch ) ); strarray_addall( &all_libs, add_import_libs( make, &dep_libs, default_imports, IMPORT_TYPE_DEFAULT, arch ) ); - strarray_add( &make->all_targets[arch], strmake( "%s%s", testmodule, ext )); - strarray_add( &make->clean_files, strmake( "%s%s", stripped, ext )); - output_file = strmake( "%s%s", obj_dir_path( make, testmodule ), ext ); - output( "%s:\n", output_file ); + strarray_add( &make->all_targets[arch], testmodule ); + strarray_add( &make->clean_files, stripped ); + output( "%s:\n", obj_dir_path( make, testmodule )); output_winegcc_command( make, arch ); output_filenames( make->extradllflags ); output_filenames_obj_dir( make, make->object_files[arch] ); @@ -3542,17 +3548,17 @@ static void output_test_module( struct makefile *make, unsigned int arch ) output_filenames( all_libs ); output_filename( arch_make_variable( "LDFLAGS", arch )); output( "\n" ); - output( "%s%s:\n", obj_dir_path( make, stripped ), ext ); + output( "%s:\n", obj_dir_path( make, stripped )); output_winegcc_command( make, arch ); output_filename( "-s" ); - output_filename( strmake( "-Wb,-F,%s", testmodule )); + output_filename( strmake( "-Wb,-F,%s_test.exe", basemodule )); output_filenames( make->extradllflags ); output_filenames_obj_dir( make, make->object_files[arch] ); output_filenames_obj_dir( make, make->res_files[arch] ); output_filenames( all_libs ); output_filename( arch_make_variable( "LDFLAGS", arch )); output( "\n" ); - output( "%s%s %s%s:", obj_dir_path( make, testmodule ), ext, obj_dir_path( make, stripped ), ext ); + output( "%s %s:", obj_dir_path( make, testmodule ), obj_dir_path( make, stripped )); output_filenames_obj_dir( make, make->object_files[arch] ); output_filenames_obj_dir( make, make->res_files[arch] ); output_filenames( dep_libs ); @@ -3560,16 +3566,16 @@ static void output_test_module( struct makefile *make, unsigned int arch ) output_filename( tools_path( make, "winegcc" )); output( "\n" ); - output( "programs/winetest/%s: %s%s\n", testres, obj_dir_path( make, stripped ), ext ); - output( "\t%secho \"%s TESTRES \\\"%s%s\\\"\" | %s -u -o $@\n", cmd_prefix( "WRC" ), - testmodule, obj_dir_path( make, stripped ), ext, tools_path( make, "wrc" )); + output( "programs/winetest/%s_test.res: %s\n", basemodule, obj_dir_path( make, stripped )); + output( "\t%secho \"%s_test.exe TESTRES \\\"%s\\\"\" | %s -u -o $@\n", cmd_prefix( "WRC" ), + basemodule, obj_dir_path( make, stripped ), tools_path( make, "wrc" )); output_filenames_obj_dir( make, make->ok_files ); - output( ": %s%s", obj_dir_path( make, testmodule ), ext ); + output( ": %s", obj_dir_path( make, testmodule )); if (parent) { - output_filename( parent->is_cross ? obj_dir_path( parent, make->testdll ) - : strmake( "%s%s", obj_dir_path( parent, make->testdll ), dll_ext )); + char *parent_module = arch_module_name( make->testdll, parent->use_msvcrt ? arch : 0 ); + output_filename( obj_dir_path( parent, parent_module )); if (parent->unixlib) output_filename( obj_dir_path( parent, parent->unixlib )); } output( "\n" );
1
0
0
0
Alexandre Julliard : makedep: Add a helper function to get a cross-compilation make variable.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: wine Branch: master Commit: 5574c22d548de6e78e36ee1e5b6a5ba8229f416c URL:
https://gitlab.winehq.org/wine/wine/-/commit/5574c22d548de6e78e36ee1e5b6a5b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Oct 26 11:03:33 2022 +0200 makedep: Add a helper function to get a cross-compilation make variable. --- tools/makedep.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index cb36e43b398..23035291df6 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -608,6 +608,15 @@ static int is_multiarch( unsigned int arch ) } +/******************************************************************* + * arch_make_variable + */ +static char *arch_make_variable( const char *name, unsigned int arch ) +{ + return arch ? strmake( "$(CROSS%s)", name ) : strmake( "$(%s)", name ); +} + + /******************************************************************* * obj_dir_path */ @@ -3058,7 +3067,7 @@ static void output_source_spec( struct makefile *make, struct incl_file *source, if ((debug_file = get_debug_file( make, dll_name, arch ))) output_filename( strmake( "-Wl,--debug-file,%s", obj_dir_path( make, debug_file ))); output_filenames( all_libs ); - output_filename( arch ? "$(CROSSLDFLAGS)" : "$(LDFLAGS)" ); + output_filename( arch_make_variable( "LDFLAGS", arch )); output( "\n" ); } @@ -3098,11 +3107,10 @@ static void output_source_one_arch( struct makefile *make, struct incl_file *sou strarray_add( &make->clean_files, obj_name ); output( "%s: %s\n", obj_dir_path( make, obj_name ), source->filename ); - output( "\t%s%s -c -o $@ %s", cmd_prefix( "CC" ), arch ? "$(CROSSCC)" : "$(CC)", source->filename ); + output( "\t%s%s -c -o $@ %s", cmd_prefix( "CC" ), arch_make_variable( "CC", arch ), source->filename ); output_filenames( defines ); if (!source->use_msvcrt) output_filenames( make->unix_cflags ); output_filenames( make->extlib ? extra_cflags_extlib[arch] : extra_cflags[arch] ); - if (!arch) { if (make->sharedlib || (source->file->flags & FLAG_C_UNIX)) @@ -3129,7 +3137,7 @@ static void output_source_one_arch( struct makefile *make, struct incl_file *sou output_filename( "-Wformat" ); output_filenames( cpp_flags ); - output_filename( arch ? "$(CROSSCFLAGS)" : "$(CFLAGS)" ); + output_filename( arch_make_variable( "CFLAGS", arch )); output( "\n" ); if (make->testdll && !is_dll_src && strendswith( source->name, ".c" ) && @@ -3301,7 +3309,7 @@ static void output_module( struct makefile *make, unsigned int arch ) debug_file = get_debug_file( make, make->module, arch ); if (debug_file) output_filename( strmake( "-Wl,--debug-file,%s", obj_dir_path( make, debug_file ))); output_filenames( all_libs ); - output_filename( arch ? "$(CROSSLDFLAGS)" : "$(LDFLAGS)" ); + output_filename( arch_make_variable( "LDFLAGS", arch )); output( "\n" ); if (*dll_ext && make->is_exe && !make->is_win16 && strendswith( make->module, ".exe" )) @@ -3532,7 +3540,7 @@ static void output_test_module( struct makefile *make, unsigned int arch ) if ((debug_file = get_debug_file( make, testmodule, arch ))) output_filename( strmake( "-Wl,--debug-file,%s", obj_dir_path( make, debug_file ))); output_filenames( all_libs ); - output_filename( arch ? "$(CROSSLDFLAGS)" : "$(LDFLAGS)" ); + output_filename( arch_make_variable( "LDFLAGS", arch )); output( "\n" ); output( "%s%s:\n", obj_dir_path( make, stripped ), ext ); output_winegcc_command( make, arch ); @@ -3542,7 +3550,7 @@ static void output_test_module( struct makefile *make, unsigned int arch ) output_filenames_obj_dir( make, make->object_files[arch] ); output_filenames_obj_dir( make, make->res_files[arch] ); output_filenames( all_libs ); - output_filename( arch ? "$(CROSSLDFLAGS)" : "$(LDFLAGS)" ); + output_filename( arch_make_variable( "LDFLAGS", arch )); output( "\n" ); output( "%s%s %s%s:", obj_dir_path( make, testmodule ), ext, obj_dir_path( make, stripped ), ext ); output_filenames_obj_dir( make, make->object_files[arch] );
1
0
0
0
Alexandre Julliard : makedep: Add a helper function to build a source file for one architecture.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: wine Branch: master Commit: 7d4ce928ef5195d0bc1cae45d120d1ae4bd4352c URL:
https://gitlab.winehq.org/wine/wine/-/commit/7d4ce928ef5195d0bc1cae45d120d1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Oct 26 11:03:20 2022 +0200 makedep: Add a helper function to build a source file for one architecture. --- tools/makedep.c | 158 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 91 insertions(+), 67 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index 68bba96d5df..cb36e43b398 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -2337,7 +2337,7 @@ static struct strarray get_source_defines( struct makefile *make, struct incl_fi } strarray_addall( &ret, make->define_args ); strarray_addall( &ret, get_expanded_file_local_var( make, obj, "EXTRADEFS" )); - if ((source->file->flags & FLAG_C_UNIX) && *dll_ext) strarray_add( &ret, "-DWINE_UNIX_LIB" ); + if (source->file->flags & FLAG_C_UNIX) strarray_add( &ret, "-DWINE_UNIX_LIB" ); return ret; } @@ -3064,43 +3064,47 @@ static void output_source_spec( struct makefile *make, struct incl_file *source, /******************************************************************* - * output_source_default + * output_source_one_arch */ -static void output_source_default( struct makefile *make, struct incl_file *source, const char *obj ) +static void output_source_one_arch( struct makefile *make, struct incl_file *source, const char *obj, + struct strarray defines, struct strarray *targets, + unsigned int arch, int is_dll_src ) { - struct strarray defines = get_source_defines( make, source, obj ); - unsigned int arch = make->is_cross ? 1 : 0; - int is_dll_src = (make->testdll && - strendswith( source->name, ".c" ) && - find_src_file( make, replace_extension( source->name, ".c", ".spec" ))); - int need_cross = (archs.count > 1 && - !(source->file->flags & FLAG_C_UNIX) && - (arch || make->staticlib || - (source->file->flags & FLAG_C_IMPLIB))); - int need_obj = ((*dll_ext || !(source->file->flags & FLAG_C_UNIX)) && - (!need_cross || - (source->file->flags & FLAG_C_IMPLIB) || - (make->staticlib && !make->extlib))); - - if ((source->file->flags & FLAG_GENERATED) && - (!make->testdll || !strendswith( source->filename, "testlist.c" ))) - strarray_add( &make->clean_files, source->basename ); - - if (need_obj) - { - if ((source->file->flags & FLAG_C_UNIX) && *dll_ext) - strarray_add( &make->unixobj_files, strmake( "%s.o", obj )); - else if (source->file->flags & FLAG_C_IMPLIB) - strarray_add( &make->implib_files[0], strmake( "%s.o", obj )); - else if (!is_dll_src) - strarray_add( &make->object_files[0], strmake( "%s.o", obj )); - else - strarray_add( &make->clean_files, strmake( "%s.o", obj )); - output( "%s.o: %s\n", obj_dir_path( make, obj ), source->filename ); - output( "\t%s$(CC) -c -o $@ %s", cmd_prefix( "CC" ), source->filename ); - output_filenames( defines ); - if (!source->use_msvcrt) output_filenames( make->unix_cflags ); - output_filenames( make->extlib ? extra_cflags_extlib[0] : extra_cflags[0] ); + const char *obj_name; + + if (arch) + { + if (source->file->flags & FLAG_C_UNIX) return; + if (!make->use_msvcrt && !make->staticlib && !(source->file->flags & FLAG_C_IMPLIB)) return; + } + else if (source->file->flags & FLAG_C_UNIX) + { + if (!*dll_ext) return; + } + else if (archs.count > 1 && make->use_msvcrt && + !(source->file->flags & FLAG_C_IMPLIB) && + (!make->staticlib || make->extlib)) return; + + obj_name = strmake( "%s%s.o", obj, arch ? ".cross" : "" ); + strarray_add( targets, obj_name ); + + if (source->file->flags & FLAG_C_UNIX) + strarray_add( &make->unixobj_files, obj_name ); + else if (source->file->flags & FLAG_C_IMPLIB) + strarray_add( &make->implib_files[arch], obj_name ); + else if (!is_dll_src) + strarray_add( &make->object_files[arch], obj_name ); + else + strarray_add( &make->clean_files, obj_name ); + + output( "%s: %s\n", obj_dir_path( make, obj_name ), source->filename ); + output( "\t%s%s -c -o $@ %s", cmd_prefix( "CC" ), arch ? "$(CROSSCC)" : "$(CC)", source->filename ); + output_filenames( defines ); + if (!source->use_msvcrt) output_filenames( make->unix_cflags ); + output_filenames( make->extlib ? extra_cflags_extlib[arch] : extra_cflags[arch] ); + + if (!arch) + { if (make->sharedlib || (source->file->flags & FLAG_C_UNIX)) { output_filenames( unix_dllflags ); @@ -3112,47 +3116,67 @@ static void output_source_default( struct makefile *make, struct incl_file *sour if (!*dll_ext && make->module && is_crt_module( make->module )) output_filename( "-fno-builtin" ); } - output_filenames( cpp_flags ); - output_filename( "$(CFLAGS)" ); - output( "\n" ); } - if (need_cross) + else { - if (source->file->flags & FLAG_C_IMPLIB) - strarray_add( &make->implib_files[arch], strmake( "%s.cross.o", obj )); - else if (!is_dll_src) - strarray_add( &make->object_files[arch], strmake( "%s.cross.o", obj )); - else - strarray_add( &make->clean_files, strmake( "%s.cross.o", obj )); - output( "%s.cross.o: %s\n", obj_dir_path( make, obj ), source->filename ); - output( "\t%s$(CROSSCC) -c -o $@ %s", cmd_prefix( "CC" ), source->filename ); - output_filenames( defines ); - output_filenames( make->extlib ? extra_cflags_extlib[arch] : extra_cflags[arch] ); - if (make->module && is_crt_module( make->module )) - output_filename( "-fno-builtin" ); - /* force -Wformat when using 'long' types, until all modules have been converted - * and we can remove -Wno-format */ - if (!make->extlib && strarray_exists( &extra_cflags[arch], "-Wno-format" ) && - !strarray_exists( &defines, "-DWINE_NO_LONG_TYPES" )) - output_filename( "-Wformat" ); - output_filenames( cpp_flags ); - output_filename( "$(CROSSCFLAGS)" ); - output( "\n" ); + if (make->module && is_crt_module( make->module )) output_filename( "-fno-builtin" ); } + + /* force -Wformat when using 'long' types, until all modules have been converted + * and we can remove -Wno-format */ + if (!make->extlib && strarray_exists( &extra_cflags[arch], "-Wno-format" ) && + !strarray_exists( &defines, "-DWINE_NO_LONG_TYPES" )) + output_filename( "-Wformat" ); + + output_filenames( cpp_flags ); + output_filename( arch ? "$(CROSSCFLAGS)" : "$(CFLAGS)" ); + output( "\n" ); + if (make->testdll && !is_dll_src && strendswith( source->name, ".c" ) && !(source->file->flags & FLAG_GENERATED)) { - strarray_add( &make->test_files, obj ); - strarray_add( &make->ok_files, strmake( "%s.ok", obj )); - output( "%s.ok:\n", obj_dir_path( make, obj )); + const char *ok_file, *test_exe; + + ok_file = strmake( "%s.ok", obj ); + test_exe = replace_extension( make->testdll, ".dll", "_test.exe" ); + + strarray_add( &make->ok_files, ok_file ); + output( "%s:\n", obj_dir_path( make, ok_file )); output( "\t%s%s $(RUNTESTFLAGS) -T . -M %s -p %s%s %s && touch $@\n", cmd_prefix( "TEST" ), root_src_dir_path( "tools/runtest" ), make->testdll, - obj_dir_path( make, replace_extension( make->testdll, ".dll", "_test.exe" )), - arch ? "" : dll_ext, obj ); + obj_dir_path( make, test_exe ), arch ? "" : dll_ext, obj ); + } +} + + +/******************************************************************* + * output_source_default + */ +static void output_source_default( struct makefile *make, struct incl_file *source, const char *obj ) +{ + struct strarray defines = get_source_defines( make, source, obj ); + struct strarray targets = empty_strarray; + int is_dll_src = (make->testdll && strendswith( source->name, ".c" ) && + find_src_file( make, replace_extension( source->name, ".c", ".spec" ))); + unsigned int arch; + + for (arch = 0; arch < archs.count; arch++) + if (!source->arch || source->arch == arch) + output_source_one_arch( make, source, obj, defines, &targets, arch, is_dll_src ); + + if (source->file->flags & FLAG_GENERATED) + { + if (!make->testdll || !strendswith( source->filename, "testlist.c" )) + strarray_add( &make->clean_files, source->basename ); + } + else + { + if (make->testdll && !is_dll_src && strendswith( source->name, ".c" )) + strarray_add( &make->test_files, obj ); } - if (need_obj) output_filename( strmake( "%s.o", obj_dir_path( make, obj ))); - if (need_cross) output_filename( strmake( "%s.cross.o", obj_dir_path( make, obj ))); + + output_filenames_obj_dir( make, targets ); output( ":" ); output_filenames( source->dependencies ); output( "\n" );
1
0
0
0
Francisco Casas : tests: Add additional tests for explicit casts with flat matrices and vectors.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: vkd3d Branch: master Commit: b711b2d66b5fe851ff61a08b52eef504317fac5a URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/b711b2d66b5fe851ff61a08b52eef…
Author: Francisco Casas <fcasas(a)codeweavers.com> Date: Tue Oct 18 16:45:17 2022 -0300 tests: Add additional tests for explicit casts with flat matrices and vectors. --- tests/cast-componentwise-compatible.shader_test | 203 ++++++++++++++++++++++++ 1 file changed, 203 insertions(+) diff --git a/tests/cast-componentwise-compatible.shader_test b/tests/cast-componentwise-compatible.shader_test index 95378d66..da55628b 100644 --- a/tests/cast-componentwise-compatible.shader_test +++ b/tests/cast-componentwise-compatible.shader_test @@ -379,3 +379,206 @@ float4 main() : sv_target vec = (float3) mat; return 0; } + + +[pixel shader fail] +float4 main() : sv_target +{ + float arr[5] = {1, 2, 3, 4, 5}; + float4x1 mat; + + mat = (float4x1) arr; + return 0; +} + + +[pixel shader] +float4 main() : sv_target +{ + float arr[5] = {81, 82, 83, 84, 85}; + int1x4 mat; + + mat = (int1x4) arr; + return float4(mat); +} + + +[test] +draw quad +probe all rgba (81.0, 82.0, 83.0, 84.0) + + +[pixel shader] +float4 main() : sv_target +{ + float4x1 mat = {91, 92, 93, 94}; + int arr[3]; + + arr = (int[3]) mat; + return float4(arr, 0); +} + + +[test] +draw quad +probe all rgba (91.0, 92.0, 93.0, 0.0) + + +[pixel shader] +float4 main() : sv_target +{ + float1x4 mat = {11, 12, 13, 14}; + int arr[3]; + + arr = (int[3]) mat; + return float4(arr, 0); +} + + +[test] +draw quad +probe all rgba (11.0, 12.0, 13.0, 0.0) + + +[pixel shader fail] +struct apple +{ + float3 aa; + float2 bb; +}; + + +float4 main() : sv_target +{ + struct apple a = {1, 2, 3, 4, 5}; + float4x1 mat; + + mat = (float4x1) a; + return 0; +} + + +[pixel shader] +struct apple +{ + float3 aa; + float2 bb; +}; + + +float4 main() : sv_target +{ + struct apple a = {21, 22, 23, 24, 25}; + float1x4 mat; + + mat = (float1x4) a; + return float4(mat); +} + + +[test] +draw quad +probe all rgba (21.0, 22.0, 23.0, 24.0) + + +[pixel shader] +struct apple +{ + int aa; + float2 bb; +}; + +float4 main() : sv_target +{ + float4x1 mat = {31, 32, 33, 34}; + struct apple a; + + a = (struct apple) mat; + return float4(a.aa, a.bb, 0); +} + + +[test] +draw quad +probe all rgba (31.0, 32.0, 33.0, 0.0) + + +[pixel shader] +struct apple +{ + int aa; + float2 bb; +}; + +float4 main() : sv_target +{ + float1x4 mat = {41, 42, 43, 44}; + struct apple a; + + a = (struct apple) mat; + return float4(a.aa, a.bb, 0); +} + + +[test] +draw quad +probe all rgba (41.0, 42.0, 43.0, 0.0) + + +[pixel shader] +float4 main() : sv_target +{ + float4 vec = {51, 52, 53, 54}; + int1x3 mat; + + mat = (int1x3) vec; + return float4(mat, 0); +} + + +[test] +draw quad +probe all rgba (51.0, 52.0, 53.0, 0.0) + + +[pixel shader fail] +float4 main() : sv_target +{ + float4 vec = {1, 2, 3, 4}; + float3x1 mat; + + mat = (float3x1) vec; + return 0; +} + + +[pixel shader] +float4 main() : sv_target +{ + float1x4 mat = {61, 62, 63, 64}; + int3 vec; + + vec = (int1x3) mat; + return float4(vec, 0); +} + + +[test] +draw quad +probe all rgba (61.0, 62.0, 63.0, 0.0) + + +[pixel shader] +float4 main() : sv_target +{ + float4x1 mat = {71, 72, 73, 74}; + int3 vec; + + vec = (int3) mat; + return float4(vec, 0); +} + + +[test] +draw quad +probe all rgba (71.0, 72.0, 73.0, 0.0)
1
0
0
0
Francisco Casas : tests: Add additional tests for explicit casts with matrices.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: vkd3d Branch: master Commit: fcef2693474d427caf75d16b3a4ed07bb02f6205 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/fcef2693474d427caf75d16b3a4ed…
Author: Francisco Casas <fcasas(a)codeweavers.com> Date: Tue Oct 18 14:46:00 2022 -0300 tests: Add additional tests for explicit casts with matrices. --- tests/cast-componentwise-compatible.shader_test | 141 ++++++++++++++++++++++++ 1 file changed, 141 insertions(+) diff --git a/tests/cast-componentwise-compatible.shader_test b/tests/cast-componentwise-compatible.shader_test index f8b990d0..95378d66 100644 --- a/tests/cast-componentwise-compatible.shader_test +++ b/tests/cast-componentwise-compatible.shader_test @@ -238,3 +238,144 @@ float4 main() : sv_target [test] draw quad probe all rgba (31.0, 32.0, 33.0, 33.0) + + +[pixel shader] +struct apple +{ + int2 aa; + float2 bb; +}; + +float4 main() : sv_target +{ + struct apple a = {41, 42, 43, 44}; + float2x2 mat; + + mat = (float2x2) a; + return float4(mat); +} + + +[test] +draw quad +probe all rgba (41.0, 42.0, 43.0, 44.0) + + +[pixel shader fail] +struct apple +{ + float2 aa; + float3 bb; +}; + +float4 main() : sv_target +{ + struct apple a = {1, 2, 3, 4, 5}; + float2x2 mat; + + mat = (float2x2) a; + return float4(mat); +} + + +[pixel shader] +struct apple +{ + float3 aa; + int bb; +}; + +float4 main() : sv_target +{ + float2x2 mat = {55, 56, 57, 58}; + struct apple a; + + a = (struct apple) mat; + return float4(a.aa, a.bb); +} + + +[test] +draw quad +probe all rgba (55.0, 56.0, 57.0, 58.0) + + +[pixel shader fail] +struct apple +{ + float2 aa; + float2 bb; +}; + +float4 main() : sv_target +{ + float3x2 mat = {1, 2, 3, 4, 5, 6}; + struct apple a; + + a = (struct apple) mat; + return float4(a.aa, a.bb); +} + + +[pixel shader] +float4 main() : sv_target +{ + float arr[4] = {61, 62, 63, 64}; + int2x2 mat; + + mat = (int2x2) arr; + return float4(mat); +} + +[test] +draw quad +probe all rgba (61.0, 62.0, 63.0, 64.0) + + +[pixel shader fail] +float4 main() : sv_target +{ + float arr[5] = {1, 2, 3, 4, 5}; + float2x2 mat; + + mat = (float2x2) arr; + return float4(mat); +} + + +[pixel shader] +float4 main() : sv_target +{ + float2x2 mat = {71, 72, 73, 74}; + int arr[4]; + + arr = (int[4]) mat; + return float4(arr); +} + +[test] +draw quad +probe all rgba (71.0, 72.0, 73.0, 74.0) + + +[pixel shader fail] +float4 main() : sv_target +{ + float2x2 mat = {1, 2, 3, 4}; + int arr[3]; + + arr = (int[3]) mat; + return 0; +} + + +[pixel shader fail] +float4 main() : sv_target +{ + float2x2 mat = {1, 2, 3, 4}; + float3 vec; + + vec = (float3) mat; + return 0; +}
1
0
0
0
Francisco Casas : tests: Add additional tests for explicit casts with vectors.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: vkd3d Branch: master Commit: 588645a79a8fbd87b329ee516ac054d83b31322a URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/588645a79a8fbd87b329ee516ac05…
Author: Francisco Casas <fcasas(a)codeweavers.com> Date: Fri Oct 14 13:08:30 2022 -0300 tests: Add additional tests for explicit casts with vectors. --- tests/cast-componentwise-compatible.shader_test | 55 +++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/tests/cast-componentwise-compatible.shader_test b/tests/cast-componentwise-compatible.shader_test index 4b342efb..f8b990d0 100644 --- a/tests/cast-componentwise-compatible.shader_test +++ b/tests/cast-componentwise-compatible.shader_test @@ -183,3 +183,58 @@ float4 main() : sv_target [test] draw quad probe all rgba (10.0, 10.0, 11.4, 12.4) + + +[pixel shader] +float4 main() : sv_target +{ + float f[5] = {11, 12, 13, 14, 15}; + int4 i; + + i = (int4) f; + return i; +} + + +[test] +draw quad +probe all rgba (11.0, 12.0, 13.0, 14.0) + + +[pixel shader] +struct apple +{ + int2 aa; + float bb[2]; + float cc; +}; + +float4 main() : sv_target +{ + struct apple a = {21, 22, 23.4, 24.4, 25.0}; + int4 i; + + i = (int4) a; + return i; +} + + +[test] +draw quad +probe all rgba (21.0, 22.0, 23.0, 24.0) + + +[pixel shader] +float4 main() : sv_target +{ + float4 f = {31.4, 32.4, 33.4, 34.4}; + int3 i; + + i = (int3) f; + return float4(i.x, i.y, i.z, i.z); +} + + +[test] +draw quad +probe all rgba (31.0, 32.0, 33.0, 33.0)
1
0
0
0
Francois Gouget : testbot: Add a message type for flaky failures.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: tools Branch: master Commit: 617f337d8616a94db3a7b37b829a538bab87a564 URL:
https://gitlab.winehq.org/winehq/tools/-/commit/617f337d8616a94db3a7b37b829…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Wed Sep 7 16:19:19 2022 +0200 testbot: Add a message type for flaky failures. In the .errors files flaky failures are identified as 'k' messages (instead of 'e' for regular failures). Flaky failures are also identified as old or new based on their presence in the reference reports and shown accordingly on the JobDetails page (the corresponding CSS class names now systematically contain the message type and prefix it with "new" for new messages). Before this patch new flaky failures were flagged as regular new failures which caused some false positives. Now WineSendLog can identify flaky failures and not count them as new failures, thus fixing the false positives. --- testbot/bin/WineRunTask.pl | 4 ++-- testbot/bin/WineRunWineTest.pl | 4 ++-- testbot/bin/WineSendLog.pl | 7 +++++-- testbot/lib/WineTestBot/LogUtils.pm | 24 ++++++++++++------------ testbot/web/JobDetails.pl | 16 +++++++++------- testbot/web/WineTestBot.css | 4 +++- 6 files changed, 33 insertions(+), 26 deletions(-) diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl index 85ba5df5..2eec9c73 100755 --- a/testbot/bin/WineRunTask.pl +++ b/testbot/bin/WineRunTask.pl @@ -562,8 +562,8 @@ if ($TA->GetFile($RptFileName, "$TaskDir/$RptFileName")) my $ErrMessages = SnapshotLatestReport($Task, $RptFileName); LogTaskError("$_\n") for (@$ErrMessages); - # $LogInfo->{eCount} can legitimately be undefined in case of a timeout - $TaskFailures += $LogInfo->{eCount} || 0; + # The message counters can legitimately be undefined in case of a timeout + $TaskFailures += ($LogInfo->{eCount} || 0) + ($LogInfo->{kCount} || 0); my $LogErrMsg = CreateLogErrorsCache($LogInfo, $Task); LogTaskError("$LogErrMsg\n") if (defined $LogErrMsg); } diff --git a/testbot/bin/WineRunWineTest.pl b/testbot/bin/WineRunWineTest.pl index 6b49677c..985fdc2a 100755 --- a/testbot/bin/WineRunWineTest.pl +++ b/testbot/bin/WineRunWineTest.pl @@ -578,8 +578,8 @@ foreach my $RptFileName (@$ReportNames) my $ErrMessages = SnapshotLatestReport($Task, $RptFileName); LogTaskError("$_\n") for (@$ErrMessages); - # $LogInfo->{eCount} can legitimately be undefined in case of a timeout - $TaskFailures += $LogInfo->{eCount} || 0; + # The message counters can legitimately be undefined in case of a timeout + $TaskFailures += ($LogInfo->{eCount} || 0) + ($LogInfo->{kCount} || 0); my $LogErrMsg = CreateLogErrorsCache($LogInfo, $Task); LogTaskError("$LogErrMsg\n") if (defined $LogErrMsg); } diff --git a/testbot/bin/WineSendLog.pl b/testbot/bin/WineSendLog.pl index 0246f89e..ab7b90c0 100755 --- a/testbot/bin/WineSendLog.pl +++ b/testbot/bin/WineSendLog.pl @@ -233,7 +233,8 @@ sub SendLog($) } $TaskInfo->{OldCount}++; } - elsif ($Group->{IsNew}->[$MsgIndex]) + elsif ($Group->{Types}->[$MsgIndex] eq "e" and + $Group->{IsNew}->[$MsgIndex]) { if (!$HasLogHeader) { @@ -248,7 +249,8 @@ sub SendLog($) push @New, "$Group->{Messages}->[$MsgIndex]\n"; $TaskInfo->{NewCount}++; } - else + elsif ($Group->{Types}->[$MsgIndex] eq "e" or + $Group->{Types}->[$MsgIndex] eq "k") # flaky => old failure { $TaskInfo->{OldCount}++; } @@ -403,6 +405,7 @@ EOF my $LineNo = $Group->{LineNos}->[$MsgIndex]; my $Bugs = $LogInfo->{Bugs}->{$LineNo}; my $Prefix = $Bugs ? join(" ", sort { $a <=> $b } @$Bugs) : + $Group->{Types}->[$MsgIndex] eq "k" ? "flk" : $Group->{IsNew}->[$MsgIndex] ? "new" : "old"; print $Sendmail "[$Prefix] $Group->{Messages}->[$MsgIndex]\n"; diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm index e7f147be..06751e78 100644 --- a/testbot/lib/WineTestBot/LogUtils.pm +++ b/testbot/lib/WineTestBot/LogUtils.pm @@ -497,9 +497,9 @@ sub _CloseTestUnit($$$) } } -sub _AddReportMsg($$$$) +sub _AddReportMsg($$$$$) { - my ($LogInfo, $Cur, $LineNo, $Line) = @_; + my ($LogInfo, $Cur, $LineNo, $Line, $Type) = @_; # Make the timeout messages more user-friendly my $ErrLine = $Line; @@ -513,7 +513,7 @@ sub _AddReportMsg($$$$) { $Cur->{Group} = _AddLogGroup($LogInfo, $Cur->{Dll}, $Cur->{GroupLineNo} || $LineNo); } - _AddLogMsg($LogInfo, $Cur->{Group}, $ErrLine, $LineNo, "e"); + _AddLogMsg($LogInfo, $Cur->{Group}, $ErrLine, $LineNo, $Type); } =pod @@ -589,7 +589,7 @@ sub ParseWineTestReport($$$) elsif ($InDlls == 1 and $Line =~ /^\s+\S+=(?:dll is native|load error \d+)$/) { - _AddReportMsg($LogInfo, $Cur, $LineNo, $Line); + _AddReportMsg($LogInfo, $Cur, $LineNo, $Line, "e"); $Cur->{LineFailures}++; } elsif ($Line =~ /^Test output:$/) @@ -626,7 +626,7 @@ sub ParseWineTestReport($$$) $Line =~ /^([_a-z0-9]+)\.c:\d+:[0-9.]* Test (?:failed|succeeded inside todo block): /) { _CheckUnit($LogInfo, $Cur, $1, "failure"); - _AddReportMsg($LogInfo, $Cur, $LineNo, "$&$'"); + _AddReportMsg($LogInfo, $Cur, $LineNo, "$&$'", "e"); $Cur->{LineFailures}++; } elsif (($Cur->{Unit} ne "" and @@ -634,7 +634,7 @@ sub ParseWineTestReport($$$) $Line =~ /^([_a-z0-9]+)\.c:\d+:[0-9.]* Test (?:marked flaky|succeeded inside flaky todo block): /) { _CheckUnit($LogInfo, $Cur, $1, "flaky"); - _AddReportMsg($LogInfo, $Cur, $LineNo, "$&$'"); + _AddReportMsg($LogInfo, $Cur, $LineNo, "$&$'", "k"); $Cur->{LineFlaky}++; } elsif (($Cur->{Unit} ne "" and @@ -663,7 +663,7 @@ sub ParseWineTestReport($$$) $Cur->{SummaryFailures}++; $LogInfo->{IsWineTest} = 1; - _AddReportMsg($LogInfo, $Cur, $LineNo, $Line); + _AddReportMsg($LogInfo, $Cur, $LineNo, $Line, "e"); $Cur->{LineFailures}++; } elsif (($Cur->{Unit} ne "" and @@ -686,7 +686,7 @@ sub ParseWineTestReport($$$) $Cur->{Pids}->{$Pid || 0} = 1; $Cur->{SummaryFailures}++; } - _AddReportMsg($LogInfo, $Cur, $LineNo, "$&$'"); + _AddReportMsg($LogInfo, $Cur, $LineNo, "$&$'", "e"); $Cur->{LineFailures}++; } } @@ -697,7 +697,7 @@ sub ParseWineTestReport($$$) # This also replaces a test summary line. The pid is unknown so use 0. $Cur->{Pids}->{0} = 1; $Cur->{SummaryFailures}++; - _AddReportMsg($LogInfo, $Cur, $LineNo, "$&$'"); + _AddReportMsg($LogInfo, $Cur, $LineNo, "$&$'", "e"); $Cur->{LineFailures}++; } } @@ -715,7 +715,7 @@ sub ParseWineTestReport($$$) $Cur->{Pids}->{$Pid || 0} = 1; $Cur->{SummaryFailures}++; } - _AddReportMsg($LogInfo, $Cur, $LineNo, $&); + _AddReportMsg($LogInfo, $Cur, $LineNo, $&, "e"); $Cur->{LineFailures}++; } } @@ -769,7 +769,7 @@ sub ParseWineTestReport($$$) # so record the failure but don't add an error message. $Cur->{IsBroken} = 1; $LogInfo->{TimeoutCount}++; - _AddReportMsg($LogInfo, $Cur, $LineNo, $&); + _AddReportMsg($LogInfo, $Cur, $LineNo, $&, "e"); } elsif ((!$Pid and !%{$Cur->{Pids}}) or ($Pid and !$Cur->{Pids}->{$Pid} and !$Cur->{Pids}->{0})) @@ -1014,7 +1014,7 @@ sub LoadLogErrorsFromFh($$) $LogInfo->{BadLog} = "$LogInfo->{LineNo}: Got a $Type line with no group"; return $Line; } - elsif ($Type eq "e" or $Type eq "E") + elsif ($Type eq "e" or $Type eq "E" or $Type eq "k" or $Type eq "K") { _AddLogMsg($LogInfo, $LogInfo->{CurGroup}, $Value, $Property, $Type); } diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl index ce51ca74..eed9eb30 100644 --- a/testbot/web/JobDetails.pl +++ b/testbot/web/JobDetails.pl @@ -425,7 +425,9 @@ sub GenerateFullLog($$$$$) my $LineNo = $Group->{LineNos}->[$MsgIndex]; if ($LineNo) { - $ErrCategory{$LineNo} = $Group->{IsNew}->[$MsgIndex] ? "new" : "error"; + $ErrCategory{$LineNo} = ($Group->{IsNew}->[$MsgIndex] ? "new" : ""). + ($Group->{Types}->[$MsgIndex] eq "k" ? "flaky" : + "error"); $ErrFailures{$LineNo} = $Group->{Failures}->{$MsgIndex}; if ($ErrFailures{$LineNo}) @@ -438,7 +440,7 @@ sub GenerateFullLog($$$$$) } } $LogBugs{-2} ||= [$LineNo, "First failure"]; - if ($ErrCategory{$LineNo} eq "new" and !$ErrFailures{$LineNo}) + if ($ErrCategory{$LineNo} eq "newerror" and !$ErrFailures{$LineNo}) { $LogBugs{-1} ||= [$LineNo, "First untracked new failure"]; $LogBugs{10000000} = [$LineNo, "Last untracked new failure"]; @@ -522,7 +524,7 @@ sub GenerateFullLog($$$$$) } my $Line = $Group->{Messages}->[$MsgIndex]; - my $Category = $Group->{IsNew}->[$MsgIndex] ? "new" : "error"; + my $Category = $Group->{IsNew}->[$MsgIndex] ? "newerror" : "error"; my $Html = $self->escapeHTML($Line); if ($Group->{Failures}->{$MsgIndex}) { @@ -695,10 +697,10 @@ EOF foreach my $Line (@{$Group->{Messages}}) { my $Html = $self->escapeHTML($Line); - if ($Group->{IsNew}->[$MsgIndex]) - { - $Html = "<span class='log-new'>$Html</span>"; - } + my $Category = ($Group->{IsNew}->[$MsgIndex] ? "new" : ""). + ($Group->{Types}->[$MsgIndex] eq "k" ? "flaky" : + "error"); + $Html = "<span class='log-$Category'>$Html</span>"; my $FailureIds = $Group->{Failures}->{$MsgIndex}; if ($FailureIds) { diff --git a/testbot/web/WineTestBot.css b/testbot/web/WineTestBot.css index c40b8546..e686e6f5 100644 --- a/testbot/web/WineTestBot.css +++ b/testbot/web/WineTestBot.css @@ -402,10 +402,12 @@ pre .log-info { background-color: #d9ffcc; } .log-skip { color: blue; } .log-todo { color: #d08000; } +.log-flaky { color: magenta; } +.log-newflaky { color: magenta; font-weight: bold; } .log-error { color: red; } +.log-newerror { color: red; font-weight: bold; } .log-boterror { color: #cc0052; } .log-diag { color: #e56300; } -.log-new { color: red; font-weight: bold; } .bug-missing { color: red; font-weight: bold; } .bug-closed { color: red; }
1
0
0
0
Francois Gouget : testbot: Allow tracking multiple message types, not just errors.
by Alexandre Julliard
26 Oct '22
26 Oct '22
Module: tools Branch: master Commit: 41584035d6e400aa2cadce6ac8b1fd48d2061302 URL:
https://gitlab.winehq.org/winehq/tools/-/commit/41584035d6e400aa2cadce6ac8b…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Apr 7 01:36:22 2020 +0200 testbot: Allow tracking multiple message types, not just errors. This can be used to track flaky failures and warnings separately from regular failures, while still distinguishing which are old / new. --- testbot/bin/WineRunBuild.pl | 4 +- testbot/bin/WineRunReconfig.pl | 4 +- testbot/bin/WineRunTask.pl | 6 +- testbot/bin/WineRunWineTest.pl | 12 +- testbot/bin/WineSendLog.pl | 37 ++--- testbot/lib/WineTestBot/LogUtils.pm | 300 ++++++++++++++++++++++-------------- testbot/tests/TestWTBS | 46 +++--- testbot/web/JobDetails.pl | 44 +++--- 8 files changed, 259 insertions(+), 194 deletions(-)
1
0
0
0
← Newer
1
2
3
4
5
...
11
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
Results per page:
10
25
50
100
200