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
April 2023
----- 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
817 discussions
Start a n
N
ew thread
Alexandre Julliard : Wine release 8.7
by Alexandre Julliard
28 Apr '23
28 Apr '23
Module: website Branch: master Commit: f880748eff7e65ee7a2c05cece463590ee51ea99 URL:
https://gitlab.winehq.org/winehq/winehq/-/commit/f880748eff7e65ee7a2c05cece…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 28 22:08:51 2023 +0200 Wine release 8.7 Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- news/en/2023042801.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/news/en/2023042801.xml b/news/en/2023042801.xml new file mode 100644 index 00000000..f56b3074 --- /dev/null +++ b/news/en/2023042801.xml @@ -0,0 +1,15 @@ +<news> +<date>April 28, 2023</date> +<title>Wine 8.7 Released</title> +<body> +<p> The Wine development release 8.7 is now available.</p> +<p> <a href="{$root}/announce/8.7">What's new</a> in this release: +<ul> + <li>DXBC shader parsing delegated to vkd3d.</li> + <li>More spool file improvements in the PostScript driver.</li> + <li>Various bug fixes.</li> +</ul> +</p> +<p>The source is <a href="//dl.winehq.org/wine/source/8.x/wine-8.7.tar.xz">available now</a>. +Binary packages are in the process of being built, and will appear soon at their respective <a href="{$root}/download">download locations</a>. +</p></body></news>
1
0
0
0
Tag wine-8.7 : Alexandre Julliard : Release 8.7
by Alexandre Julliard
28 Apr '23
28 Apr '23
Module: wine Branch: refs/tags/wine-8.7 Tag: 1608d8c273f9ed956f4a8aca6ba4fd2d004f3a7d URL:
https://gitlab.winehq.org/wine/wine/-/tags/1608d8c273f9ed956f4a8aca6ba4fd2d…
Tagger: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 28 22:06:24 2023 +0200 Release 8.7
1
0
0
0
Nikolay Sivov : vkd3d-shader/hlsl: Implement D3DCOLORtoUBYTE4() function.
by Alexandre Julliard
28 Apr '23
28 Apr '23
Module: vkd3d Branch: master Commit: 7ba373946bed1fa63cade358f776a29773c2ddf0 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/7ba373946bed1fa63cade358f776a…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Apr 21 07:49:29 2023 +0200 vkd3d-shader/hlsl: Implement D3DCOLORtoUBYTE4() function. --- Makefile.am | 1 + libs/vkd3d-shader/hlsl.y | 46 +++++++++++++++++++++++++++++++ tests/hlsl-d3dcolor-to-ubyte4.shader_test | 24 ++++++++++++++++ 3 files changed, 71 insertions(+) diff --git a/Makefile.am b/Makefile.am index df25d1b9..b9fd06ee 100644 --- a/Makefile.am +++ b/Makefile.am @@ -77,6 +77,7 @@ vkd3d_shader_tests = \ tests/hlsl-clamp.shader_test \ tests/hlsl-comma.shader_test \ tests/hlsl-cross.shader_test \ + tests/hlsl-d3dcolor-to-ubyte4.shader_test \ tests/hlsl-discard.shader_test \ tests/hlsl-dot.shader_test \ tests/hlsl-duplicate-modifiers.shader_test \ diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index f96897cb..d516f3b5 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -3395,6 +3395,51 @@ static bool intrinsic_trunc(struct hlsl_ctx *ctx, return !!add_unary_arithmetic_expr(ctx, params->instrs, HLSL_OP1_TRUNC, arg, loc); } +static bool intrinsic_d3dcolor_to_ubyte4(struct hlsl_ctx *ctx, + const struct parse_initializer *params, const struct vkd3d_shader_location *loc) +{ + struct hlsl_ir_node *arg = params->args[0], *ret, *c; + struct hlsl_type *arg_type = arg->data_type; + struct hlsl_ir_swizzle *swizzle; + + if (arg_type->class != HLSL_CLASS_SCALAR && !(arg_type->class == HLSL_CLASS_VECTOR && arg_type->dimx == 4)) + { + struct vkd3d_string_buffer *string; + + if ((string = hlsl_type_to_string(ctx, arg_type))) + { + hlsl_error(ctx, loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE, "Wrong argument type '%s'.", string->buffer); + hlsl_release_string_buffer(ctx, string); + } + + return false; + } + + if (!(arg = intrinsic_float_convert_arg(ctx, params, arg, loc))) + return false; + + if (!(c = hlsl_new_float_constant(ctx, 255.0f + (0.5f / 256.0f), loc))) + return false; + list_add_tail(params->instrs, &c->entry); + + if (arg_type->class == HLSL_CLASS_VECTOR) + { + if (!(swizzle = hlsl_new_swizzle(ctx, HLSL_SWIZZLE(Z, Y, X, W), 4, arg, loc))) + return false; + list_add_tail(params->instrs, &swizzle->node.entry); + + arg = &swizzle->node; + } + + if (!(ret = add_binary_arithmetic_expr(ctx, params->instrs, HLSL_OP2_MUL, arg, c, loc))) + return false; + + if (ctx->profile->major_version >= 4) + return !!add_unary_arithmetic_expr(ctx, params->instrs, HLSL_OP1_TRUNC, ret, loc); + + return true; +} + static const struct intrinsic_function { const char *name; @@ -3406,6 +3451,7 @@ static const struct intrinsic_function intrinsic_functions[] = { /* Note: these entries should be kept in alphabetical order. */ + {"D3DCOLORtoUBYTE4", 1, true, intrinsic_d3dcolor_to_ubyte4}, {"abs", 1, true, intrinsic_abs}, {"all", 1, true, intrinsic_all}, {"any", 1, true, intrinsic_any}, diff --git a/tests/hlsl-d3dcolor-to-ubyte4.shader_test b/tests/hlsl-d3dcolor-to-ubyte4.shader_test new file mode 100644 index 00000000..e31ef61c --- /dev/null +++ b/tests/hlsl-d3dcolor-to-ubyte4.shader_test @@ -0,0 +1,24 @@ +[require] +shader model >= 4.0 + +[pixel shader] +float4 main(uniform float4 u) : sv_target +{ + return D3DCOLORtoUBYTE4(u); +} + +[test] +uniform 0 float4 -0.5 6.5 7.5 3.4 +draw quad +probe all rgba (1912.0, 1657.0, -127.0, 867.0) 1 + +[pixel shader] +float4 main(uniform float4 u) : sv_target +{ + return D3DCOLORtoUBYTE4(u.x); +} + +[test] +uniform 0 float4 -0.5 6.5 7.5 3.4 +draw quad +probe all rgba (-127.0, -127.0, -127.0, -127.0) 1
1
0
0
0
Nikolay Sivov : vkd3d-shader/hlsl: Partially implement trunc().
by Alexandre Julliard
28 Apr '23
28 Apr '23
Module: vkd3d Branch: master Commit: 4b3707aeb41e6a7ee5fdef7545abe57dd81ac6a6 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/4b3707aeb41e6a7ee5fdef7545abe…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Apr 14 23:00:57 2023 +0200 vkd3d-shader/hlsl: Partially implement trunc(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- Makefile.am | 1 + libs/vkd3d-shader/hlsl.c | 1 + libs/vkd3d-shader/hlsl.h | 1 + libs/vkd3d-shader/hlsl.y | 12 ++++++++++++ libs/vkd3d-shader/tpf.c | 5 +++++ tests/hlsl-trunc.shader_test | 44 ++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 64 insertions(+) diff --git a/Makefile.am b/Makefile.am index 8e94658d..df25d1b9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -123,6 +123,7 @@ vkd3d_shader_tests = \ tests/hlsl-struct-semantics.shader_test \ tests/hlsl-ternary.shader_test \ tests/hlsl-transpose.shader_test \ + tests/hlsl-trunc.shader_test \ tests/hlsl-type-names.shader_test \ tests/hlsl-vector-indexing.shader_test \ tests/hlsl-vector-indexing-uniform.shader_test \ diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c index f0b6a5ef..19656431 100644 --- a/libs/vkd3d-shader/hlsl.c +++ b/libs/vkd3d-shader/hlsl.c @@ -2295,6 +2295,7 @@ const char *debug_hlsl_expr_op(enum hlsl_ir_expr_op op) [HLSL_OP1_SIN] = "sin", [HLSL_OP1_SIN_REDUCED] = "sin_reduced", [HLSL_OP1_SQRT] = "sqrt", + [HLSL_OP1_TRUNC] = "trunc", [HLSL_OP2_ADD] = "+", [HLSL_OP2_BIT_AND] = "&", diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h index 2ff18536..2e9d3f5e 100644 --- a/libs/vkd3d-shader/hlsl.h +++ b/libs/vkd3d-shader/hlsl.h @@ -492,6 +492,7 @@ enum hlsl_ir_expr_op HLSL_OP1_SIN, HLSL_OP1_SIN_REDUCED, /* Reduced range [-pi, pi] */ HLSL_OP1_SQRT, + HLSL_OP1_TRUNC, HLSL_OP2_ADD, HLSL_OP2_BIT_AND, diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 6c3bca34..f96897cb 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -3384,6 +3384,17 @@ static bool intrinsic_transpose(struct hlsl_ctx *ctx, return true; } +static bool intrinsic_trunc(struct hlsl_ctx *ctx, + const struct parse_initializer *params, const struct vkd3d_shader_location *loc) +{ + struct hlsl_ir_node *arg; + + if (!(arg = intrinsic_float_convert_arg(ctx, params, params->args[0], loc))) + return false; + + return !!add_unary_arithmetic_expr(ctx, params->instrs, HLSL_OP1_TRUNC, arg, loc); +} + static const struct intrinsic_function { const char *name; @@ -3433,6 +3444,7 @@ intrinsic_functions[] = {"tex2D", -1, false, intrinsic_tex2D}, {"tex3D", -1, false, intrinsic_tex3D}, {"transpose", 1, true, intrinsic_transpose}, + {"trunc", 1, true, intrinsic_trunc}, }; static int intrinsic_function_name_compare(const void *a, const void *b) diff --git a/libs/vkd3d-shader/tpf.c b/libs/vkd3d-shader/tpf.c index 0908fba3..3debe952 100644 --- a/libs/vkd3d-shader/tpf.c +++ b/libs/vkd3d-shader/tpf.c @@ -4031,6 +4031,11 @@ static void write_sm4_expr(struct hlsl_ctx *ctx, write_sm4_unary_op(buffer, VKD3D_SM4_OP_SQRT, &expr->node, arg1, 0); break; + case HLSL_OP1_TRUNC: + assert(type_is_float(dst_type)); + write_sm4_unary_op(buffer, VKD3D_SM4_OP_ROUND_Z, &expr->node, arg1, 0); + break; + case HLSL_OP2_ADD: switch (dst_type->base_type) { diff --git a/tests/hlsl-trunc.shader_test b/tests/hlsl-trunc.shader_test new file mode 100644 index 00000000..419608fb --- /dev/null +++ b/tests/hlsl-trunc.shader_test @@ -0,0 +1,44 @@ +[pixel shader] +float4 main(uniform float4 u) : sv_target +{ + return trunc(u); +} + +[test] +uniform 0 float4 -0.5 6.5 7.5 3.4 +draw quad +probe all rgba (0.0, 6.0, 7.0, 3.0) +uniform 0 float4 -1.5 6.5 7.5 3.4 +draw quad +probe all rgba (-1.0, 6.0, 7.0, 3.0) + +[pixel shader] +float4 main(uniform float4 u) : sv_target +{ + float a = trunc(u.r); + int2 b = trunc(u.gb); + float4 res = float4(b, a, u.a); + return trunc(res); +} + +[test] +uniform 0 float4 -0.5 6.5 7.5 3.4 +draw quad +probe all rgba (6.0, 7.0, 0.0, 3.0) + +[require] +shader model >= 4.0 + +[pixel shader] +float4 main(uniform int4 u) : sv_target +{ + float a = trunc(u.r); + int2 b = trunc(u.gb); + float4 res = float4(b, a, u.a); + return trunc(res); +} + +[test] +uniform 0 int4 -1 6 7 3 +draw quad +probe all rgba (6.0, 7.0, -1.0, 3.0)
1
0
0
0
Conor McCarthy : vkd3d: Synchronise concurrent descriptor heap binding by multiple command lists.
by Alexandre Julliard
28 Apr '23
28 Apr '23
Module: vkd3d Branch: master Commit: 5366ca7001b51cca2d4ee485435b667b62d983ba URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/5366ca7001b51cca2d4ee485435b6…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Thu Apr 27 15:05:58 2023 +1000 vkd3d: Synchronise concurrent descriptor heap binding by multiple command lists. It is possible for multiple command lists to use the same heap, and submit it simultaneously to multiple d3d12 queues. --- libs/vkd3d/command.c | 10 +++++++++- libs/vkd3d/resource.c | 4 +++- libs/vkd3d/vkd3d_private.h | 3 ++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 094466d2..81ddccb4 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -3176,7 +3176,11 @@ static void command_list_flush_vk_heap_updates(struct d3d12_command_list *list) unsigned int i; for (i = 0; i < list->descriptor_heap_count; ++i) - d3d12_desc_flush_vk_heap_updates(list->descriptor_heaps[i], device); + { + vkd3d_mutex_lock(&list->descriptor_heaps[i]->vk_sets_mutex); + d3d12_desc_flush_vk_heap_updates_locked(list->descriptor_heaps[i], device); + vkd3d_mutex_unlock(&list->descriptor_heaps[i]->vk_sets_mutex); + } list->descriptor_heap_count = 0; } @@ -3215,6 +3219,8 @@ static void d3d12_command_list_bind_descriptor_heap(struct d3d12_command_list *l list->descriptor_heaps[list->descriptor_heap_count++] = heap; } + vkd3d_mutex_lock(&heap->vk_sets_mutex); + for (set = 0; set < ARRAY_SIZE(heap->vk_descriptor_sets); ++set) { VkDescriptorSet vk_descriptor_set = heap->vk_descriptor_sets[set].vk_set; @@ -3225,6 +3231,8 @@ static void d3d12_command_list_bind_descriptor_heap(struct d3d12_command_list *l VK_CALL(vkCmdBindDescriptorSets(list->vk_command_buffer, bindings->vk_bind_point, rs->vk_pipeline_layout, rs->vk_set_count + set, 1, &vk_descriptor_set, 0, NULL)); } + + vkd3d_mutex_unlock(&heap->vk_sets_mutex); } static void d3d12_command_list_update_heap_descriptors(struct d3d12_command_list *list, diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index d12191a9..213b2dbb 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -2323,7 +2323,7 @@ static void d3d12_desc_write_vk_heap(struct d3d12_descriptor_heap *descriptor_he writes->count = i; } -void d3d12_desc_flush_vk_heap_updates(struct d3d12_descriptor_heap *descriptor_heap, struct d3d12_device *device) +void d3d12_desc_flush_vk_heap_updates_locked(struct d3d12_descriptor_heap *descriptor_heap, struct d3d12_device *device) { const struct vkd3d_vk_device_procs *vk_procs = &device->vk_procs; struct d3d12_desc *descriptors, *src; @@ -3724,6 +3724,7 @@ static ULONG STDMETHODCALLTYPE d3d12_descriptor_heap_Release(ID3D12DescriptorHea } VK_CALL(vkDestroyDescriptorPool(device->vk_device, heap->vk_descriptor_pool, NULL)); + vkd3d_mutex_destroy(&heap->vk_sets_mutex); vkd3d_free(heap); @@ -3946,6 +3947,7 @@ static HRESULT d3d12_descriptor_heap_init(struct d3d12_descriptor_heap *descript return hr; d3d12_descriptor_heap_vk_descriptor_sets_init(descriptor_heap, device, desc); + vkd3d_mutex_init(&descriptor_heap->vk_sets_mutex); d3d12_device_add_ref(descriptor_heap->device = device); diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 0af643b0..79474414 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -988,13 +988,14 @@ struct d3d12_descriptor_heap VkDescriptorPool vk_descriptor_pool; struct d3d12_descriptor_heap_vk_set vk_descriptor_sets[VKD3D_SET_INDEX_COUNT]; + struct vkd3d_mutex vk_sets_mutex; unsigned int volatile dirty_list_head; uint8_t DECLSPEC_ALIGN(sizeof(void *)) descriptors[]; }; -void d3d12_desc_flush_vk_heap_updates(struct d3d12_descriptor_heap *descriptor_heap, struct d3d12_device *device); +void d3d12_desc_flush_vk_heap_updates_locked(struct d3d12_descriptor_heap *descriptor_heap, struct d3d12_device *device); static inline struct d3d12_descriptor_heap *d3d12_desc_get_descriptor_heap(const struct d3d12_desc *descriptor) {
1
0
0
0
Conor McCarthy : vkd3d: Track all descriptor heaps bound during command list recording and flush their writes.
by Alexandre Julliard
28 Apr '23
28 Apr '23
Module: vkd3d Branch: master Commit: fa63da6030cce4d7c1e1a5b255d495264a8f8695 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/fa63da6030cce4d7c1e1a5b255d49…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Thu Apr 27 14:59:15 2023 +1000 vkd3d: Track all descriptor heaps bound during command list recording and flush their writes. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54895
--- libs/vkd3d/command.c | 75 +++++++++++++++++++++------------------------- libs/vkd3d/vkd3d_private.h | 2 ++ 2 files changed, 36 insertions(+), 41 deletions(-) diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index fb6b40b2..094466d2 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -3159,6 +3159,27 @@ static void d3d12_command_list_update_descriptor_tables(struct d3d12_command_lis } } +static bool contains_heap(struct d3d12_descriptor_heap **heap_array, unsigned int count, + const struct d3d12_descriptor_heap *query) +{ + unsigned int i; + + for (i = 0; i < count; ++i) + if (heap_array[i] == query) + return true; + return false; +} + +static void command_list_flush_vk_heap_updates(struct d3d12_command_list *list) +{ + struct d3d12_device *device = list->device; + unsigned int i; + + for (i = 0; i < list->descriptor_heap_count; ++i) + d3d12_desc_flush_vk_heap_updates(list->descriptor_heaps[i], device); + list->descriptor_heap_count = 0; +} + static void d3d12_command_list_bind_descriptor_heap(struct d3d12_command_list *list, enum vkd3d_pipeline_bind_point bind_point, struct d3d12_descriptor_heap *heap) { @@ -3183,6 +3204,17 @@ static void d3d12_command_list_bind_descriptor_heap(struct d3d12_command_list *l bindings->sampler_heap_id = heap->serial_id; } + if (!contains_heap(list->descriptor_heaps, list->descriptor_heap_count, heap)) + { + if (list->descriptor_heap_count == ARRAY_SIZE(list->descriptor_heaps)) + { + /* Descriptors can be written after binding. */ + FIXME("Flushing descriptor updates while list %p is not closed.\n", list); + command_list_flush_vk_heap_updates(list); + } + list->descriptor_heaps[list->descriptor_heap_count++] = heap; + } + for (set = 0; set < ARRAY_SIZE(heap->vk_descriptor_sets); ++set) { VkDescriptorSet vk_descriptor_set = heap->vk_descriptor_sets[set].vk_set; @@ -5927,6 +5959,7 @@ static HRESULT d3d12_command_list_init(struct d3d12_command_list *list, struct d list->update_descriptors = device->use_vk_heaps ? d3d12_command_list_update_heap_descriptors : d3d12_command_list_update_descriptors; + list->descriptor_heap_count = 0; if (SUCCEEDED(hr = d3d12_command_allocator_allocate_command_buffer(allocator, list))) { @@ -6187,44 +6220,6 @@ static void d3d12_command_queue_submit_locked(struct d3d12_command_queue *queue) } } -static bool contains_heap(const struct d3d12_descriptor_heap **heap_array, unsigned int count, - const struct d3d12_descriptor_heap *query) -{ - unsigned int i; - - for (i = 0; i < count; ++i) - if (heap_array[i] == query) - return true; - return false; -} - -static void pipeline_bindings_flush_vk_heap_updates(struct vkd3d_pipeline_bindings *bindings, - struct d3d12_device *device) -{ - /* Only two heaps are strictly allowed, but more could be supported with a hack. */ - const struct d3d12_descriptor_heap *heap_array[3]; - struct d3d12_descriptor_heap *descriptor_heap; - unsigned int i, count; - uint64_t mask; - - mask = bindings->descriptor_table_active_mask & bindings->root_signature->descriptor_table_mask; - - for (i = 0, count = 0; i < ARRAY_SIZE(bindings->descriptor_tables); ++i) - { - if (!(mask & (1ull << i)) || !bindings->descriptor_tables[i]) - continue; - - descriptor_heap = d3d12_desc_get_descriptor_heap(bindings->descriptor_tables[i]); - /* Another thread could be writing unused descriptors, so try to check each heap only once. Flushing - * any updates added after the first flush will only delay execution of the command list. */ - if (contains_heap(heap_array, count, descriptor_heap)) - continue; - if (count < ARRAY_SIZE(heap_array)) - heap_array[count++] = descriptor_heap; - d3d12_desc_flush_vk_heap_updates(descriptor_heap, device); - } -} - static void STDMETHODCALLTYPE d3d12_command_queue_ExecuteCommandLists(ID3D12CommandQueue *iface, UINT command_list_count, ID3D12CommandList * const *command_lists) { @@ -6258,9 +6253,7 @@ static void STDMETHODCALLTYPE d3d12_command_queue_ExecuteCommandLists(ID3D12Comm return; } - if (cmd_list->state) - pipeline_bindings_flush_vk_heap_updates(&cmd_list->pipeline_bindings[cmd_list->state->vk_bind_point], - cmd_list->device); + command_list_flush_vk_heap_updates(cmd_list); buffers[i] = cmd_list->vk_command_buffer; } diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 88dc5772..0af643b0 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -1407,6 +1407,8 @@ struct d3d12_command_list VkDeviceSize so_counter_buffer_offsets[D3D12_SO_BUFFER_SLOT_COUNT]; void (*update_descriptors)(struct d3d12_command_list *list, enum vkd3d_pipeline_bind_point bind_point); + struct d3d12_descriptor_heap *descriptor_heaps[64]; + unsigned int descriptor_heap_count; struct vkd3d_private_store private_store; };
1
0
0
0
Alexandre Julliard : Release 8.7.
by Alexandre Julliard
28 Apr '23
28 Apr '23
Module: wine Branch: master Commit: c732d2458994d3242741552c47d45d8b04eeb915 URL:
https://gitlab.winehq.org/wine/wine/-/commit/c732d2458994d3242741552c47d45d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 28 22:02:23 2023 +0200 Release 8.7. --- ANNOUNCE | 774 ++++++++++++++++++++++++++------------------------------------ AUTHORS | 1 + VERSION | 2 +- configure | 18 +- 4 files changed, 330 insertions(+), 465 deletions(-)
1
0
0
0
Connor McAdams : uiautomationcore: Retrieve runtime ID on UiaReturnRawElementProvider thread to prevent a deadlock.
by Alexandre Julliard
28 Apr '23
28 Apr '23
Module: wine Branch: master Commit: b04acc81d0ae7b354b37025ddb98a3394d5a54d7 URL:
https://gitlab.winehq.org/wine/wine/-/commit/b04acc81d0ae7b354b37025ddb98a3…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Thu Feb 16 13:21:20 2023 -0500 uiautomationcore: Retrieve runtime ID on UiaReturnRawElementProvider thread to prevent a deadlock. If we pass a node to the provider thread that contains a provider that was created in an STA with the ProviderOptions_UseComThreading flag set, we can deadlock when attempting to get a runtime ID from the proxy due to the message queue not being pumped. To avoid this, retrieve the runtime ID before passing the node to the provider thread. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/uiautomationcore/tests/uiautomation.c | 32 +++++++++++++++ dlls/uiautomationcore/uia_provider.c | 64 ++++++++++++++++-------------- 2 files changed, 66 insertions(+), 30 deletions(-) diff --git a/dlls/uiautomationcore/tests/uiautomation.c b/dlls/uiautomationcore/tests/uiautomation.c index cf680b6a733..35f2f18ffcf 100644 --- a/dlls/uiautomationcore/tests/uiautomation.c +++ b/dlls/uiautomationcore/tests/uiautomation.c @@ -6305,6 +6305,16 @@ static const struct prov_method_sequence node_from_hwnd9[] = { { 0 } }; +static const struct prov_method_sequence node_from_hwnd10[] = { + NODE_CREATE_SEQ(&Provider), + /* Next two only done on Windows 8+. */ + { &Provider, FRAG_GET_RUNTIME_ID, METHOD_OPTIONAL }, + { &Provider, FRAG_GET_RUNTIME_ID, METHOD_OPTIONAL }, + { &Provider, PROV_GET_PROVIDER_OPTIONS }, + { &Provider, FRAG_GET_RUNTIME_ID, METHOD_OPTIONAL }, /* Only done on Win11+. */ + { 0 } +}; + static const struct prov_method_sequence disconnect_prov1[] = { { &Provider_child, PROV_GET_PROVIDER_OPTIONS }, /* Win10v1507 and below call this. */ @@ -6576,6 +6586,28 @@ static DWORD WINAPI uia_node_from_handle_test_thread(LPVOID param) Sleep(50); ok(Provider.ref == 1, "Unexpected refcnt %ld\n", Provider.ref); + /* ProviderOptions_UseComThreading test from a separate thread. */ + SET_EXPECT(winproc_GETOBJECT_UiaRoot); + /* Only sent on Win7. */ + SET_EXPECT(winproc_GETOBJECT_CLIENT); + prov_root = &Provider.IRawElementProviderSimple_iface; + initialize_provider(&Provider, ProviderOptions_ServerSideProvider | ProviderOptions_UseComThreading, NULL, FALSE); + Provider.frag_root = NULL; + Provider.runtime_id[0] = Provider.runtime_id[1] = 0xdeadbeef; + hr = UiaNodeFromHandle(hwnd, &node); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(Provider.ref == 2, "Unexpected refcnt %ld\n", Provider.ref); + CHECK_CALLED(winproc_GETOBJECT_UiaRoot); + called_winproc_GETOBJECT_CLIENT = expect_winproc_GETOBJECT_CLIENT = 0; + + ok_method_sequence(node_from_hwnd10, "node_from_hwnd10"); + + ok(UiaNodeRelease(node), "UiaNodeRelease returned FALSE\n"); + /* Win10v1809 can be slow to call Release on Provider. */ + if (Provider.ref != 1) + Sleep(50); + ok(Provider.ref == 1, "Unexpected refcnt %ld\n", Provider.ref); + if (!pUiaDisconnectProvider) { win_skip("UiaDisconnectProvider not exported by uiautomationcore.dll\n"); diff --git a/dlls/uiautomationcore/uia_provider.c b/dlls/uiautomationcore/uia_provider.c index ffab31d9953..a00e9312ff7 100644 --- a/dlls/uiautomationcore/uia_provider.c +++ b/dlls/uiautomationcore/uia_provider.c @@ -1744,19 +1744,15 @@ exit: LeaveCriticalSection(&provider_thread_cs); } -static HRESULT uia_provider_thread_add_node(HUIANODE node) +static HRESULT uia_provider_thread_add_node(HUIANODE node, SAFEARRAY *rt_id) { struct uia_node *node_data = impl_from_IWineUiaNode((IWineUiaNode *)node); int prov_type = get_node_provider_type_at_idx(node_data, 0); struct uia_provider *prov_data; - SAFEARRAY *sa; - HRESULT hr; + HRESULT hr = S_OK; prov_data = impl_from_IWineUiaProvider(node_data->prov[prov_type]); node_data->nested_node = prov_data->return_nested_node = TRUE; - hr = UiaGetRuntimeId(node, &sa); - if (FAILED(hr)) - return hr; TRACE("Adding node %p\n", node); @@ -1764,38 +1760,40 @@ static HRESULT uia_provider_thread_add_node(HUIANODE node) list_add_tail(&provider_thread.nodes_list, &node_data->prov_thread_list_entry); /* If we have a runtime ID, create an entry in the rb tree. */ - if (sa) + if (rt_id) { struct uia_provider_thread_map_entry *prov_map; struct rb_entry *rb_entry; - if ((rb_entry = rb_get(&provider_thread.node_map, sa))) - { + if ((rb_entry = rb_get(&provider_thread.node_map, rt_id))) prov_map = RB_ENTRY_VALUE(rb_entry, struct uia_provider_thread_map_entry, entry); - SafeArrayDestroy(sa); - } else { prov_map = heap_alloc_zero(sizeof(*prov_map)); if (!prov_map) { - SafeArrayDestroy(sa); - LeaveCriticalSection(&provider_thread_cs); - return E_OUTOFMEMORY; + hr = E_OUTOFMEMORY; + goto exit; } - prov_map->runtime_id = sa; + hr = SafeArrayCopy(rt_id, &prov_map->runtime_id); + if (FAILED(hr)) + { + heap_free(prov_map); + goto exit; + } list_init(&prov_map->nodes_list); - rb_put(&provider_thread.node_map, sa, &prov_map->entry); + rb_put(&provider_thread.node_map, prov_map->runtime_id, &prov_map->entry); } list_add_tail(&prov_map->nodes_list, &node_data->node_map_list_entry); node_data->map = prov_map; } +exit: LeaveCriticalSection(&provider_thread_cs); - return S_OK; + return hr; } #define WM_GET_OBJECT_UIA_NODE (WM_USER + 1) @@ -1807,13 +1805,13 @@ static LRESULT CALLBACK uia_provider_thread_msg_proc(HWND hwnd, UINT msg, WPARAM { case WM_GET_OBJECT_UIA_NODE: { + SAFEARRAY *rt_id = (SAFEARRAY *)wparam; HUIANODE node = (HUIANODE)lparam; LRESULT lr; - if (FAILED(uia_provider_thread_add_node(node))) + if (FAILED(uia_provider_thread_add_node(node, rt_id))) { WARN("Failed to add node %p to provider thread list.\n", node); - UiaNodeRelease(node); return 0; } @@ -1828,11 +1826,6 @@ static LRESULT CALLBACK uia_provider_thread_msg_proc(HWND hwnd, UINT msg, WPARAM lr = 0; } - /* - * LresultFromObject increases refcnt by 1. If LresultFromObject - * failed, this is expected to release the node. - */ - UiaNodeRelease(node); return lr; } @@ -1948,13 +1941,24 @@ void uia_stop_provider_thread(void) */ LRESULT uia_lresult_from_node(HUIANODE huianode) { - if (!uia_start_provider_thread()) - { - UiaNodeRelease(huianode); - return 0; - } + SAFEARRAY *rt_id; + LRESULT lr = 0; + HRESULT hr; + + hr = UiaGetRuntimeId(huianode, &rt_id); + if (SUCCEEDED(hr) && uia_start_provider_thread()) + lr = SendMessageW(provider_thread.hwnd, WM_GET_OBJECT_UIA_NODE, (WPARAM)rt_id, (LPARAM)huianode); + + if (FAILED(hr)) + WARN("UiaGetRuntimeId failed with hr %#lx\n", hr); - return SendMessageW(provider_thread.hwnd, WM_GET_OBJECT_UIA_NODE, 0, (LPARAM)huianode); + /* + * LresultFromObject increases refcnt by 1. If LresultFromObject + * failed or wasn't called, this is expected to release the node. + */ + UiaNodeRelease(huianode); + SafeArrayDestroy(rt_id); + return lr; } /***********************************************************************
1
0
0
0
Connor McAdams : uiautomationcore: Implement IUIAutomation::GetFocusedElement{BuildCacheRequest}.
by Alexandre Julliard
28 Apr '23
28 Apr '23
Module: wine Branch: master Commit: 5bd409070556980edb2683c6a1d99beee7cb7cec URL:
https://gitlab.winehq.org/wine/wine/-/commit/5bd409070556980edb2683c6a1d99b…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Fri Mar 24 13:14:05 2023 -0400 uiautomationcore: Implement IUIAutomation::GetFocusedElement{BuildCacheRequest}. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/uiautomationcore/tests/uiautomation.c | 208 +++++++++++++++++++++++++++++ dlls/uiautomationcore/uia_com_client.c | 60 ++++++++- 2 files changed, 264 insertions(+), 4 deletions(-)
1
0
0
0
Connor McAdams : uiautomationcore: Implement UiaNodeFromFocus.
by Alexandre Julliard
28 Apr '23
28 Apr '23
Module: wine Branch: master Commit: e070e9b476551817cd868d38c3758d2a1ecd0e9d URL:
https://gitlab.winehq.org/wine/wine/-/commit/e070e9b476551817cd868d38c3758d…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Tue Apr 25 13:33:57 2023 -0400 uiautomationcore: Implement UiaNodeFromFocus. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/uiautomationcore/tests/uiautomation.c | 23 +++-- dlls/uiautomationcore/uia_classes.idl | 1 + dlls/uiautomationcore/uia_client.c | 148 ++++++++++++++++++++++++++++- 3 files changed, 158 insertions(+), 14 deletions(-)
1
0
0
0
← Newer
1
2
3
4
...
82
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
Results per page:
10
25
50
100
200