winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
July 2020
----- 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
826 discussions
Start a n
N
ew thread
Alexandre Julliard : ntdll: Avoid using LdrQueryProcessModuleInformation() in the Unix library.
by Alexandre Julliard
10 Jul '20
10 Jul '20
Module: wine Branch: master Commit: afb16545671e7420c7a8bbb4ef97333c33001564 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=afb16545671e7420c7a8bbb4…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 10 07:58:35 2020 +0200 ntdll: Avoid using LdrQueryProcessModuleInformation() in the Unix library. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/system.c | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c index 07a3ad2154..c3dca7ffe2 100644 --- a/dlls/ntdll/unix/system.c +++ b/dlls/ntdll/unix/system.c @@ -2292,10 +2292,41 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class, } case SystemModuleInformation: - /* FIXME: should be system-wide */ + { + /* FIXME: return some fake info for now */ + static const char *fake_modules[] = + { + "\\SystemRoot\\system32\\ntoskrnl.exe", + "\\SystemRoot\\system32\\hal.dll", + "\\SystemRoot\\system32\\drivers\\mountmgr.sys" + }; + if (!info) ret = STATUS_ACCESS_VIOLATION; - else ret = LdrQueryProcessModuleInformation( info, size, &len ); + else + { + ULONG i; + SYSTEM_MODULE_INFORMATION *smi = info; + + len = offsetof( SYSTEM_MODULE_INFORMATION, Modules[ARRAY_SIZE(fake_modules)] ); + if (len <= size) + { + memset( smi, 0, len ); + for (i = 0; i < ARRAY_SIZE(fake_modules); i++) + { + SYSTEM_MODULE *sm = &smi->Modules[i]; + sm->ImageBaseAddress = (char *)0x10000000 + 0x200000 * i; + sm->ImageSize = 0x200000; + sm->LoadOrderIndex = i; + sm->LoadCount = 1; + strcpy( (char *)sm->Name, fake_modules[i] ); + sm->NameOffset = strrchr( fake_modules[i], '\\' ) - fake_modules[i] + 1; + } + smi->ModulesCount = i; + } + else ret = STATUS_INFO_LENGTH_MISMATCH; + } break; + } case SystemHandleInformation: {
1
0
0
0
Alexandre Julliard : ntdll: Avoid using RtlDosPathNameToNtPathName_U() in the Unix library.
by Alexandre Julliard
10 Jul '20
10 Jul '20
Module: wine Branch: master Commit: bcc3410732c60e32eaf3abd808be7482218f57d7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bcc3410732c60e32eaf3abd8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 10 07:58:14 2020 +0200 ntdll: Avoid using RtlDosPathNameToNtPathName_U() in the Unix library. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/process.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/unix/process.c b/dlls/ntdll/unix/process.c index 8a4da2cd55..67450fdb3d 100644 --- a/dlls/ntdll/unix/process.c +++ b/dlls/ntdll/unix/process.c @@ -476,6 +476,10 @@ static ULONG get_env_size( const RTL_USER_PROCESS_PARAMETERS *params, char **win */ static int get_unix_curdir( const RTL_USER_PROCESS_PARAMETERS *params ) { + static const WCHAR ntprefixW[] = {'\\','?','?','\\',0}; + static const WCHAR uncprefixW[] = {'U','N','C','\\',0}; + const UNICODE_STRING *curdir = ¶ms->CurrentDirectory.DosPath; + const WCHAR *dir = curdir->Buffer; UNICODE_STRING nt_name; OBJECT_ATTRIBUTES attr; IO_STATUS_BLOCK io; @@ -483,13 +487,27 @@ static int get_unix_curdir( const RTL_USER_PROCESS_PARAMETERS *params ) HANDLE handle; int fd = -1; - if (!RtlDosPathNameToNtPathName_U( params->CurrentDirectory.DosPath.Buffer, &nt_name, NULL, NULL )) - return -1; + if (!(nt_name.Buffer = malloc( curdir->Length + 8 * sizeof(WCHAR) ))) return -1; + + /* simplified version of RtlDosPathNameToNtPathName_U */ + wcscpy( nt_name.Buffer, ntprefixW ); + if (dir[0] == '\\' && dir[1] == '\\') + { + if ((dir[2] == '.' || dir[2] == '?') && dir[3] == '\\') dir += 4; + else + { + wcscat( nt_name.Buffer, uncprefixW ); + dir += 2; + } + } + wcscat( nt_name.Buffer, dir ); + nt_name.Length = wcslen( nt_name.Buffer ) * sizeof(WCHAR); + InitializeObjectAttributes( &attr, &nt_name, OBJ_CASE_INSENSITIVE, 0, NULL ); status = NtOpenFile( &handle, FILE_TRAVERSE | SYNCHRONIZE, &attr, &io, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT ); - RtlFreeUnicodeString( &nt_name ); + free( nt_name.Buffer ); if (status) return -1; server_handle_to_fd( handle, FILE_TRAVERSE, &fd, NULL ); NtClose( handle );
1
0
0
0
Alexandre Julliard : ntdll: Avoid using RtlInitUnicodeString() in the Unix library.
by Alexandre Julliard
10 Jul '20
10 Jul '20
Module: wine Branch: master Commit: 0357d2ca75be92e927bb785a786d3766c94f3c83 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0357d2ca75be92e927bb785a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 10 07:57:59 2020 +0200 ntdll: Avoid using RtlInitUnicodeString() in the Unix library. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/file.c | 3 ++- dlls/ntdll/unix/system.c | 16 +++++++++------- dlls/ntdll/unix/virtual.c | 10 ++++------ 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index 070aac3083..af7c214984 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -1993,7 +1993,8 @@ static NTSTATUS get_mountmgr_fs_info( HANDLE handle, int fd, struct mountmgr_uni else drive->letter = 'a' + letter; - RtlInitUnicodeString( &string, MOUNTMGR_DEVICE_NAME ); + string.Buffer = (WCHAR *)MOUNTMGR_DEVICE_NAME; + string.Length = sizeof(MOUNTMGR_DEVICE_NAME) - sizeof(WCHAR); InitializeObjectAttributes( &attr, &string, 0, NULL, NULL ); status = NtOpenFile( &mountmgr, GENERIC_READ | SYNCHRONIZE, &attr, &io, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_SYNCHRONOUS_IO_NONALERT ); diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c index 33fb37ec33..07a3ad2154 100644 --- a/dlls/ntdll/unix/system.c +++ b/dlls/ntdll/unix/system.c @@ -1729,7 +1729,8 @@ static BOOL reg_query_value( HKEY key, LPCWSTR name, DWORD type, void *data, DWO if (count > sizeof(buf) - sizeof(KEY_VALUE_PARTIAL_INFORMATION)) return FALSE; - RtlInitUnicodeString( &nameW, name ); + nameW.Buffer = (WCHAR *)name; + nameW.Length = wcslen( name ) * sizeof(WCHAR); if (NtQueryValueKey( key, &nameW, KeyValuePartialInformation, buf, sizeof(buf), &count )) return FALSE; @@ -1756,7 +1757,7 @@ static void find_reg_tz_info(RTL_DYNAMIC_TIME_ZONE_INFORMATION *tzi, const char* HANDLE key, subkey, subkey_dyn = 0; ULONG idx, len; OBJECT_ATTRIBUTES attr; - UNICODE_STRING nameW, nameDynamicW; + UNICODE_STRING nameW; WCHAR yearW[16]; char buffer[128]; KEY_BASIC_INFORMATION *info = (KEY_BASIC_INFORMATION *)buffer; @@ -1764,9 +1765,8 @@ static void find_reg_tz_info(RTL_DYNAMIC_TIME_ZONE_INFORMATION *tzi, const char* sprintf( buffer, "%u", year ); ascii_to_unicode( yearW, buffer, strlen(buffer) + 1 ); - RtlInitUnicodeString( &nameW, Time_ZonesW ); - RtlInitUnicodeString( &nameDynamicW, Dynamic_DstW ); - + nameW.Buffer = (WCHAR *)Time_ZonesW; + nameW.Length = sizeof(Time_ZonesW) - sizeof(WCHAR); InitializeObjectAttributes( &attr, &nameW, 0, 0, NULL ); if (NtOpenKey( &key, KEY_READ, &attr )) return; @@ -1785,7 +1785,7 @@ static void find_reg_tz_info(RTL_DYNAMIC_TIME_ZONE_INFORMATION *tzi, const char* nameW.Buffer = info->Name; nameW.Length = info->NameLength; - InitializeObjectAttributes( &attr, &nameW, 0, key, NULL ); + attr.RootDirectory = key; if (NtOpenKey( &subkey, KEY_READ, &attr )) continue; memset( ®_tzi, 0, sizeof(reg_tzi) ); @@ -1801,7 +1801,9 @@ static void find_reg_tz_info(RTL_DYNAMIC_TIME_ZONE_INFORMATION *tzi, const char* goto next; /* Check for Dynamic DST entry first */ - InitializeObjectAttributes( &attr, &nameDynamicW, 0, subkey, NULL ); + nameW.Buffer = (WCHAR *)Dynamic_DstW; + nameW.Length = sizeof(Dynamic_DstW) - sizeof(WCHAR); + attr.RootDirectory = subkey; if (!NtOpenKey( &subkey_dyn, KEY_READ, &attr )) { is_dynamic = reg_query_value( subkey_dyn, yearW, REG_BINARY, &tz_data, sizeof(tz_data) ); diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index 7592234ccc..4e5b1acf0b 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -2804,16 +2804,14 @@ void virtual_clear_thread_stack( void *stack_end ) */ void virtual_map_user_shared_data(void) { - static const WCHAR wine_usdW[] = {'\\','K','e','r','n','e','l','O','b','j','e','c','t','s', - '\\','_','_','w','i','n','e','_','u','s','e','r','_','s','h','a','r','e','d','_','d','a','t','a',0}; - OBJECT_ATTRIBUTES attr = {sizeof(attr)}; - UNICODE_STRING wine_usd_str; + static const WCHAR nameW[] = {'\\','K','e','r','n','e','l','O','b','j','e','c','t','s', + '\\','_','_','w','i','n','e','_','u','s','e','r','_','s','h','a','r','e','d','_','d','a','t','a',0}; + UNICODE_STRING name_str = { sizeof(nameW) - sizeof(WCHAR), sizeof(nameW), (WCHAR *)nameW }; + OBJECT_ATTRIBUTES attr = { sizeof(attr), 0, &name_str }; NTSTATUS status; HANDLE section; int res, fd, needs_close; - RtlInitUnicodeString( &wine_usd_str, wine_usdW ); - InitializeObjectAttributes( &attr, &wine_usd_str, OBJ_OPENIF, NULL, NULL ); if ((status = NtOpenSection( §ion, SECTION_ALL_ACCESS, &attr ))) { ERR( "failed to open the USD section: %08x\n", status );
1
0
0
0
Alexandre Julliard : ntdll: Move the FSCTL_PIPE_IMPERSONATE semi-stub to the server.
by Alexandre Julliard
10 Jul '20
10 Jul '20
Module: wine Branch: master Commit: 9ac3f24f744bf76c252fafb2c2e254bbbf38ed1e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9ac3f24f744bf76c252fafb2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 10 07:57:07 2020 +0200 ntdll: Move the FSCTL_PIPE_IMPERSONATE semi-stub to the server. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/file.c | 4 ++-- server/named_pipe.c | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index b4c9b75b3e..070aac3083 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -5665,8 +5665,8 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap case FSCTL_PIPE_IMPERSONATE: FIXME("FSCTL_PIPE_IMPERSONATE: impersonating self\n"); - status = RtlImpersonateSelf( SecurityImpersonation ); - break; + return server_ioctl_file( handle, event, apc, apc_context, io, code, + in_buffer, in_size, out_buffer, out_size ); case FSCTL_IS_VOLUME_MOUNTED: case FSCTL_LOCK_VOLUME: diff --git a/server/named_pipe.c b/server/named_pipe.c index f97b141641..b259abb8de 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -1138,6 +1138,17 @@ static int pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *as pipe_end_disconnect( &server->pipe_end, STATUS_PIPE_DISCONNECTED ); return 1; + case FSCTL_PIPE_IMPERSONATE: + if (current->process->token) /* FIXME: use the client token */ + { + struct token *token; + if (!(token = token_duplicate( current->process->token, 0, SecurityImpersonation, NULL ))) + return 0; + if (current->token) release_object( current->token ); + current->token = token; + } + return 1; + default: return pipe_end_ioctl( &server->pipe_end, code, async ); }
1
0
0
0
Alexandre Julliard : ntdll: Add a local helper function to check DOS 8.3 names.
by Alexandre Julliard
10 Jul '20
10 Jul '20
Module: wine Branch: master Commit: 4a49af0cbeb1bb5570d92f679c98ad05abc693e6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4a49af0cbeb1bb5570d92f67…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 10 07:56:39 2020 +0200 ntdll: Add a local helper function to check DOS 8.3 names. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/file.c | 82 +++++++++++++++++++++++++++++--------------------- 1 file changed, 48 insertions(+), 34 deletions(-) diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index e985c75a41..b4c9b75b3e 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -1263,11 +1263,11 @@ static BOOL is_hidden_file( const UNICODE_STRING *name ) * 'buffer' must be at least 12 characters long. * Returns length of short name in bytes; short name is NOT null-terminated. */ -static ULONG hash_short_file_name( const UNICODE_STRING *name, LPWSTR buffer ) +static ULONG hash_short_file_name( const WCHAR *name, int length, LPWSTR buffer ) { static const char hash_chars[32] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ012345"; - LPCWSTR p, ext, end = name->Buffer + name->Length / sizeof(WCHAR); + LPCWSTR p, ext, end = name + length; LPWSTR dst; unsigned short hash; int i; @@ -1277,22 +1277,22 @@ static ULONG hash_short_file_name( const UNICODE_STRING *name, LPWSTR buffer ) /* insert a better algorithm here... */ if (!is_case_sensitive) { - for (p = name->Buffer, hash = 0xbeef; p < end - 1; p++) + for (p = name, hash = 0xbeef; p < end - 1; p++) hash = (hash<<3) ^ (hash>>5) ^ towlower(*p) ^ (towlower(p[1]) << 8); hash = (hash<<3) ^ (hash>>5) ^ towlower(*p); /* Last character */ } else { - for (p = name->Buffer, hash = 0xbeef; p < end - 1; p++) + for (p = name, hash = 0xbeef; p < end - 1; p++) hash = (hash << 3) ^ (hash >> 5) ^ *p ^ (p[1] << 8); hash = (hash << 3) ^ (hash >> 5) ^ *p; /* Last character */ } /* Find last dot for start of the extension */ - for (p = name->Buffer + 1, ext = NULL; p < end - 1; p++) if (*p == '.') ext = p; + for (p = name + 1, ext = NULL; p < end - 1; p++) if (*p == '.') ext = p; /* Copy first 4 chars, replacing invalid chars with '_' */ - for (i = 4, p = name->Buffer, dst = buffer; i > 0; i--, p++) + for (i = 4, p = name, dst = buffer; i > 0; i--, p++) { if (p == end || p == ext) break; *dst++ = is_invalid_dos_char(*p) ? '_' : *p; @@ -1332,12 +1332,11 @@ static ULONG hash_short_file_name( const UNICODE_STRING *name, LPWSTR buffer ) * *test1.txt* test1.txt * * h?l?o*t.dat hellothisisatest.dat * */ -static BOOLEAN match_filename( const UNICODE_STRING *name_str, const UNICODE_STRING *mask_str ) +static BOOLEAN match_filename( const WCHAR *name, int length, const UNICODE_STRING *mask_str ) { BOOL mismatch; - const WCHAR *name = name_str->Buffer; const WCHAR *mask = mask_str->Buffer; - const WCHAR *name_end = name + name_str->Length / sizeof(WCHAR); + const WCHAR *name_end = name + length; const WCHAR *mask_end = mask + mask_str->Length / sizeof(WCHAR); const WCHAR *lastjoker = NULL; const WCHAR *next_to_retry = NULL; @@ -1399,6 +1398,38 @@ static BOOLEAN match_filename( const UNICODE_STRING *name_str, const UNICODE_STR } +/*********************************************************************** + * is_legal_8dot3_name + * + * Simplified version of RtlIsNameLegalDOS8Dot3. + */ +static BOOLEAN is_legal_8dot3_name( const WCHAR *name, int len ) +{ + static const WCHAR invalid_chars[] = { INVALID_DOS_CHARS,':','/','\\',0 }; + int i, dot = -1; + + if (len > 12) return FALSE; + + /* a starting . is invalid, except for . and .. */ + if (len > 0 && name[0] == '.') return (len == 1 || (len == 2 && name[1] == '.')); + + for (i = 0; i < len; i++) + { + if (name[i] > 0x7f) return FALSE; + if (wcschr( invalid_chars, name[i] )) return FALSE; + if (name[i] == '.') + { + if (dot != -1) return FALSE; + dot = i; + } + } + + if (dot == -1) return (len <= 8); + if (dot > 8) return FALSE; + return (len - dot > 1 && len - dot < 5); +} + + /*********************************************************************** * append_entry * @@ -1410,16 +1441,11 @@ static BOOL append_entry( struct dir_data *data, const char *long_name, int long_len, short_len; WCHAR long_nameW[MAX_DIR_ENTRY_LEN + 1]; WCHAR short_nameW[13]; - UNICODE_STRING str; long_len = ntdll_umbstowcs( long_name, strlen(long_name), long_nameW, ARRAY_SIZE(long_nameW) ); if (long_len == ARRAY_SIZE(long_nameW)) return TRUE; long_nameW[long_len] = 0; - str.Buffer = long_nameW; - str.Length = long_len * sizeof(WCHAR); - str.MaximumLength = sizeof(long_nameW); - if (short_name) { short_len = ntdll_umbstowcs( short_name, strlen(short_name), @@ -1427,11 +1453,9 @@ static BOOL append_entry( struct dir_data *data, const char *long_name, } else /* generate a short name if necessary */ { - BOOLEAN spaces; - short_len = 0; - if (!RtlIsNameLegalDOS8Dot3( &str, NULL, &spaces ) || spaces) - short_len = hash_short_file_name( &str, short_nameW ); + if (!is_legal_8dot3_name( long_nameW, long_len )) + short_len = hash_short_file_name( long_nameW, long_len, short_nameW ); } short_nameW[short_len] = 0; wcsupr( short_nameW ); @@ -1439,13 +1463,10 @@ static BOOL append_entry( struct dir_data *data, const char *long_name, TRACE( "long %s short %s mask %s\n", debugstr_w( long_nameW ), debugstr_w( short_nameW ), debugstr_us( mask )); - if (mask && !match_filename( &str, mask )) + if (mask && !match_filename( long_nameW, long_len, mask )) { if (!short_len) return TRUE; /* no short name to match */ - str.Buffer = short_nameW; - str.Length = short_len * sizeof(WCHAR); - str.MaximumLength = sizeof(short_nameW); - if (!match_filename( &str, mask )) return TRUE; + if (!match_filename( short_nameW, short_len, mask )) return TRUE; } return add_dir_data_names( data, long_nameW, short_nameW, long_name ); @@ -2496,8 +2517,7 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i BOOLEAN check_case, BOOLEAN *is_win_dir ) { WCHAR buffer[MAX_DIR_ENTRY_LEN]; - UNICODE_STRING str; - BOOLEAN spaces, is_name_8_dot_3; + BOOLEAN is_name_8_dot_3; DIR *dir; struct dirent *de; struct stat st; @@ -2523,10 +2543,7 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i /* check if it fits in 8.3 so that we don't look for short names if we won't need them */ - str.Buffer = (WCHAR *)name; - str.Length = length * sizeof(WCHAR); - str.MaximumLength = str.Length; - is_name_8_dot_3 = RtlIsNameLegalDOS8Dot3( &str, NULL, &spaces ) && !spaces; + is_name_8_dot_3 = is_legal_8dot3_name( name, length ); #ifndef VFAT_IOCTL_READDIR_BOTH is_name_8_dot_3 = is_name_8_dot_3 && length >= 8 && name[4] == '~'; #endif @@ -2587,8 +2604,6 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i else return STATUS_ACCESS_DENIED; } unix_name[pos - 1] = '/'; - str.Buffer = buffer; - str.MaximumLength = sizeof(buffer); while ((de = readdir( dir ))) { ret = ntdll_umbstowcs( de->d_name, strlen(de->d_name), buffer, MAX_DIR_ENTRY_LEN ); @@ -2601,11 +2616,10 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i if (!is_name_8_dot_3) continue; - str.Length = ret * sizeof(WCHAR); - if (!RtlIsNameLegalDOS8Dot3( &str, NULL, &spaces ) || spaces) + if (!is_legal_8dot3_name( buffer, ret )) { WCHAR short_nameW[12]; - ret = hash_short_file_name( &str, short_nameW ); + ret = hash_short_file_name( buffer, ret, short_nameW ); if (ret == length && !wcsnicmp( short_nameW, name, length )) { strcpy( unix_name + pos, de->d_name );
1
0
0
0
Alexandre Julliard : ntdll: Add a helper function to retrieve the NT headers of the main exe.
by Alexandre Julliard
10 Jul '20
10 Jul '20
Module: wine Branch: master Commit: eccd21e38735fb08e31a4be1a8897ebe248747b4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=eccd21e38735fb08e31a4be1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 10 07:56:18 2020 +0200 ntdll: Add a helper function to retrieve the NT headers of the main exe. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/server.c | 2 +- dlls/ntdll/unix/unix_private.h | 6 ++++++ dlls/ntdll/unix/virtual.c | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c index 813c926cf4..4e65b0eab2 100644 --- a/dlls/ntdll/unix/server.c +++ b/dlls/ntdll/unix/server.c @@ -1454,7 +1454,7 @@ void server_init_process(void) void CDECL server_init_process_done( void *relay ) { PEB *peb = NtCurrentTeb()->Peb; - IMAGE_NT_HEADERS *nt = RtlImageNtHeader( peb->ImageBaseAddress ); + IMAGE_NT_HEADERS *nt = get_exe_nt_header(); void *entry = (char *)peb->ImageBaseAddress + nt->OptionalHeader.AddressOfEntryPoint; NTSTATUS status; int suspend; diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h index 6090190ee0..2a73f17e10 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h @@ -264,6 +264,12 @@ static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len ) while (len--) *dst++ = (unsigned char)*src++; } +static inline IMAGE_NT_HEADERS *get_exe_nt_header(void) +{ + IMAGE_DOS_HEADER *module = (IMAGE_DOS_HEADER *)NtCurrentTeb()->Peb->ImageBaseAddress; + return (IMAGE_NT_HEADERS *)((char *)module + module->e_lfanew); +} + static inline size_t ntdll_wcslen( const WCHAR *str ) { const WCHAR *s = str; diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index 868dd57055..7592234ccc 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -2728,7 +2728,7 @@ NTSTATUS CDECL virtual_alloc_thread_stack( INITIAL_TEB *stack, SIZE_T reserve_si if (!reserve_size || !commit_size) { - IMAGE_NT_HEADERS *nt = RtlImageNtHeader( NtCurrentTeb()->Peb->ImageBaseAddress ); + IMAGE_NT_HEADERS *nt = get_exe_nt_header(); if (!reserve_size) reserve_size = nt->OptionalHeader.SizeOfStackReserve; if (!commit_size) commit_size = nt->OptionalHeader.SizeOfStackCommit; } @@ -3325,7 +3325,7 @@ void CDECL virtual_release_address_space(void) */ void CDECL virtual_set_large_address_space(void) { - IMAGE_NT_HEADERS *nt = RtlImageNtHeader( NtCurrentTeb()->Peb->ImageBaseAddress ); + IMAGE_NT_HEADERS *nt = get_exe_nt_header(); if (!(nt->FileHeader.Characteristics & IMAGE_FILE_LARGE_ADDRESS_AWARE)) return; /* no large address space on win9x */
1
0
0
0
Alexandre Julliard : ntdll: Add a helper function to open a file from its Unix path.
by Alexandre Julliard
10 Jul '20
10 Jul '20
Module: wine Branch: master Commit: 9ec262ebcc7f14d7373841d4ca082b855ed8090f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9ec262ebcc7f14d7373841d4…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 10 07:56:02 2020 +0200 ntdll: Add a helper function to open a file from its Unix path. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/file.c | 63 +++++++++++++++++++++++++----------------- dlls/ntdll/unix/loader.c | 34 ++++++++--------------- dlls/ntdll/unix/unix_private.h | 3 ++ 3 files changed, 53 insertions(+), 47 deletions(-) diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index a0ad361fcb..e985c75a41 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -3528,6 +3528,42 @@ void CDECL set_show_dot_files( BOOL enable ) } +/****************************************************************************** + * open_unix_file + * + * Helper for NtCreateFile that takes a Unix path. + */ +NTSTATUS open_unix_file( HANDLE *handle, const char *unix_name, ACCESS_MASK access, + OBJECT_ATTRIBUTES *attr, ULONG attributes, ULONG sharing, ULONG disposition, + ULONG options, void *ea_buffer, ULONG ea_length ) +{ + static UNICODE_STRING empty_string; + struct object_attributes *objattr; + OBJECT_ATTRIBUTES unix_attr = *attr; + NTSTATUS status; + data_size_t len; + + unix_attr.ObjectName = &empty_string; /* we send the unix name instead */ + if ((status = alloc_object_attributes( &unix_attr, &objattr, &len ))) return status; + + SERVER_START_REQ( create_file ) + { + req->access = access; + req->sharing = sharing; + req->create = disposition; + req->options = options; + req->attrs = attributes; + wine_server_add_data( req, objattr, len ); + wine_server_add_data( req, unix_name, strlen(unix_name) ); + status = wine_server_call( req ); + *handle = wine_server_ptr_handle( reply->handle ); + } + SERVER_END_REQ; + free( objattr ); + return status; +} + + /****************************************************************************** * NtCreateFile (NTDLL.@) */ @@ -3580,31 +3616,8 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU if (io->u.Status == STATUS_SUCCESS) { - static UNICODE_STRING empty_string; - OBJECT_ATTRIBUTES unix_attr = *attr; - data_size_t len; - struct object_attributes *objattr; - - unix_attr.ObjectName = &empty_string; /* we send the unix name instead */ - if ((io->u.Status = alloc_object_attributes( &unix_attr, &objattr, &len ))) - { - RtlFreeHeap( GetProcessHeap(), 0, unix_name ); - return io->u.Status; - } - SERVER_START_REQ( create_file ) - { - req->access = access; - req->sharing = sharing; - req->create = disposition; - req->options = options; - req->attrs = attributes; - wine_server_add_data( req, objattr, len ); - wine_server_add_data( req, unix_name, strlen(unix_name) ); - io->u.Status = wine_server_call( req ); - *handle = wine_server_ptr_handle( reply->handle ); - } - SERVER_END_REQ; - free( objattr ); + io->u.Status = open_unix_file( handle, unix_name, access, attr, attributes, + sharing, disposition, options, ea_buffer, ea_length ); RtlFreeHeap( GetProcessHeap(), 0, unix_name ); } else WARN( "%s not found (%x)\n", debugstr_us(attr->ObjectName), io->u.Status ); diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index 14fbfae8cd..c90ad5969e 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -990,31 +990,26 @@ static inline char *prepend( char *buffer, const char *str, size_t len ) * * Open a file for a new dll. Helper for find_dll_file. */ -static NTSTATUS open_dll_file( const WCHAR *name, void **module, pe_image_info_t *image_info ) +static NTSTATUS open_dll_file( const char *name, void **module, pe_image_info_t *image_info ) { struct builtin_module *builtin; - FILE_BASIC_INFORMATION info; - OBJECT_ATTRIBUTES attr; + OBJECT_ATTRIBUTES attr = { sizeof(attr) }; IO_STATUS_BLOCK io; - UNICODE_STRING nt_name; LARGE_INTEGER size; FILE_OBJECTID_BUFFER id; + struct stat st; SIZE_T len = 0; NTSTATUS status; HANDLE handle, mapping; - RtlInitUnicodeString( &nt_name, name ); - InitializeObjectAttributes( &attr, &nt_name, OBJ_CASE_INSENSITIVE, 0, NULL ); - if ((status = NtOpenFile( &handle, GENERIC_READ | SYNCHRONIZE, &attr, &io, - FILE_SHARE_READ | FILE_SHARE_DELETE, - FILE_SYNCHRONOUS_IO_NONALERT | FILE_NON_DIRECTORY_FILE ))) + if ((status = open_unix_file( &handle, name, GENERIC_READ | SYNCHRONIZE, &attr, 0, + FILE_SHARE_READ | FILE_SHARE_DELETE, FILE_OPEN, + FILE_SYNCHRONOUS_IO_NONALERT | FILE_NON_DIRECTORY_FILE, NULL, 0 ))) { - if (status != STATUS_OBJECT_PATH_NOT_FOUND && - status != STATUS_OBJECT_NAME_NOT_FOUND && - !NtQueryAttributesFile( &attr, &info )) + if (status != STATUS_OBJECT_PATH_NOT_FOUND && status != STATUS_OBJECT_NAME_NOT_FOUND) { /* if the file exists but failed to open, report the error */ - return status; + if (!stat( name, &st )) return status; } /* otherwise continue searching */ return STATUS_DLL_NOT_FOUND; @@ -1026,7 +1021,7 @@ static NTSTATUS open_dll_file( const WCHAR *name, void **module, pe_image_info_t { if (!memcmp( &builtin->id, id.ObjectId, sizeof(builtin->id) )) { - TRACE( "%s is the same file as existing module %p\n", debugstr_w(name), + TRACE( "%s is the same file as existing module %p\n", debugstr_a(name), builtin->module ); NtClose( handle ); NtUnmapViewOfSection( NtCurrentProcess(), *module ); @@ -1057,12 +1052,12 @@ static NTSTATUS open_dll_file( const WCHAR *name, void **module, pe_image_info_t /* ignore non-builtins */ if (!(image_info->image_flags & IMAGE_FLAGS_WineBuiltin)) { - WARN( "%s found in WINEDLLPATH but not a builtin, ignoring\n", debugstr_w(name) ); + WARN( "%s found in WINEDLLPATH but not a builtin, ignoring\n", debugstr_a(name) ); status = STATUS_DLL_NOT_FOUND; } else if (image_info->cpu != client_cpu) { - TRACE( "%s is for CPU %u, continuing search\n", debugstr_w(name), image_info->cpu ); + TRACE( "%s is for CPU %u, continuing search\n", debugstr_a(name), image_info->cpu ); status = STATUS_IMAGE_MACHINE_TYPE_MISMATCH; } @@ -1082,15 +1077,10 @@ static NTSTATUS open_dll_file( const WCHAR *name, void **module, pe_image_info_t */ static NTSTATUS open_builtin_file( char *name, void **module, pe_image_info_t *image_info ) { - WCHAR *nt_name = NULL; NTSTATUS status; int fd; - if ((status = unix_to_nt_file_name( name, &nt_name ))) return status; - - status = open_dll_file( nt_name, module, image_info ); - RtlFreeHeap( GetProcessHeap(), 0, nt_name ); - + status = open_dll_file( name, module, image_info ); if (status != STATUS_DLL_NOT_FOUND) return status; /* try .so file */ diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h index 711a0bed2b..6090190ee0 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h @@ -237,6 +237,9 @@ extern NTSTATUS tape_DeviceIoControl( HANDLE device, HANDLE event, PIO_APC_ROUTI extern NTSTATUS errno_to_status( int err ) DECLSPEC_HIDDEN; extern NTSTATUS nt_to_unix_file_name( const UNICODE_STRING *nameW, char **name_ret, UINT disposition ) DECLSPEC_HIDDEN; extern NTSTATUS unix_to_nt_file_name( const char *name, WCHAR **nt ) DECLSPEC_HIDDEN; +extern NTSTATUS open_unix_file( HANDLE *handle, const char *unix_name, ACCESS_MASK access, + OBJECT_ATTRIBUTES *attr, ULONG attributes, ULONG sharing, ULONG disposition, + ULONG options, void *ea_buffer, ULONG ea_length ) DECLSPEC_HIDDEN; extern void init_files(void) DECLSPEC_HIDDEN; extern void init_cpu_info(void) DECLSPEC_HIDDEN;
1
0
0
0
Alexandre Julliard : ntdll: Silence a noisy error.
by Alexandre Julliard
10 Jul '20
10 Jul '20
Module: wine Branch: master Commit: a2e77268f2007f2819c2e3e8bd736a056f309a4c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a2e77268f2007f2819c2e3e8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 10 07:55:28 2020 +0200 ntdll: Silence a noisy error. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c index 7cdfc911db..78da6ae638 100644 --- a/dlls/ntdll/unix/thread.c +++ b/dlls/ntdll/unix/thread.c @@ -806,7 +806,7 @@ BOOL get_thread_times(int unix_pid, int unix_tid, LARGE_INTEGER *kernel_time, LA sprintf( buf, "/proc/%u/task/%u/stat", unix_pid, unix_tid ); if (!(f = fopen( buf, "r" ))) { - ERR("Failed to open %s: %s\n", buf, strerror(errno)); + WARN("Failed to open %s: %s\n", buf, strerror(errno)); return FALSE; }
1
0
0
0
Henri Verbeet : vkd3d-shader: Rename the vkd3d_descriptor_range_type enumeration to vkd3d_shader_descriptor_range_type.
by Alexandre Julliard
10 Jul '20
10 Jul '20
Module: vkd3d Branch: master Commit: 6e0ab34564fdd3e9690ff809d4a20dd182fd4522 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=6e0ab34564fdd3e9690ff80…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Jul 10 17:02:03 2020 +0430 vkd3d-shader: Rename the vkd3d_descriptor_range_type enumeration to vkd3d_shader_descriptor_range_type. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/vkd3d_shader.h | 16 ++++++++-------- libs/vkd3d-shader/dxbc.c | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/vkd3d_shader.h b/include/vkd3d_shader.h index d00ec45..50c64ca 100644 --- a/include/vkd3d_shader.h +++ b/include/vkd3d_shader.h @@ -418,19 +418,19 @@ struct vkd3d_static_sampler_desc enum vkd3d_shader_visibility shader_visibility; }; -enum vkd3d_descriptor_range_type +enum vkd3d_shader_descriptor_range_type { - VKD3D_DESCRIPTOR_RANGE_TYPE_SRV = 0, - VKD3D_DESCRIPTOR_RANGE_TYPE_UAV = 1, - VKD3D_DESCRIPTOR_RANGE_TYPE_CBV = 2, - VKD3D_DESCRIPTOR_RANGE_TYPE_SAMPLER = 3, + VKD3D_SHADER_DESCRIPTOR_RANGE_TYPE_SRV = 0x0, + VKD3D_SHADER_DESCRIPTOR_RANGE_TYPE_UAV = 0x1, + VKD3D_SHADER_DESCRIPTOR_RANGE_TYPE_CBV = 0x2, + VKD3D_SHADER_DESCRIPTOR_RANGE_TYPE_SAMPLER = 0x3, - VKD3D_FORCE_32_BIT_ENUM(VKD3D_DESCRIPTOR_RANGE_TYPE), + VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_DESCRIPTOR_RANGE_TYPE), }; struct vkd3d_descriptor_range { - enum vkd3d_descriptor_range_type range_type; + enum vkd3d_shader_descriptor_range_type range_type; unsigned int descriptor_count; unsigned int base_shader_register; unsigned int register_space; @@ -522,7 +522,7 @@ enum vkd3d_descriptor_range_flags struct vkd3d_descriptor_range1 { - enum vkd3d_descriptor_range_type range_type; + enum vkd3d_shader_descriptor_range_type range_type; unsigned int descriptor_count; unsigned int base_shader_register; unsigned int register_space; diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c index 5fba83b..a0f03cf 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -3046,13 +3046,13 @@ static int validate_descriptor_table_v_1_0(const struct vkd3d_root_descriptor_ta { const struct vkd3d_descriptor_range *r = &descriptor_table->descriptor_ranges[i]; - if (r->range_type == VKD3D_DESCRIPTOR_RANGE_TYPE_SRV - || r->range_type == VKD3D_DESCRIPTOR_RANGE_TYPE_UAV - || r->range_type == VKD3D_DESCRIPTOR_RANGE_TYPE_CBV) + if (r->range_type == VKD3D_SHADER_DESCRIPTOR_RANGE_TYPE_SRV + || r->range_type == VKD3D_SHADER_DESCRIPTOR_RANGE_TYPE_UAV + || r->range_type == VKD3D_SHADER_DESCRIPTOR_RANGE_TYPE_CBV) { have_srv_uav_cbv = true; } - else if (r->range_type == VKD3D_DESCRIPTOR_RANGE_TYPE_SAMPLER) + else if (r->range_type == VKD3D_SHADER_DESCRIPTOR_RANGE_TYPE_SAMPLER) { have_sampler = true; } @@ -3082,13 +3082,13 @@ static int validate_descriptor_table_v_1_1(const struct vkd3d_root_descriptor_ta { const struct vkd3d_descriptor_range1 *r = &descriptor_table->descriptor_ranges[i]; - if (r->range_type == VKD3D_DESCRIPTOR_RANGE_TYPE_SRV - || r->range_type == VKD3D_DESCRIPTOR_RANGE_TYPE_UAV - || r->range_type == VKD3D_DESCRIPTOR_RANGE_TYPE_CBV) + if (r->range_type == VKD3D_SHADER_DESCRIPTOR_RANGE_TYPE_SRV + || r->range_type == VKD3D_SHADER_DESCRIPTOR_RANGE_TYPE_UAV + || r->range_type == VKD3D_SHADER_DESCRIPTOR_RANGE_TYPE_CBV) { have_srv_uav_cbv = true; } - else if (r->range_type == VKD3D_DESCRIPTOR_RANGE_TYPE_SAMPLER) + else if (r->range_type == VKD3D_SHADER_DESCRIPTOR_RANGE_TYPE_SAMPLER) { have_sampler = true; }
1
0
0
0
Henri Verbeet : vkd3d-shader: Rename the VKD3D_SWIZZLE macro to VKD3D_SHADER_SWIZZLE.
by Alexandre Julliard
10 Jul '20
10 Jul '20
Module: vkd3d Branch: master Commit: edd585ea44c5e03616d18ce55c97fc75ad96125f URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=edd585ea44c5e03616d18ce…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Jul 10 17:02:02 2020 +0430 vkd3d-shader: Rename the VKD3D_SWIZZLE macro to VKD3D_SHADER_SWIZZLE. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/vkd3d_shader.h | 33 ++++++++++++++++---------------- libs/vkd3d-shader/dxbc.c | 7 ++++--- libs/vkd3d-shader/spirv.c | 16 ++++++++-------- libs/vkd3d-shader/trace.c | 10 +++++----- libs/vkd3d-shader/vkd3d_shader_private.h | 4 ++-- libs/vkd3d/state.c | 7 ++++--- 6 files changed, 40 insertions(+), 37 deletions(-) Diff:
https://source.winehq.org/git/vkd3d.git/?a=commitdiff;h=edd585ea44c5e03616d…
1
0
0
0
← Newer
1
...
57
58
59
60
61
62
63
...
83
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Results per page:
10
25
50
100
200