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
November 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
2 participants
951 discussions
Start a n
N
ew thread
Alexandre Julliard : ctapi32: Build as a pure Unix library.
by Alexandre Julliard
17 Nov '21
17 Nov '21
Module: wine Branch: master Commit: c474709f9bbf9194ab133232b60f9f2ed741aa42 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c474709f9bbf9194ab133232…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Nov 17 14:16:00 2021 +0100 ctapi32: Build as a pure Unix library. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ctapi32/Makefile.in | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/ctapi32/Makefile.in b/dlls/ctapi32/Makefile.in index eec24c64cde..fa13d24540c 100644 --- a/dlls/ctapi32/Makefile.in +++ b/dlls/ctapi32/Makefile.in @@ -1,4 +1,5 @@ MODULE = ctapi32.dll +UNIXLIB = ctapi32.so IMPORTS = advapi32 C_SRCS = \
1
0
0
0
Alexandre Julliard : capi2032: Build as a pure Unix library.
by Alexandre Julliard
17 Nov '21
17 Nov '21
Module: wine Branch: master Commit: a60160dc6d52ebcc2f843021fae99e870b3eb948 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a60160dc6d52ebcc2f843021…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Nov 17 14:15:51 2021 +0100 capi2032: Build as a pure Unix library. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/capi2032/Makefile.in | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/capi2032/Makefile.in b/dlls/capi2032/Makefile.in index ac45a8d394f..9e9ba285498 100644 --- a/dlls/capi2032/Makefile.in +++ b/dlls/capi2032/Makefile.in @@ -1,4 +1,5 @@ MODULE = capi2032.dll +UNIXLIB = capi2032.so IMPORTLIB = capi2032 EXTRALIBS = $(CAPI20_LIBS) EXTRAINCL = $(CAPI20_CFLAGS)
1
0
0
0
Alexandre Julliard : makefiles: Don't add msvcrt import in dlls built as part of the tests.
by Alexandre Julliard
17 Nov '21
17 Nov '21
Module: wine Branch: master Commit: 8c68894f048a3fc490fa8459d4bd7328a3342a9d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8c68894f048a3fc490fa8459…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Nov 17 14:30:05 2021 +0100 makefiles: Don't add msvcrt import in dlls built as part of the tests. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/makedep.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index 9ea46aed8d8..1455d90d897 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -2161,14 +2161,10 @@ static struct strarray add_default_imports( const struct makefile *make, struct * add_import_libs */ static struct strarray add_import_libs( const struct makefile *make, struct strarray *deps, - struct strarray imports, int delay, int is_unix ) + struct strarray imports, int delay, int is_cross ) { struct strarray ret = empty_strarray; unsigned int i, j; - int is_cross = make->is_cross && !is_unix; - - if (!delay && !is_unix && !strarray_exists( &make->extradllflags, "-nodefaultlibs" )) - imports = add_default_imports( make, imports ); for (i = 0; i < imports.count; i++) { @@ -2966,9 +2962,10 @@ static void output_source_spec( struct makefile *make, struct incl_file *source, const char *debug_file; if (!imports.count) imports = make->imports; - if (!dll_flags.count) dll_flags = make->extradllflags; - all_libs = add_import_libs( make, &dep_libs, imports, 0, 0 ); + if (!strarray_exists( &dll_flags, "-nodefaultlibs" )) imports = add_default_imports( make, imports ); + + all_libs = add_import_libs( make, &dep_libs, imports, 0, make->is_cross ); dll_name = strmake( "%s.dll%s", obj, make->is_cross ? "" : dll_ext ); obj_name = strmake( "%s%s", obj_dir_path( make, obj ), make->is_cross ? ".cross.o" : ".o" ); output_file = obj_dir_path( make, dll_name ); @@ -3188,14 +3185,18 @@ static void output_module( struct makefile *make ) { struct strarray all_libs = empty_strarray; struct strarray dep_libs = empty_strarray; + struct strarray imports = make->imports; char *module_path = obj_dir_path( make, make->module ); const char *debug_file = NULL; char *spec_file = NULL; unsigned int i; if (!make->is_exe) spec_file = src_dir_path( make, replace_extension( make->module, ".dll", ".spec" )); - strarray_addall( &all_libs, add_import_libs( make, &dep_libs, make->delayimports, 1, 0 )); - strarray_addall( &all_libs, add_import_libs( make, &dep_libs, make->imports, 0, 0 )); + if (!strarray_exists( &make->extradllflags, "-nodefaultlibs" )) + imports = add_default_imports( make, imports ); + + strarray_addall( &all_libs, add_import_libs( make, &dep_libs, make->delayimports, 1, make->is_cross )); + strarray_addall( &all_libs, add_import_libs( make, &dep_libs, imports, 0, make->is_cross )); if (make->is_cross) { @@ -3271,7 +3272,7 @@ static void output_module( struct makefile *make ) 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_addall( &unix_libs, add_import_libs( make, &unix_deps, unix_imports, 0, 0 )); } strarray_addall( &unix_libs, add_unix_libraries( make, &unix_deps )); @@ -3453,7 +3454,8 @@ static void output_test_module( struct makefile *make ) char *stripped = replace_extension( make->testdll, ".dll", "_test-stripped.exe" ); char *testres = replace_extension( make->testdll, ".dll", "_test.res" ); struct strarray dep_libs = empty_strarray; - struct strarray all_libs = add_import_libs( make, &dep_libs, make->imports, 0, 0 ); + struct strarray all_libs = add_import_libs( make, &dep_libs, add_default_imports( make, make->imports ), + 0, make->is_cross ); struct makefile *parent = get_parent_makefile( make ); const char *ext = make->is_cross ? "" : dll_ext; const char *debug_file;
1
0
0
0
Alexandre Julliard : winebuild: Avoid resolving standard C functions with static importlibs.
by Alexandre Julliard
17 Nov '21
17 Nov '21
Module: wine Branch: master Commit: 414e1c8ad5f5c39ef7caa71f5ff8f7735cf91d1a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=414e1c8ad5f5c39ef7caa71f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Nov 17 14:57:08 2021 +0100 winebuild: Avoid resolving standard C functions with static importlibs. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winebuild/import.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index 8e285b19872..ab15e01b53c 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -492,6 +492,8 @@ static void add_undef_import( const char *name, int is_ordinal ) while (*name >= '0' && *name <= '9') ordinal = 10 * ordinal + *name++ - '0'; if (*name++ != '$') return; + if (!use_msvcrt && find_name( name, stdc_functions )) return; + import = add_static_import_dll( dll_name ); if (is_ordinal) add_import_func( import, NULL, xstrdup( name ), ordinal, 0 );
1
0
0
0
Alexandre Julliard : winegcc: Don't link directly to ntdll or ntoskrnl import libraries.
by Alexandre Julliard
17 Nov '21
17 Nov '21
Module: wine Branch: master Commit: a7074ea2a3ab384a9360979b933e92a078179d0a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a7074ea2a3ab384a9360979b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Nov 17 14:56:38 2021 +0100 winegcc: Don't link directly to ntdll or ntoskrnl import libraries. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winegcc/winegcc.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 38900103a97..940eaeb5279 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -1408,18 +1408,28 @@ static void build(struct options* opts) strarray_add(&link_args, name); break; case 'a': - if (is_pe && !opts->use_msvcrt && !opts->lib_suffix && strchr(name, '/')) + if (!opts->use_msvcrt && !opts->lib_suffix && strchr(name, '/')) { /* turn the path back into -Ldir -lfoo options * this makes sure that we use the specified libs even * when mingw adds its own import libs to the link */ const char *p = get_basename( name ); - if (!strncmp( p, "lib", 3 ) && strcmp( p, "libmsvcrt.a" )) + if (is_pe) { - strarray_add(&link_args, strmake("-L%s", get_dirname(name) )); - strarray_add(&link_args, strmake("-l%s", get_basename_noext( p + 3 ))); - break; + if (!strncmp( p, "lib", 3 ) && strcmp( p, "libmsvcrt.a" )) + { + strarray_add(&link_args, strmake("-L%s", get_dirname(name) )); + strarray_add(&link_args, strmake("-l%s", get_basename_noext( p + 3 ))); + break; + } + } + else + { + /* don't link to ntdll or ntoskrnl in non-msvcrt mode + * since they export CRT functions */ + if (!strcmp( p, "libntdll.a" )) break; + if (!strcmp( p, "libntoskrnl.a" )) break; } } strarray_add(&link_args, name);
1
0
0
0
Conor McCarthy : vkd3d-shader/spirv: Shift the private variable destination mask instead of the source mask.
by Alexandre Julliard
17 Nov '21
17 Nov '21
Module: vkd3d Branch: master Commit: dbd7e18364cededf51ec2bcc8fdca8b2b06f3371 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=dbd7e18364cededf51ec2bc…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Wed Nov 17 13:06:03 2021 +0100 vkd3d-shader/spirv: Shift the private variable destination mask instead of the source mask. Otherwise if the input is located above position 0 in the private array it will be swizzled incorrectly, e.g. a.yz instead of a.xy in test_domain_shader_inputs(). Based on a vkd3d-proton patch by Hans-Kristian Arntzen. 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/spirv.c | 4 ++-- tests/d3d12.c | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 5a7e561..b7e7428 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -4672,8 +4672,8 @@ static uint32_t vkd3d_dxbc_compiler_emit_input(struct vkd3d_dxbc_compiler *compi } val_id = vkd3d_dxbc_compiler_emit_swizzle(compiler, val_id, - vkd3d_write_mask_from_component_count(input_component_count) << component_idx, - VKD3D_SHADER_COMPONENT_FLOAT, VKD3D_SHADER_NO_SWIZZLE, dst->write_mask); + vkd3d_write_mask_from_component_count(input_component_count), + VKD3D_SHADER_COMPONENT_FLOAT, VKD3D_SHADER_NO_SWIZZLE, dst->write_mask >> component_idx); vkd3d_dxbc_compiler_emit_store_reg(compiler, &dst_reg, dst->write_mask, val_id); } diff --git a/tests/d3d12.c b/tests/d3d12.c index 670fbf4..3b0c424 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -29506,7 +29506,6 @@ static void test_domain_shader_inputs(void) {1.0f, 2.0f, 0.0f, 0.5f, 2.5f, 8.0f, 2.0f, 1.0f}, {1.0f, 2.0f, 1.0f, 0.5f, 2.5f, 8.0f, 2.0f, 1.0f}, }; - static const unsigned int is_todo[] = {0x00110000, 0x00110000, 0x00110000, 0x00110000}; static const unsigned int stride = sizeof(*reference); memset(&desc, 0, sizeof(desc)); @@ -29556,9 +29555,8 @@ static void test_domain_shader_inputs(void) const float *elems = get_readback_data(&rb, y, 0, 0, stride); for (x = 0; x < ARRAY_SIZE(*reference); ++x) { - todo_if(is_todo[y] & (1u << (x * 4))) - ok(compare_float(reference[y][x], elems[x], 0), - "Got unexpected value %.8e for [%u][%u], expected %.8e.\n", elems[x], y, x, reference[y][x]); + ok(compare_float(reference[y][x], elems[x], 0), + "Got unexpected value %.8e for [%u][%u], expected %.8e.\n", elems[x], y, x, reference[y][x]); } } release_resource_readback(&rb);
1
0
0
0
Conor McCarthy : vkd3d-shader/spirv: Fix the outer tessellation level indices for isoline tessellation.
by Alexandre Julliard
17 Nov '21
17 Nov '21
Module: vkd3d Branch: master Commit: 5357ab78b9357fd5b716e062b640a7ebce050db0 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=5357ab78b9357fd5b716e06…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Wed Nov 17 13:06:02 2021 +0100 vkd3d-shader/spirv: Fix the outer tessellation level indices for isoline tessellation. For isoline tessellation, "density" is specified by OL0, and "detail" by OL1. Based on a vkd3d-proton patch by Hans-Kristian Arntzen. 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/spirv.c | 4 ++-- tests/d3d12.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index e1a7dd3..5a7e561 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -4084,8 +4084,8 @@ vkd3d_system_value_builtins[] = {VKD3D_SIV_TRIANGLE_W_TESS_FACTOR, {VKD3D_SHADER_COMPONENT_FLOAT, 1, SpvBuiltInTessLevelOuter, NULL, 4, 2}}, {VKD3D_SIV_TRIANGLE_INNER_TESS_FACTOR, {VKD3D_SHADER_COMPONENT_FLOAT, 1, SpvBuiltInTessLevelInner, NULL, 2, 0}}, - {VKD3D_SIV_LINE_DETAIL_TESS_FACTOR, {VKD3D_SHADER_COMPONENT_FLOAT, 1, SpvBuiltInTessLevelOuter, NULL, 4, 0}}, - {VKD3D_SIV_LINE_DENSITY_TESS_FACTOR, {VKD3D_SHADER_COMPONENT_FLOAT, 1, SpvBuiltInTessLevelOuter, NULL, 4, 1}}, + {VKD3D_SIV_LINE_DENSITY_TESS_FACTOR, {VKD3D_SHADER_COMPONENT_FLOAT, 1, SpvBuiltInTessLevelOuter, NULL, 4, 0}}, + {VKD3D_SIV_LINE_DETAIL_TESS_FACTOR, {VKD3D_SHADER_COMPONENT_FLOAT, 1, SpvBuiltInTessLevelOuter, NULL, 4, 1}}, }; static const struct vkd3d_spirv_builtin vkd3d_pixel_shader_position_builtin = { diff --git a/tests/d3d12.c b/tests/d3d12.c index f5a1723..670fbf4 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -29506,7 +29506,7 @@ static void test_domain_shader_inputs(void) {1.0f, 2.0f, 0.0f, 0.5f, 2.5f, 8.0f, 2.0f, 1.0f}, {1.0f, 2.0f, 1.0f, 0.5f, 2.5f, 8.0f, 2.0f, 1.0f}, }; - static const unsigned int is_todo[] = {0x00110000, 0x00110100, 0x00111100, 0x00111000}; + static const unsigned int is_todo[] = {0x00110000, 0x00110000, 0x00110000, 0x00110000}; static const unsigned int stride = sizeof(*reference); memset(&desc, 0, sizeof(desc));
1
0
0
0
Conor McCarthy : tests: Add tests for a domain shader using a single patch constant input value.
by Alexandre Julliard
17 Nov '21
17 Nov '21
Module: vkd3d Branch: master Commit: 462bbfaa746014af1b0e3c989253ccbcb015919b URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=462bbfaa746014af1b0e3c9…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Wed Nov 17 13:06:01 2021 +0100 tests: Add tests for a domain shader using a single patch constant input value. This specifically tests the case where "count" would end up being one for arrayed builtins in needs_private_io_variable(). 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> --- tests/d3d12.c | 175 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 175 insertions(+) diff --git a/tests/d3d12.c b/tests/d3d12.c index 9b0a91f..f5a1723 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -29567,6 +29567,180 @@ static void test_domain_shader_inputs(void) destroy_test_context(&context); } +static void test_domain_shader_one_patch_constant_input(void) +{ + D3D12_GRAPHICS_PIPELINE_STATE_DESC pso_desc; + ID3D12GraphicsCommandList *command_list; + D3D12_STREAM_OUTPUT_BUFFER_VIEW sobv; + D3D12_INPUT_LAYOUT_DESC input_layout; + struct test_context_desc desc; + struct resource_readback rb; + struct test_context context; + ID3D12Resource *so_buffer; + ID3D12CommandQueue *queue; + unsigned int x, y; + HRESULT hr; + +#if 0 + struct data + { + float4 position : SV_Position; + }; + + data vs_main() + { + data d; + d.position = float4(1.0f, 2.0f, 3.0f, 4.0f); + return d; + } + + struct patch_constant_data + { + float tess_factor[2] : SV_TessFactor; + }; + + void patch_constant(OutputPatch<data, 1> control_points, + uint prim_id : SV_PrimitiveID, + out patch_constant_data output) + { + output.tess_factor[0] = 2.0f; + output.tess_factor[1] = 1.0f; + } + + [domain("isoline")] + [outputcontrolpoints(1)] + [partitioning("integer")] + [outputtopology("line")] + [patchconstantfunc("patch_constant")] + data hs_main(InputPatch<data, 1> input) + { + return input[0]; + } + + [domain("isoline")] + void ds_main(float tess_factor[2] : SV_TessFactor, + const OutputPatch<data, 1> patch, + out float4 position : SV_Position) + { + position = float4(patch[0].position.xyz, tess_factor[1]); + } +#endif + static const DWORD vs_code[] = + { + 0x43425844, 0xcb24c840, 0x8a22891b, 0xcf0dbe1d, 0x7b0a4fdb, 0x00000001, 0x000000b8, 0x00000003, + 0x0000002c, 0x0000003c, 0x00000070, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f, + 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000001, 0x00000003, 0x00000000, + 0x0000000f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x58454853, 0x00000040, 0x00010050, 0x00000010, + 0x0100086a, 0x04000067, 0x001020f2, 0x00000000, 0x00000001, 0x08000036, 0x001020f2, 0x00000000, + 0x00004002, 0x3f800000, 0x40000000, 0x40400000, 0x40800000, 0x0100003e, + }; + static const D3D12_SHADER_BYTECODE vs = {vs_code, sizeof(vs_code)}; + static const DWORD hs_code[] = + { + 0x43425844, 0x36132cb6, 0x45a8f125, 0x2ff97810, 0xf60e439e, 0x00000001, 0x000001f4, 0x00000004, + 0x00000030, 0x00000064, 0x00000098, 0x000000e8, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, + 0x00000020, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x00000f0f, 0x505f5653, 0x7469736f, + 0x006e6f69, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x47534350, 0x00000048, + 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000010, 0x00000003, 0x00000000, 0x00000e01, + 0x00000038, 0x00000001, 0x0000000f, 0x00000003, 0x00000001, 0x00000e01, 0x545f5653, 0x46737365, + 0x6f746361, 0xabab0072, 0x58454853, 0x00000104, 0x00030050, 0x00000041, 0x01000071, 0x01000893, + 0x01000894, 0x01000895, 0x01000896, 0x01001097, 0x0100086a, 0x00001835, 0x0000000a, 0x40000000, + 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x01000072, + 0x0400005f, 0x002010f2, 0x00000001, 0x00000000, 0x03000065, 0x001020f2, 0x00000000, 0x06000036, + 0x001020f2, 0x00000000, 0x00201e46, 0x00000000, 0x00000000, 0x0100003e, 0x01000073, 0x02000099, + 0x00000002, 0x0200005f, 0x00017000, 0x04000067, 0x00102012, 0x00000000, 0x00000016, 0x04000067, + 0x00102012, 0x00000001, 0x00000015, 0x02000068, 0x00000001, 0x0400005b, 0x00102012, 0x00000000, + 0x00000002, 0x04000036, 0x00100012, 0x00000000, 0x0001700a, 0x07000036, 0x00902012, 0x0010000a, + 0x00000000, 0x0090900a, 0x0010000a, 0x00000000, 0x0100003e, + }; + static const D3D12_SHADER_BYTECODE hs = {hs_code, sizeof(hs_code)}; + static const DWORD ds_code[] = + { + 0x43425844, 0x3ac40533, 0x2aa65785, 0x41df1859, 0xb3b2294b, 0x00000001, 0x00000164, 0x00000004, + 0x00000030, 0x00000064, 0x000000b4, 0x000000e8, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, + 0x00000020, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000070f, 0x505f5653, 0x7469736f, + 0x006e6f69, 0x47534350, 0x00000048, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000010, + 0x00000003, 0x00000000, 0x00000001, 0x00000038, 0x00000001, 0x0000000f, 0x00000003, 0x00000001, + 0x00000101, 0x545f5653, 0x46737365, 0x6f746361, 0xabab0072, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x505f5653, + 0x7469736f, 0x006e6f69, 0x58454853, 0x00000074, 0x00040050, 0x0000001d, 0x01000893, 0x01000895, + 0x0100086a, 0x04000061, 0x0011b012, 0x00000001, 0x00000015, 0x0400005f, 0x00219072, 0x00000001, + 0x00000000, 0x04000067, 0x001020f2, 0x00000000, 0x00000001, 0x06000036, 0x00102072, 0x00000000, + 0x00219246, 0x00000000, 0x00000000, 0x05000036, 0x00102082, 0x00000000, 0x0011b00a, 0x00000001, + 0x0100003e, + }; + static const D3D12_SHADER_BYTECODE ds = {ds_code, sizeof(ds_code)}; + static const D3D12_SO_DECLARATION_ENTRY so_declaration[] = + { + {0, "SV_POSITION", 0, 0, 4, 0}, + }; + static const float reference[][4] = + { + {1.0f, 2.0f, 3.0f, 1.0f}, + {1.0f, 2.0f, 3.0f, 1.0f}, + {1.0f, 2.0f, 3.0f, 1.0f}, + {1.0f, 2.0f, 3.0f, 1.0f}, + }; + static const unsigned int stride = sizeof(*reference); + + memset(&desc, 0, sizeof(desc)); + desc.root_signature_flags = D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT + | D3D12_ROOT_SIGNATURE_FLAG_ALLOW_STREAM_OUTPUT; + desc.no_pipeline = true; + if (!init_test_context(&context, &desc)) + return; + command_list = context.list; + queue = context.queue; + + memset(&input_layout, 0, sizeof(input_layout)); + + init_pipeline_state_desc(&pso_desc, context.root_signature, DXGI_FORMAT_UNKNOWN, &vs, NULL, &input_layout); + pso_desc.HS = hs; + pso_desc.DS = ds; + memset(&pso_desc.PS, 0, sizeof(pso_desc.PS)); + pso_desc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_PATCH; + pso_desc.StreamOutput.NumEntries = ARRAY_SIZE(so_declaration); + pso_desc.StreamOutput.pSODeclaration = so_declaration; + pso_desc.StreamOutput.pBufferStrides = &stride; + pso_desc.StreamOutput.NumStrides = 1; + pso_desc.StreamOutput.RasterizedStream = D3D12_SO_NO_RASTERIZED_STREAM; + hr = ID3D12Device_CreateGraphicsPipelineState(context.device, &pso_desc, + &IID_ID3D12PipelineState, (void **)&context.pipeline_state); + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + + so_buffer = create_default_buffer(context.device, 1024, + D3D12_RESOURCE_FLAG_NONE, D3D12_RESOURCE_STATE_STREAM_OUT); + sobv.BufferLocation = ID3D12Resource_GetGPUVirtualAddress(so_buffer); + sobv.SizeInBytes = 1024; + sobv.BufferFilledSizeLocation = sobv.BufferLocation + sobv.SizeInBytes; + + ID3D12GraphicsCommandList_SOSetTargets(command_list, 0, 1, &sobv); + ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature); + ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state); + ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST); + ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport); + ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect); + ID3D12GraphicsCommandList_DrawInstanced(command_list, 4, 1, 0, 0); + + transition_resource_state(command_list, so_buffer, + D3D12_RESOURCE_STATE_STREAM_OUT, D3D12_RESOURCE_STATE_COPY_SOURCE); + get_buffer_readback_with_command_list(so_buffer, DXGI_FORMAT_UNKNOWN, &rb, queue, command_list); + for (y = 0; y < ARRAY_SIZE(reference); ++y) + { + const float *elems = get_readback_data(&rb, y, 0, 0, stride); + for (x = 0; x < ARRAY_SIZE(*reference); ++x) + { + ok(compare_float(reference[y][x], elems[x], 0), + "Got unexpected value %.8e for [%u][%u], expected %.8e.\n", elems[x], y, x, reference[y][x]); + } + } + release_resource_readback(&rb); + + ID3D12Resource_Release(so_buffer); + destroy_test_context(&context); +} + static void test_render_a8(void) { static const float black[] = {0.0f, 0.0f, 0.0f, 0.0f}; @@ -35970,6 +36144,7 @@ START_TEST(d3d12) run_test(test_line_tessellation); run_test(test_tessellation_primitive_id); run_test(test_domain_shader_inputs); + run_test(test_domain_shader_one_patch_constant_input); run_test(test_render_a8); run_test(test_cpu_descriptors_lifetime); run_test(test_clip_distance);
1
0
0
0
Conor McCarthy : tests: Add tests for domain shader patch constant inputs.
by Alexandre Julliard
17 Nov '21
17 Nov '21
Module: vkd3d Branch: master Commit: db10a63a2e9fdc91917e2de7880dd5b988b2c725 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=db10a63a2e9fdc91917e2de…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Wed Nov 17 13:06:00 2021 +0100 tests: Add tests for domain shader patch constant inputs. Based on a vkd3d-proton patch by Hans-Kristian Arntzen. 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> --- tests/d3d12.c | 208 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) Diff:
https://source.winehq.org/git/vkd3d.git/?a=commitdiff;h=db10a63a2e9fdc91917…
1
0
0
0
Conor McCarthy : vkd3d-shader/spirv: Handle arrayed builtin inputs.
by Alexandre Julliard
17 Nov '21
17 Nov '21
Module: vkd3d Branch: master Commit: c41931c7508e0f2e6467db55319438ec2b24e16b URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=c41931c7508e0f2e6467db5…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Wed Nov 17 13:05:59 2021 +0100 vkd3d-shader/spirv: Handle arrayed builtin inputs. Fixes invalid SPIR-V being generated in Monster Hunter: World. Based on vkd3d-proton patches by Hans-Kristian Arntzen and Philip Rebohle. 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/spirv.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 8827c43..e1a7dd3 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -4416,6 +4416,13 @@ static bool needs_private_io_variable(const struct vkd3d_shader_signature *signa bool have_sysval = false; unsigned int i, count; + /* Always use private variables for arrayed builtins. These are generally + * scalars on the D3D side, so would need extra array indices when + * accessing them. It may be feasible to insert those indices at the point + * where the builtins are used, but it's not clear it's worth the effort. */ + if (builtin && (builtin->spirv_array_size || builtin->fixup_pfn)) + return true; + if (*component_count == VKD3D_VEC4_SIZE) return false; @@ -4519,8 +4526,7 @@ static uint32_t vkd3d_dxbc_compiler_emit_input(struct vkd3d_dxbc_compiler *compi component_idx = vkd3d_write_mask_get_component_idx(signature_element->mask); } - if (!(use_private_var = builtin && builtin->fixup_pfn) - && needs_private_io_variable(shader_signature, reg_idx, builtin, &input_component_count, &write_mask) + if (needs_private_io_variable(shader_signature, reg_idx, builtin, &input_component_count, &write_mask) && (compiler->shader_type != VKD3D_SHADER_TYPE_HULL || (reg->type != VKD3DSPR_INCONTROLPOINT && reg->type != VKD3DSPR_PATCHCONST))) use_private_var = true; @@ -4644,6 +4650,16 @@ static uint32_t vkd3d_dxbc_compiler_emit_input(struct vkd3d_dxbc_compiler *compi val_id = vkd3d_spirv_build_op_in_bounds_access_chain1(builder, ptr_type_id, input_id, index); dst_reg.idx[0].offset = i; } + else if (builtin && builtin->spirv_array_size) + { + /* The D3D builtin is not an array, but the SPIR-V builtin is, + * so we'll need to index into the SPIR-V builtin when loading + * it. This happens when reading TessLevel in domain shaders. */ + ptr_type_id = vkd3d_spirv_get_op_type_pointer(builder, SpvStorageClassInput, type_id); + index = vkd3d_dxbc_compiler_get_constant_uint(compiler, builtin->member_idx); + val_id = vkd3d_spirv_build_op_in_bounds_access_chain1(builder, ptr_type_id, input_id, index); + dst_reg.idx[0].offset = reg_idx + i; + } val_id = vkd3d_spirv_build_op_load(builder, type_id, val_id, SpvMemoryAccessMaskNone); if (builtin && builtin->fixup_pfn) @@ -4947,11 +4963,11 @@ static void vkd3d_dxbc_compiler_emit_output(struct vkd3d_dxbc_compiler *compiler const struct vkd3d_spirv_builtin *builtin; const struct vkd3d_shader_phase *phase; struct vkd3d_symbol *symbol = NULL; + bool use_private_variable = false; struct vkd3d_symbol reg_symbol; SpvStorageClass storage_class; struct rb_entry *entry = NULL; unsigned int signature_idx; - bool use_private_variable; unsigned int write_mask; unsigned int array_size; bool is_patch_constant; @@ -4991,11 +5007,10 @@ static void vkd3d_dxbc_compiler_emit_output(struct vkd3d_dxbc_compiler *compiler storage_class = SpvStorageClassOutput; - if (!(use_private_variable = builtin && builtin->spirv_array_size) - && (get_shader_output_swizzle(compiler, signature_element->register_index) != VKD3D_SHADER_NO_SWIZZLE + if (get_shader_output_swizzle(compiler, signature_element->register_index) != VKD3D_SHADER_NO_SWIZZLE || needs_private_io_variable(shader_signature, signature_element->register_index, builtin, &output_component_count, &write_mask) - || is_patch_constant)) + || is_patch_constant) use_private_variable = true; else component_idx = vkd3d_write_mask_get_component_idx(write_mask);
1
0
0
0
← Newer
1
...
40
41
42
43
44
45
46
...
96
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
Results per page:
10
25
50
100
200