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
August 2021
----- 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
1051 discussions
Start a n
N
ew thread
Alexandre Julliard : msv1_0: Move context allocation to the PE side.
by Alexandre Julliard
12 Aug '21
12 Aug '21
Module: wine Branch: master Commit: 9a51a9c44ef58db93e0adcc32e4e59814ca749c2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9a51a9c44ef58db93e0adcc3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Aug 11 18:11:58 2021 +0200 msv1_0: Move context allocation to the PE side. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msv1_0/main.c | 21 +++++++++++++++++---- dlls/msv1_0/unixlib.c | 29 +++++++++-------------------- dlls/msv1_0/unixlib.h | 2 +- 3 files changed, 27 insertions(+), 25 deletions(-) diff --git a/dlls/msv1_0/main.c b/dlls/msv1_0/main.c index df9d0dd0f1a..6d0af9e1ec3 100644 --- a/dlls/msv1_0/main.c +++ b/dlls/msv1_0/main.c @@ -655,7 +655,9 @@ static NTSTATUS NTAPI ntlm_SpInitLsaModeContext( LSA_SEC_HANDLE cred_handle, LSA argv[4] = NULL; } - if ((status = ntlm_funcs->fork( argv, &ctx )) != SEC_E_OK) goto done; + if (!(ctx = calloc( 1, sizeof(*ctx) ))) goto done; + + if ((status = ntlm_funcs->fork( ctx, argv )) != SEC_E_OK) goto done; status = SEC_E_INSUFFICIENT_MEMORY; ctx->mode = MODE_CLIENT; @@ -838,7 +840,11 @@ static NTSTATUS NTAPI ntlm_SpInitLsaModeContext( LSA_SEC_HANDLE cred_handle, LSA } done: - if (status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) ntlm_funcs->cleanup( ctx ); + if (status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) + { + ntlm_funcs->cleanup( ctx ); + free( ctx ); + } free( username ); free( domain ); free( password ); @@ -892,10 +898,12 @@ static NTSTATUS NTAPI ntlm_SpAcceptLsaModeContext( LSA_SEC_HANDLE cred_handle, L } else bin_len = input->pBuffers[0].cbBuffer; + if (!(ctx = calloc( 1, sizeof(*ctx) ))) goto done; + argv[0] = (char *)"ntlm_auth"; argv[1] = (char *)"--helper-protocol=squid-2.5-ntlmssp"; argv[2] = NULL; - if ((status = ntlm_funcs->fork( argv, &ctx )) != SEC_E_OK) goto done; + if ((status = ntlm_funcs->fork( ctx, argv )) != SEC_E_OK) goto done; ctx->mode = MODE_SERVER; if (!(want_flags = malloc( 73 ))) @@ -1048,7 +1056,11 @@ static NTSTATUS NTAPI ntlm_SpAcceptLsaModeContext( LSA_SEC_HANDLE cred_handle, L } done: - if (status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) ntlm_funcs->cleanup( ctx ); + if (status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) + { + ntlm_funcs->cleanup( ctx ); + free( ctx ); + } free( buf ); free( bin ); free( want_flags ); @@ -1065,6 +1077,7 @@ static NTSTATUS NTAPI ntlm_SpDeleteContext( LSA_SEC_HANDLE handle ) if (!ctx) return SEC_E_INVALID_HANDLE; ntlm_funcs->cleanup( ctx ); + free( ctx ); return SEC_E_OK; } diff --git a/dlls/msv1_0/unixlib.c b/dlls/msv1_0/unixlib.c index 83975803aa2..d9482c4857a 100644 --- a/dlls/msv1_0/unixlib.c +++ b/dlls/msv1_0/unixlib.c @@ -24,6 +24,7 @@ #endif #include <stdarg.h> +#include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <errno.h> @@ -49,7 +50,7 @@ static SECURITY_STATUS read_line( struct ntlm_ctx *ctx, unsigned int *offset ) if (!ctx->com_buf) { - if (!(ctx->com_buf = RtlAllocateHeap( GetProcessHeap(), 0, INITIAL_BUFFER_SIZE ))) + if (!(ctx->com_buf = malloc( INITIAL_BUFFER_SIZE ))) return SEC_E_INSUFFICIENT_MEMORY; ctx->com_buf_size = INITIAL_BUFFER_SIZE; ctx->com_buf_offset = 0; @@ -60,7 +61,7 @@ static SECURITY_STATUS read_line( struct ntlm_ctx *ctx, unsigned int *offset ) ssize_t size; if (ctx->com_buf_offset + INITIAL_BUFFER_SIZE > ctx->com_buf_size) { - char *buf = RtlReAllocateHeap( GetProcessHeap(), 0, ctx->com_buf, ctx->com_buf_size + INITIAL_BUFFER_SIZE ); + char *buf = realloc( ctx->com_buf, ctx->com_buf_size + INITIAL_BUFFER_SIZE ); if (!buf) return SEC_E_INSUFFICIENT_MEMORY; ctx->com_buf_size += INITIAL_BUFFER_SIZE; ctx->com_buf = buf; @@ -125,14 +126,12 @@ static void CDECL ntlm_cleanup( struct ntlm_ctx *ctx ) } while (ret < 0 && errno == EINTR); } - RtlFreeHeap( GetProcessHeap(), 0, ctx->com_buf ); - RtlFreeHeap( GetProcessHeap(), 0, ctx ); + free( ctx->com_buf ); } -static SECURITY_STATUS CDECL ntlm_fork( char **argv, struct ntlm_ctx **ret_ctx ) +static SECURITY_STATUS CDECL ntlm_fork( struct ntlm_ctx *ctx, char **argv ) { int pipe_in[2], pipe_out[2]; - struct ntlm_ctx *ctx; #ifdef HAVE_PIPE2 if (pipe2( pipe_in, O_CLOEXEC ) < 0) @@ -156,15 +155,6 @@ static SECURITY_STATUS CDECL ntlm_fork( char **argv, struct ntlm_ctx **ret_ctx ) fcntl( pipe_out[1], F_SETFD, FD_CLOEXEC ); } - if (!(ctx = RtlAllocateHeap( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ctx) ))) - { - close( pipe_in[0] ); - close( pipe_in[1] ); - close( pipe_out[0] ); - close( pipe_out[1] ); - return SEC_E_INSUFFICIENT_MEMORY; - } - if (!(ctx->pid = fork())) /* child */ { dup2( pipe_out[0], 0 ); @@ -186,7 +176,6 @@ static SECURITY_STATUS CDECL ntlm_fork( char **argv, struct ntlm_ctx **ret_ctx ) close( pipe_in[1] ); ctx->pipe_out = pipe_out[1]; close( pipe_out[0] ); - *ret_ctx = ctx; } return SEC_E_OK; @@ -198,7 +187,7 @@ static SECURITY_STATUS CDECL ntlm_fork( char **argv, struct ntlm_ctx **ret_ctx ) static BOOL check_version( void ) { - struct ntlm_ctx *ctx; + struct ntlm_ctx ctx = { 0 }; char *argv[3], buf[80]; BOOL ret = FALSE; int len; @@ -206,9 +195,9 @@ static BOOL check_version( void ) argv[0] = (char *)"ntlm_auth"; argv[1] = (char *)"--version"; argv[2] = NULL; - if (ntlm_fork( argv, &ctx ) != SEC_E_OK) return FALSE; + if (ntlm_fork( &ctx, argv ) != SEC_E_OK) return FALSE; - if ((len = read( ctx->pipe_in, buf, sizeof(buf) - 1 )) > 8) + if ((len = read( ctx.pipe_in, buf, sizeof(buf) - 1 )) > 8) { char *newline; int major = 0, minor = 0, micro = 0; @@ -233,7 +222,7 @@ static BOOL check_version( void ) "Make sure that ntlm_auth >= %d.%d.%d is in your path. " "Usually, you can find it in the winbind package of your distribution.\n", NTLM_AUTH_MAJOR_VERSION, NTLM_AUTH_MINOR_VERSION, NTLM_AUTH_MICRO_VERSION ); - ntlm_cleanup( ctx ); + ntlm_cleanup( &ctx ); return ret; } diff --git a/dlls/msv1_0/unixlib.h b/dlls/msv1_0/unixlib.h index 92f42f4b0bd..77d1296dcd2 100644 --- a/dlls/msv1_0/unixlib.h +++ b/dlls/msv1_0/unixlib.h @@ -92,7 +92,7 @@ struct ntlm_funcs { SECURITY_STATUS (CDECL *chat)( struct ntlm_ctx *, char *, unsigned int, unsigned int * ); void (CDECL *cleanup)( struct ntlm_ctx * ); - SECURITY_STATUS (CDECL *fork)( char **, struct ntlm_ctx ** ); + SECURITY_STATUS (CDECL *fork)( struct ntlm_ctx *, char ** ); }; extern const struct ntlm_funcs *ntlm_funcs;
1
0
0
0
Alexandre Julliard : odbc32: Convert the Unix library to the __wine_unix_call interface.
by Alexandre Julliard
12 Aug '21
12 Aug '21
Module: wine Branch: master Commit: b45deaa4b09848aabbedd0389aa259d2ff47cd01 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b45deaa4b09848aabbedd038…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Aug 11 14:13:47 2021 +0200 odbc32: Convert the Unix library to the __wine_unix_call interface. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/odbc32/Makefile.in | 1 + dlls/odbc32/proxyodbc.c | 1338 +++++++++++------------------------------------ dlls/odbc32/unixlib.c | 1043 +++++++++++++++++++++--------------- dlls/odbc32/unixlib.h | 359 ++++++++----- 4 files changed, 1167 insertions(+), 1574 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=b45deaa4b09848aabbed…
1
0
0
0
Alexandre Julliard : include: Add a private header for Unix libraries definitions.
by Alexandre Julliard
12 Aug '21
12 Aug '21
Module: wine Branch: master Commit: e309bad98c736d3409b5ceaffa77486a73c1f80b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e309bad98c736d3409b5ceaf…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Aug 12 13:46:35 2021 +0200 include: Add a private header for Unix libraries definitions. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/unix_private.h | 3 +-- dlls/winepulse.drv/unixlib.h | 1 + dlls/wow64/syscall.c | 1 + include/wine/unixlib.h | 33 +++++++++++++++++++++++++++++++++ include/winternl.h | 4 ---- 5 files changed, 36 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h index 0fce580b120..9c6c323298c 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h @@ -24,6 +24,7 @@ #include <pthread.h> #include <signal.h> #include "unixlib.h" +#include "wine/unixlib.h" #include "wine/server.h" #include "wine/list.h" @@ -151,8 +152,6 @@ extern void init_environment( int argc, char *argv[], char *envp[] ) DECLSPEC_HI extern void init_startup_info(void) DECLSPEC_HIDDEN; extern void *create_startup_info( const UNICODE_STRING *nt_image, const RTL_USER_PROCESS_PARAMETERS *params, DWORD *info_size ) DECLSPEC_HIDDEN; -extern DWORD ntdll_umbstowcs( const char *src, DWORD srclen, WCHAR *dst, DWORD dstlen ) DECLSPEC_HIDDEN; -extern int ntdll_wcstoumbs( const WCHAR *src, DWORD srclen, char *dst, DWORD dstlen, BOOL strict ) DECLSPEC_HIDDEN; extern char **build_envp( const WCHAR *envW ) DECLSPEC_HIDDEN; extern NTSTATUS exec_wineloader( char **argv, int socketfd, const pe_image_info_t *pe_info ) DECLSPEC_HIDDEN; extern NTSTATUS load_builtin( const pe_image_info_t *image_info, WCHAR *filename, diff --git a/dlls/winepulse.drv/unixlib.h b/dlls/winepulse.drv/unixlib.h index 98639e7705f..d28a73ca649 100644 --- a/dlls/winepulse.drv/unixlib.h +++ b/dlls/winepulse.drv/unixlib.h @@ -17,6 +17,7 @@ */ #include "wine/list.h" +#include "wine/unixlib.h" struct pulse_stream; diff --git a/dlls/wow64/syscall.c b/dlls/wow64/syscall.c index bdd9a6b6ea7..495c10b121a 100644 --- a/dlls/wow64/syscall.c +++ b/dlls/wow64/syscall.c @@ -27,6 +27,7 @@ #include "winnt.h" #include "winternl.h" #include "wine/exception.h" +#include "wine/unixlib.h" #include "wow64_private.h" #include "wine/debug.h" diff --git a/include/wine/unixlib.h b/include/wine/unixlib.h new file mode 100644 index 00000000000..7997a924eac --- /dev/null +++ b/include/wine/unixlib.h @@ -0,0 +1,33 @@ +/* + * Definitions for Unix libraries + * + * Copyright (C) 2021 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_WINE_UNIXLIB_H +#define __WINE_WINE_UNIXLIB_H + +typedef NTSTATUS (*unixlib_entry_t)( void *args ); +typedef UINT64 unixlib_handle_t; + +extern NTSTATUS WINAPI __wine_unix_call( unixlib_handle_t handle, unsigned int code, void *args ); + +/* some useful helpers from ntdll */ +extern DWORD ntdll_umbstowcs( const char *src, DWORD srclen, WCHAR *dst, DWORD dstlen ); +extern int ntdll_wcstoumbs( const WCHAR *src, DWORD srclen, char *dst, DWORD dstlen, BOOL strict ); + +#endif /* __WINE_WINE_UNIXLIB_H */ diff --git a/include/winternl.h b/include/winternl.h index 523e65007ed..06f00740e43 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -4612,12 +4612,8 @@ static inline PLIST_ENTRY RemoveTailList(PLIST_ENTRY le) #ifdef __WINESRC__ -typedef NTSTATUS (*unixlib_entry_t)( void *args ); -typedef UINT64 unixlib_handle_t; - /* Wine internal functions */ extern NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out ); -extern NTSTATUS WINAPI __wine_unix_call( unixlib_handle_t handle, unsigned int code, void *args ); /* The thread information for 16-bit threads */ /* NtCurrentTeb()->SubSystemTib points to this */
1
0
0
0
Alexandre Julliard : makefiles: Don't depend on import libraries for native Unix libraries.
by Alexandre Julliard
12 Aug '21
12 Aug '21
Module: wine Branch: master Commit: 9999273178c9df53e4dfeed1165e7e3d34a6140b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9999273178c9df53e4dfeed1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Aug 11 12:26:48 2021 +0200 makefiles: Don't depend on import libraries for native Unix libraries. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/makedep.c | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index db076d0c057..43141a472fa 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -3353,37 +3353,53 @@ static void output_module( struct makefile *make ) if (make->unixobj_files.count) { - struct strarray unix_imports = empty_strarray; struct strarray unix_libs = empty_strarray; struct strarray unix_deps = empty_strarray; + struct strarray extra_libs = get_expanded_make_var_array( make, "EXTRALIBS" ); + int native_unix_lib = strarray_exists( &extra_libs, "-Wl,--subsystem,unixlib" ); char *ext, *unix_lib = xmalloc( strlen( make->module ) + strlen( dll_ext ) + 1 ); + strcpy( unix_lib, make->module ); if ((ext = get_extension( unix_lib ))) *ext = 0; strcat( unix_lib, dll_ext ); - if (!strarray_exists( &make->extradllflags, "-nodefaultlibs" )) + if (native_unix_lib) { - strarray_add( &unix_imports, "ntdll" ); - strarray_add( &unix_deps, obj_dir_path( top_makefile, "dlls/ntdll/ntdll.so" )); + if (!strarray_exists( &make->extradllflags, "-nodefaultlibs" )) + { + strarray_add( &unix_libs, "-lntdll" ); + strarray_add( &unix_deps, obj_dir_path( top_makefile, "dlls/ntdll/ntdll.so" )); + } + } + else + { + struct strarray unix_imports = empty_strarray; + + if (!strarray_exists( &make->extradllflags, "-nodefaultlibs" )) + { + strarray_add( &unix_imports, "ntdll" ); + strarray_add( &unix_deps, obj_dir_path( top_makefile, "dlls/ntdll/ntdll.so" )); + } + strarray_add( &unix_imports, "winecrt0" ); + if (spec_file) strarray_add( &unix_deps, spec_file ); + + strarray_addall( &unix_libs, add_import_libs( make, &unix_deps, unix_imports, 0, 1 )); } - strarray_add( &unix_imports, "winecrt0" ); - strarray_addall( &unix_libs, add_import_libs( make, &unix_deps, unix_imports, 0, 1 )); strarray_addall( &unix_libs, add_unix_libraries( make, &unix_deps )); strarray_add( &make->all_targets, unix_lib ); add_install_rule( make, make->module, unix_lib, strmake( "p%s/%s", so_dir, unix_lib )); output( "%s:", obj_dir_path( make, unix_lib )); - if (spec_file) output_filename( spec_file ); output_filenames_obj_dir( make, make->unixobj_files ); output_filenames( unix_deps ); - output_filename( tools_path( make, "winebuild" )); + if (!native_unix_lib) output_filename( tools_path( make, "winebuild" )); output_filename( tools_path( make, "winegcc" )); output( "\n" ); output_winegcc_command( make, 0 ); output_filename( "-munix" ); output_filename( "-shared" ); - if (spec_file) output_filename( spec_file ); + if (spec_file && !native_unix_lib) output_filename( spec_file ); if (strarray_exists( &make->extradllflags, "-nodefaultlibs" )) output_filename( "-nodefaultlibs" ); output_filenames_obj_dir( make, make->unixobj_files ); output_filenames( unix_libs );
1
0
0
0
Alexandre Julliard : winegcc: Use custom subsystem 'unixlib' instead of 'native' for Unix libraries.
by Alexandre Julliard
12 Aug '21
12 Aug '21
Module: wine Branch: master Commit: 7d60d0d7bbc0138133d1968dc3802e2e79ab5b32 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7d60d0d7bbc0138133d1968d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Aug 12 11:33:21 2021 +0200 winegcc: Use custom subsystem 'unixlib' instead of 'native' for Unix libraries. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winepulse.drv/Makefile.in | 2 +- tools/winegcc/winegcc.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/winepulse.drv/Makefile.in b/dlls/winepulse.drv/Makefile.in index 4bf053d4e54..f98262bcf63 100644 --- a/dlls/winepulse.drv/Makefile.in +++ b/dlls/winepulse.drv/Makefile.in @@ -1,6 +1,6 @@ MODULE = winepulse.drv IMPORTS = dxguid uuid winmm user32 advapi32 ole32 -EXTRALIBS = $(PULSE_LIBS) $(PTHREAD_LIBS) -Wl,--subsystem,native +EXTRALIBS = $(PULSE_LIBS) $(PTHREAD_LIBS) -Wl,--subsystem,unixlib EXTRAINCL = $(PULSE_CFLAGS) EXTRADLLFLAGS = -mno-cygwin diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 69c18b72b67..426336e4536 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -523,7 +523,7 @@ static strarray *get_link_args( struct options *opts, const char *output_name ) if (opts->unicode_app) strarray_add( flags, "-municode" ); if (opts->nodefaultlibs || opts->use_msvcrt) strarray_add( flags, "-nodefaultlibs" ); if (opts->nostartfiles || opts->use_msvcrt) strarray_add( flags, "-nostartfiles" ); - if (opts->subsystem) strarray_add( flags, strmake("-Wl,--subsystem,%s", opts->subsystem )); + if (opts->subsystem && strcmp(opts->subsystem, "unixlib")) strarray_add( flags, strmake("-Wl,--subsystem,%s", opts->subsystem )); strarray_add( flags, "-Wl,--nxcompat" ); @@ -563,7 +563,7 @@ static strarray *get_link_args( struct options *opts, const char *output_name ) if (opts->nodefaultlibs || opts->use_msvcrt) strarray_add( flags, "-nodefaultlibs" ); if (opts->nostartfiles || opts->use_msvcrt) strarray_add( flags, "-nostartfiles" ); if (opts->image_base) strarray_add( flags, strmake("-Wl,-base:%s", opts->image_base )); - if (opts->subsystem) + if (opts->subsystem && strcmp(opts->subsystem, "unixlib")) strarray_add( flags, strmake("-Wl,-subsystem:%s", opts->subsystem )); else strarray_add( flags, strmake("-Wl,-subsystem:%s", opts->gui_app ? "windows" : "console" )); @@ -1091,7 +1091,7 @@ static void add_library( struct options *opts, strarray *lib_dirs, strarray *fil strarray_add(files, strmake("-a%s", fullname)); break; case file_dll: - if (opts->unix_lib && opts->subsystem && !strcmp(opts->subsystem, "native")) + if (opts->unix_lib && opts->subsystem && !strcmp(opts->subsystem, "unixlib")) { if (get_lib_type(opts->target_platform, lib_dirs, library, "", ".so", &unixlib) == file_so) { @@ -1177,7 +1177,7 @@ static const char *build_spec_obj( struct options *opts, const char *spec_file, strarray_add(spec_args, entry_point); } - if (opts->subsystem) + if (opts->subsystem && strcmp( opts->subsystem, "unixlib" )) { strarray_add(spec_args, "--subsystem"); strarray_add(spec_args, opts->subsystem);
1
0
0
0
Alexandre Julliard : winegcc: Build Unix libraries as dynamic libs on macOS.
by Alexandre Julliard
12 Aug '21
12 Aug '21
Module: wine Branch: master Commit: ada8bf034ab708ebff196269b69a0b828527d318 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ada8bf034ab708ebff196269…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Aug 11 21:38:20 2021 +0200 winegcc: Build Unix libraries as dynamic libs on macOS. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winegcc/winegcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 8e77648ac10..69c18b72b67 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -478,7 +478,7 @@ static strarray *get_link_args( struct options *opts, const char *output_name ) switch (opts->target_platform) { case PLATFORM_APPLE: - strarray_add( flags, "-bundle" ); + strarray_add( flags, opts->unix_lib ? "-dynamiclib" : "-bundle" ); strarray_add( flags, "-multiply_defined" ); strarray_add( flags, "suppress" ); if (opts->target_cpu == CPU_POWERPC)
1
0
0
0
Conor McCarthy : vkd3d-shader: Implement UTOD instruction.
by Alexandre Julliard
12 Aug '21
12 Aug '21
Module: vkd3d Branch: master Commit: f3c19dfedbc5a7b2d215a8a91486971a6ab3bc8f URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=f3c19dfedbc5a7b2d215a8a…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Thu Aug 12 12:55:16 2021 +1000 vkd3d-shader: Implement UTOD instruction. Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d-shader/dxbc.c | 1 + libs/vkd3d-shader/sm4.h | 1 + libs/vkd3d-shader/spirv.c | 2 ++ libs/vkd3d-shader/trace.c | 1 + libs/vkd3d-shader/vkd3d_shader_private.h | 1 + tests/d3d12.c | 2 +- 6 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c index 8762094..5dfe929 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -819,6 +819,7 @@ static const struct vkd3d_sm4_opcode_info opcode_table[] = {VKD3D_SM5_OP_DTOI, VKD3DSIH_DTOI, "i", "d"}, {VKD3D_SM5_OP_DTOU, VKD3DSIH_DTOU, "u", "d"}, {VKD3D_SM5_OP_ITOD, VKD3DSIH_ITOD, "d", "i"}, + {VKD3D_SM5_OP_UTOD, VKD3DSIH_UTOD, "d", "u"}, }; static const enum vkd3d_shader_register_type register_type_table[] = diff --git a/libs/vkd3d-shader/sm4.h b/libs/vkd3d-shader/sm4.h index c04fa02..5622d6d 100644 --- a/libs/vkd3d-shader/sm4.h +++ b/libs/vkd3d-shader/sm4.h @@ -338,6 +338,7 @@ enum vkd3d_sm4_opcode VKD3D_SM5_OP_DTOI = 0xd6, VKD3D_SM5_OP_DTOU = 0xd7, VKD3D_SM5_OP_ITOD = 0xd8, + VKD3D_SM5_OP_UTOD = 0xd9, }; enum vkd3d_sm4_instruction_modifier diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 96caab5..695882c 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -6792,6 +6792,7 @@ static SpvOp vkd3d_dxbc_compiler_map_alu_instruction(const struct vkd3d_shader_i {VKD3DSIH_NOT, SpvOpNot}, {VKD3DSIH_OR, SpvOpBitwiseOr}, {VKD3DSIH_USHR, SpvOpShiftRightLogical}, + {VKD3DSIH_UTOD, SpvOpConvertUToF}, {VKD3DSIH_UTOF, SpvOpConvertUToF}, {VKD3DSIH_XOR, SpvOpBitwiseXor}, }; @@ -9549,6 +9550,7 @@ int vkd3d_dxbc_compiler_handle_instruction(struct vkd3d_dxbc_compiler *compiler, case VKD3DSIH_NOT: case VKD3DSIH_OR: case VKD3DSIH_USHR: + case VKD3DSIH_UTOD: case VKD3DSIH_UTOF: case VKD3DSIH_XOR: vkd3d_dxbc_compiler_emit_alu_instruction(compiler, instruction); diff --git a/libs/vkd3d-shader/trace.c b/libs/vkd3d-shader/trace.c index 0dc18f4..df0ebf0 100644 --- a/libs/vkd3d-shader/trace.c +++ b/libs/vkd3d-shader/trace.c @@ -284,6 +284,7 @@ static const char * const shader_opcode_names[] = /* VKD3DSIH_UMIN */ "umin", /* VKD3DSIH_UMUL */ "umul", /* VKD3DSIH_USHR */ "ushr", + /* VKD3DSIH_UTOD */ "utod", /* VKD3DSIH_UTOF */ "utof", /* VKD3DSIH_XOR */ "xor", }; diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index aa04cb4..a9c4e75 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -373,6 +373,7 @@ enum vkd3d_shader_opcode VKD3DSIH_UMIN, VKD3DSIH_UMUL, VKD3DSIH_USHR, + VKD3DSIH_UTOD, VKD3DSIH_UTOF, VKD3DSIH_XOR, diff --git a/tests/d3d12.c b/tests/d3d12.c index b6a773e..6bc03b0 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -10030,7 +10030,7 @@ static void test_shader_instructions(void) {&ps_dtou, {.d = {{ 1.0}}}, {{ 1, 0 }}, true}, {&ps_dtoi, {.d = {{ 1.0}}}, {.i = {1, -1}}, true}, {&ps_dtof, {.d = {{ 1.5}}}, {.f = {1.5f, -1.5f}}, true}, - {&ps_utod, {.u = {{3, 0xffffffff}}}, {.d = {3.0, 4294967295.0}}, true, true}, + {&ps_utod, {.u = {{3, 0xffffffff}}}, {.d = {3.0, 4294967295.0}}, true}, {&ps_itod, {.u = {{3, INT_MIN}}}, {.d = {3.0, -2147483648.0}}, true}, {&ps_ftod, {.f = {{-2.5f, -2.5f}}}, {.d = {-2.5, 2.5}}, true}, {&ps_dmul, {.d = {{ 1.5, 3.0}}}, {.d = { 4.5, -4.5}}, true},
1
0
0
0
Conor McCarthy : vkd3d-shader: Implement ITOD instruction.
by Alexandre Julliard
12 Aug '21
12 Aug '21
Module: vkd3d Branch: master Commit: 3623a99cf61dc95631f89fd8abbb280c86a21df5 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=3623a99cf61dc95631f89fd…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Thu Aug 12 12:55:15 2021 +1000 vkd3d-shader: Implement ITOD instruction. Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d-shader/dxbc.c | 1 + libs/vkd3d-shader/sm4.h | 1 + libs/vkd3d-shader/spirv.c | 2 ++ libs/vkd3d-shader/trace.c | 1 + libs/vkd3d-shader/vkd3d_shader_private.h | 1 + tests/d3d12.c | 2 +- 6 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c index 2beb2cc..8762094 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -818,6 +818,7 @@ static const struct vkd3d_sm4_opcode_info opcode_table[] = {VKD3D_SM5_OP_DRCP, VKD3DSIH_DRCP, "d", "d"}, {VKD3D_SM5_OP_DTOI, VKD3DSIH_DTOI, "i", "d"}, {VKD3D_SM5_OP_DTOU, VKD3DSIH_DTOU, "u", "d"}, + {VKD3D_SM5_OP_ITOD, VKD3DSIH_ITOD, "d", "i"}, }; static const enum vkd3d_shader_register_type register_type_table[] = diff --git a/libs/vkd3d-shader/sm4.h b/libs/vkd3d-shader/sm4.h index a88447d..c04fa02 100644 --- a/libs/vkd3d-shader/sm4.h +++ b/libs/vkd3d-shader/sm4.h @@ -337,6 +337,7 @@ enum vkd3d_sm4_opcode VKD3D_SM5_OP_DRCP = 0xd4, VKD3D_SM5_OP_DTOI = 0xd6, VKD3D_SM5_OP_DTOU = 0xd7, + VKD3D_SM5_OP_ITOD = 0xd8, }; enum vkd3d_sm4_instruction_modifier diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 3d00f83..96caab5 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -6786,6 +6786,7 @@ static SpvOp vkd3d_dxbc_compiler_map_alu_instruction(const struct vkd3d_shader_i {VKD3DSIH_INEG, SpvOpSNegate}, {VKD3DSIH_ISHL, SpvOpShiftLeftLogical}, {VKD3DSIH_ISHR, SpvOpShiftRightArithmetic}, + {VKD3DSIH_ITOD, SpvOpConvertSToF}, {VKD3DSIH_ITOF, SpvOpConvertSToF}, {VKD3DSIH_MUL, SpvOpFMul}, {VKD3DSIH_NOT, SpvOpNot}, @@ -9542,6 +9543,7 @@ int vkd3d_dxbc_compiler_handle_instruction(struct vkd3d_dxbc_compiler *compiler, case VKD3DSIH_INEG: case VKD3DSIH_ISHL: case VKD3DSIH_ISHR: + case VKD3DSIH_ITOD: case VKD3DSIH_ITOF: case VKD3DSIH_MUL: case VKD3DSIH_NOT: diff --git a/libs/vkd3d-shader/trace.c b/libs/vkd3d-shader/trace.c index 0d5c06b..0dc18f4 100644 --- a/libs/vkd3d-shader/trace.c +++ b/libs/vkd3d-shader/trace.c @@ -189,6 +189,7 @@ static const char * const shader_opcode_names[] = /* VKD3DSIH_INEG */ "ineg", /* VKD3DSIH_ISHL */ "ishl", /* VKD3DSIH_ISHR */ "ishr", + /* VKD3DSIH_ITOD */ "itod", /* VKD3DSIH_ITOF */ "itof", /* VKD3DSIH_LABEL */ "label", /* VKD3DSIH_LD */ "ld", diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index fba3764..aa04cb4 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -278,6 +278,7 @@ enum vkd3d_shader_opcode VKD3DSIH_INEG, VKD3DSIH_ISHL, VKD3DSIH_ISHR, + VKD3DSIH_ITOD, VKD3DSIH_ITOF, VKD3DSIH_LABEL, VKD3DSIH_LD, diff --git a/tests/d3d12.c b/tests/d3d12.c index 6091d54..b6a773e 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -10031,7 +10031,7 @@ static void test_shader_instructions(void) {&ps_dtoi, {.d = {{ 1.0}}}, {.i = {1, -1}}, true}, {&ps_dtof, {.d = {{ 1.5}}}, {.f = {1.5f, -1.5f}}, true}, {&ps_utod, {.u = {{3, 0xffffffff}}}, {.d = {3.0, 4294967295.0}}, true, true}, - {&ps_itod, {.u = {{3, INT_MIN}}}, {.d = {3.0, -2147483648.0}}, true, true}, + {&ps_itod, {.u = {{3, INT_MIN}}}, {.d = {3.0, -2147483648.0}}, true}, {&ps_ftod, {.f = {{-2.5f, -2.5f}}}, {.d = {-2.5, 2.5}}, true}, {&ps_dmul, {.d = {{ 1.5, 3.0}}}, {.d = { 4.5, -4.5}}, true}, {&ps_ddiv, {.d = {{ 2.0, 4.0}}}, {.d = { 0.5, 2.0}}, true},
1
0
0
0
Conor McCarthy : vkd3d-shader: Implement DTOU instruction.
by Alexandre Julliard
12 Aug '21
12 Aug '21
Module: vkd3d Branch: master Commit: 88c08df03b94448dd31212b44ceec6ef252390d2 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=88c08df03b94448dd31212b…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Thu Aug 12 12:55:14 2021 +1000 vkd3d-shader: Implement DTOU instruction. Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d-shader/dxbc.c | 1 + libs/vkd3d-shader/sm4.h | 1 + libs/vkd3d-shader/spirv.c | 2 ++ libs/vkd3d-shader/trace.c | 1 + libs/vkd3d-shader/vkd3d_shader_private.h | 1 + tests/d3d12.c | 12 ++++++------ 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c index 2b30dd4..2beb2cc 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -817,6 +817,7 @@ static const struct vkd3d_sm4_opcode_info opcode_table[] = {VKD3D_SM5_OP_DFMA, VKD3DSIH_DFMA, "d", "ddd"}, {VKD3D_SM5_OP_DRCP, VKD3DSIH_DRCP, "d", "d"}, {VKD3D_SM5_OP_DTOI, VKD3DSIH_DTOI, "i", "d"}, + {VKD3D_SM5_OP_DTOU, VKD3DSIH_DTOU, "u", "d"}, }; static const enum vkd3d_shader_register_type register_type_table[] = diff --git a/libs/vkd3d-shader/sm4.h b/libs/vkd3d-shader/sm4.h index 4aefa99..a88447d 100644 --- a/libs/vkd3d-shader/sm4.h +++ b/libs/vkd3d-shader/sm4.h @@ -336,6 +336,7 @@ enum vkd3d_sm4_opcode VKD3D_SM5_OP_DFMA = 0xd3, VKD3D_SM5_OP_DRCP = 0xd4, VKD3D_SM5_OP_DTOI = 0xd6, + VKD3D_SM5_OP_DTOU = 0xd7, }; enum vkd3d_sm4_instruction_modifier diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 5f4d9ed..3d00f83 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -6778,6 +6778,7 @@ static SpvOp vkd3d_dxbc_compiler_map_alu_instruction(const struct vkd3d_shader_i {VKD3DSIH_DMUL, SpvOpFMul}, {VKD3DSIH_DTOF, SpvOpFConvert}, {VKD3DSIH_DTOI, SpvOpConvertFToS}, + {VKD3DSIH_DTOU, SpvOpConvertFToU}, {VKD3DSIH_FTOD, SpvOpFConvert}, {VKD3DSIH_FTOI, SpvOpConvertFToS}, {VKD3DSIH_FTOU, SpvOpConvertFToU}, @@ -9533,6 +9534,7 @@ int vkd3d_dxbc_compiler_handle_instruction(struct vkd3d_dxbc_compiler *compiler, case VKD3DSIH_DMUL: case VKD3DSIH_DTOF: case VKD3DSIH_DTOI: + case VKD3DSIH_DTOU: case VKD3DSIH_FTOD: case VKD3DSIH_FTOI: case VKD3DSIH_FTOU: diff --git a/libs/vkd3d-shader/trace.c b/libs/vkd3d-shader/trace.c index 5c28e00..0d5c06b 100644 --- a/libs/vkd3d-shader/trace.c +++ b/libs/vkd3d-shader/trace.c @@ -130,6 +130,7 @@ static const char * const shader_opcode_names[] = /* VKD3DSIH_DSY_FINE */ "deriv_rty_fine", /* VKD3DSIH_DTOF */ "dtof", /* VKD3DSIH_DTOI */ "dtoi", + /* VKD3DSIH_DTOU */ "dtou", /* VKD3DSIH_ELSE */ "else", /* VKD3DSIH_EMIT */ "emit", /* VKD3DSIH_EMIT_STREAM */ "emit_stream", diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index 7f2db6d..fba3764 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -219,6 +219,7 @@ enum vkd3d_shader_opcode VKD3DSIH_DSY_FINE, VKD3DSIH_DTOF, VKD3DSIH_DTOI, + VKD3DSIH_DTOU, VKD3DSIH_ELSE, VKD3DSIH_EMIT, VKD3DSIH_EMIT_STREAM, diff --git a/tests/d3d12.c b/tests/d3d12.c index d68ab75..6091d54 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -10022,12 +10022,12 @@ static void test_shader_instructions(void) {&ps_dge, {.d = {{1.5, 1.0}}}, {{0xffffffff}}, true}, {&ps_dlt, {.d = {{0.0, 1.0}}}, {{0xffffffff}}, true}, {&ps_dlt, {.d = {{1.0, 1.0}}}, {{0x00000000}}, true}, - {&ps_dtou, {.d = {{ -NAN}}}, {{ 0, 0 }}, true, true}, - {&ps_dtou, {.d = {{ NAN}}}, {{ 0, 0 }}, true, true}, - {&ps_dtou, {.d = {{-INFINITY}}}, {{ 0, ~0u}}, true, true}, - {&ps_dtou, {.d = {{ INFINITY}}}, {{~0u, 0 }}, true, true}, - {&ps_dtou, {.d = {{ -1.0}}}, {{ 0, 1 }}, true, true}, - {&ps_dtou, {.d = {{ 1.0}}}, {{ 1, 0 }}, true, true}, + {&ps_dtou, {.d = {{ -NAN}}}, {{ 0, 0 }}, true}, + {&ps_dtou, {.d = {{ NAN}}}, {{ 0, 0 }}, true}, + {&ps_dtou, {.d = {{-INFINITY}}}, {{ 0, ~0u}}, true}, + {&ps_dtou, {.d = {{ INFINITY}}}, {{~0u, 0 }}, true}, + {&ps_dtou, {.d = {{ -1.0}}}, {{ 0, 1 }}, true}, + {&ps_dtou, {.d = {{ 1.0}}}, {{ 1, 0 }}, true}, {&ps_dtoi, {.d = {{ 1.0}}}, {.i = {1, -1}}, true}, {&ps_dtof, {.d = {{ 1.5}}}, {.f = {1.5f, -1.5f}}, true}, {&ps_utod, {.u = {{3, 0xffffffff}}}, {.d = {3.0, 4294967295.0}}, true, true},
1
0
0
0
Conor McCarthy : vkd3d-shader: Implement DTOI instruction.
by Alexandre Julliard
12 Aug '21
12 Aug '21
Module: vkd3d Branch: master Commit: c61b573d9c4e860ca5bbd06fbf1928c668e953ea URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=c61b573d9c4e860ca5bbd06…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Thu Aug 12 12:55:13 2021 +1000 vkd3d-shader: Implement DTOI instruction. Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d-shader/dxbc.c | 1 + libs/vkd3d-shader/sm4.h | 1 + libs/vkd3d-shader/spirv.c | 2 ++ libs/vkd3d-shader/trace.c | 1 + libs/vkd3d-shader/vkd3d_shader_private.h | 1 + tests/d3d12.c | 2 +- 6 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c index 86ba18a..2b30dd4 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -816,6 +816,7 @@ static const struct vkd3d_sm4_opcode_info opcode_table[] = {VKD3D_SM5_OP_DDIV, VKD3DSIH_DDIV, "d", "dd"}, {VKD3D_SM5_OP_DFMA, VKD3DSIH_DFMA, "d", "ddd"}, {VKD3D_SM5_OP_DRCP, VKD3DSIH_DRCP, "d", "d"}, + {VKD3D_SM5_OP_DTOI, VKD3DSIH_DTOI, "i", "d"}, }; static const enum vkd3d_shader_register_type register_type_table[] = diff --git a/libs/vkd3d-shader/sm4.h b/libs/vkd3d-shader/sm4.h index 34b90c8..4aefa99 100644 --- a/libs/vkd3d-shader/sm4.h +++ b/libs/vkd3d-shader/sm4.h @@ -335,6 +335,7 @@ enum vkd3d_sm4_opcode VKD3D_SM5_OP_DDIV = 0xd2, VKD3D_SM5_OP_DFMA = 0xd3, VKD3D_SM5_OP_DRCP = 0xd4, + VKD3D_SM5_OP_DTOI = 0xd6, }; enum vkd3d_sm4_instruction_modifier diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 266db18..5f4d9ed 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -6777,6 +6777,7 @@ static SpvOp vkd3d_dxbc_compiler_map_alu_instruction(const struct vkd3d_shader_i {VKD3DSIH_DIV, SpvOpFDiv}, {VKD3DSIH_DMUL, SpvOpFMul}, {VKD3DSIH_DTOF, SpvOpFConvert}, + {VKD3DSIH_DTOI, SpvOpConvertFToS}, {VKD3DSIH_FTOD, SpvOpFConvert}, {VKD3DSIH_FTOI, SpvOpConvertFToS}, {VKD3DSIH_FTOU, SpvOpConvertFToU}, @@ -9531,6 +9532,7 @@ int vkd3d_dxbc_compiler_handle_instruction(struct vkd3d_dxbc_compiler *compiler, case VKD3DSIH_DIV: case VKD3DSIH_DMUL: case VKD3DSIH_DTOF: + case VKD3DSIH_DTOI: case VKD3DSIH_FTOD: case VKD3DSIH_FTOI: case VKD3DSIH_FTOU: diff --git a/libs/vkd3d-shader/trace.c b/libs/vkd3d-shader/trace.c index eab3882..5c28e00 100644 --- a/libs/vkd3d-shader/trace.c +++ b/libs/vkd3d-shader/trace.c @@ -129,6 +129,7 @@ static const char * const shader_opcode_names[] = /* VKD3DSIH_DSY_COARSE */ "deriv_rty_coarse", /* VKD3DSIH_DSY_FINE */ "deriv_rty_fine", /* VKD3DSIH_DTOF */ "dtof", + /* VKD3DSIH_DTOI */ "dtoi", /* VKD3DSIH_ELSE */ "else", /* VKD3DSIH_EMIT */ "emit", /* VKD3DSIH_EMIT_STREAM */ "emit_stream", diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index 8980e64..7f2db6d 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -218,6 +218,7 @@ enum vkd3d_shader_opcode VKD3DSIH_DSY_COARSE, VKD3DSIH_DSY_FINE, VKD3DSIH_DTOF, + VKD3DSIH_DTOI, VKD3DSIH_ELSE, VKD3DSIH_EMIT, VKD3DSIH_EMIT_STREAM, diff --git a/tests/d3d12.c b/tests/d3d12.c index f409ac6..d68ab75 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -10028,7 +10028,7 @@ static void test_shader_instructions(void) {&ps_dtou, {.d = {{ INFINITY}}}, {{~0u, 0 }}, true, true}, {&ps_dtou, {.d = {{ -1.0}}}, {{ 0, 1 }}, true, true}, {&ps_dtou, {.d = {{ 1.0}}}, {{ 1, 0 }}, true, true}, - {&ps_dtoi, {.d = {{ 1.0}}}, {.i = {1, -1}}, true, true}, + {&ps_dtoi, {.d = {{ 1.0}}}, {.i = {1, -1}}, true}, {&ps_dtof, {.d = {{ 1.5}}}, {.f = {1.5f, -1.5f}}, true}, {&ps_utod, {.u = {{3, 0xffffffff}}}, {.d = {3.0, 4294967295.0}}, true, true}, {&ps_itod, {.u = {{3, INT_MIN}}}, {.d = {3.0, -2147483648.0}}, true, true},
1
0
0
0
← Newer
1
...
65
66
67
68
69
70
71
...
106
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
Results per page:
10
25
50
100
200